/* =========================================================
   player.css — Video player e controlli
   ========================================================= */

/* ----- Area centrale ----- */
#player-area {
  position: relative;
  background: #050709;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---- Drop zone ---- */
#video-dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  margin: 20px;
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

#video-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.dropzone-inner {
  text-align: center;
  color: var(--text-secondary);
}

.dropzone-icon {
  display: block;
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1;
}

.dropzone-inner p {
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.btn-upload {
  display: inline-block;
  background: var(--bg-hover);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.15s;
}

.btn-upload:hover {
  background: var(--accent);
  color: var(--bg-base);
}

.dropzone-hint {
  margin-top: 10px !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

/* ---- Video wrapper ---- */
#video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000; /* margine nero visibile quando zoom < 100% */
}

#main-video {
  /* dimensioni gestite da CanvasManager.resize() via JS */
  position: absolute;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Canvas overlay esattamente sopra al video */
#overlay-canvas {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none; /* di default; attivato per tool specifici */
  z-index: 10;
}

#overlay-canvas.tool-active {
  pointer-events: all;
  cursor: crosshair;
}

/* ---- Controlli video ---- */
#video-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 72px;
  z-index: 20;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  gap: 8px;
}

/* Progress bar */
#video-progress-bar {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
}

#video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

#video-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  cursor: grab;
}

/* Buttons row */
#video-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vctrl-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  width: 32px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.12s;
  flex-shrink: 0;
}

.vctrl-btn:hover {
  background: var(--bg-active);
  border-color: var(--border-accent);
  color: var(--accent);
}

#video-timecode {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-left: 6px;
  min-width: 90px;
}

.vctrl-spacer { flex: 1; }

.vctrl-label {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.vctrl-label select {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
