/* ============================================
   SYNC STYLES - Timecode and multi-cam sync
   ============================================ */

/* Sync Flash Overlay */
#sync-flash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: opacity 0.05s;
}

#sync-flash.flash {
  animation: syncFlash 0.1s ease-out;
}

@keyframes syncFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Timecode Display Overlay */
#timecode-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 80;
  pointer-events: none;
}

#timecode-overlay.hidden {
  display: none;
}

#timecode-display {
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: min(10vw, 100px);
  font-weight: bold;
  color: #fff;
  text-shadow: 
    0 0 10px rgba(0,0,0,0.8),
    0 0 20px rgba(0,0,0,0.6),
    2px 2px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.5);
  padding: 15px 30px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.2);
}

#timecode-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.ui-visible #timecode-close {
  opacity: 1;
  pointer-events: auto;
}

#timecode-close:hover {
  transform: scale(1.1);
  background: #fff;
}

#timecode-fps {
  font-size: 16px;
  color: #888;
  margin-top: 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Sync Sound Buttons */
.sync-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sync-sound-btn {
  padding: 15px;
  text-align: center;
  line-height: 1.4;
}

.sync-sound-btn small {
  opacity: 0.7;
  font-size: 10px;
}

.sync-sound-btn:active {
  transform: scale(0.95);
}

.sync-sound-btn.playing {
  background: rgba(34, 197, 94, 0.8) !important;
  animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Preset List */
.preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.08);
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.preset-item:hover {
  background: rgba(255,255,255,0.15);
}

.preset-info {
  flex: 1;
}

.preset-name {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.preset-details {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  margin-top: 2px;
}

.preset-actions {
  display: flex;
  gap: 5px;
}

.preset-delete {
  background: rgba(239, 68, 68, 0.5);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.preset-delete:hover {
  background: rgba(239, 68, 68, 0.8);
}

.no-presets {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  text-align: center;
  padding: 15px;
}

.preset-input {
  flex: 1;
  margin-right: 10px;
}

/* Click indicator */
.click-indicator {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34, 197, 94, 0.9);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 90;
}

.click-indicator.visible {
  opacity: 1;
}

/* Sync pattern specific */
.sync-pattern .sync-status {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #666;
}

.sync-pattern .sync-status .active {
  color: #22c55e;
}

/* Large timecode for sync pattern */
.sync-tc-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sync-tc-main {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: min(15vw, 150px);
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.02em;
}

.sync-tc-frames {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: min(8vw, 80px);
  color: #22c55e;
}

.sync-tc-info {
  font-size: 18px;
  color: #666;
  display: flex;
  gap: 30px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #timecode-display {
    font-size: 8vw;
    padding: 10px 20px;
  }
  
  .sync-buttons {
    grid-template-columns: 1fr;
  }
  
  .sync-sound-btn {
    padding: 12px;
  }
}
