/* Video Detail & Player View Layout (Sketch 3) */
.detail-view-container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
  transition: gap 0.25s ease;
}

.player-main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s ease;
}

/* Comments Hidden / Collapsed State - Maximizes Video Player Space */
.detail-view-container.comments-hidden #commentsMount,
.detail-view-container.comments-hidden .comments-panel {
  display: none !important;
}

.detail-view-container.comments-hidden .player-main-column {
  width: 100%;
  max-width: 100%;
}

.detail-view-container.comments-hidden .custom-player-wrapper:not(.is-fullscreen):not(:fullscreen):not(:-webkit-full-screen):not(.aspect-9-16):not(.aspect-4-3):not(.aspect-1-1) {
  width: min(100%, calc((100vh - 180px) * 16 / 9));
  max-height: calc(100vh - 180px);
  margin: 0 auto;
}

.detail-view-container.comments-hidden .custom-player-wrapper.aspect-4-3:not(.is-fullscreen):not(:fullscreen):not(:-webkit-full-screen) {
  width: min(100%, calc((100vh - 180px) * 4 / 3));
  max-height: calc(100vh - 180px);
  margin: 0 auto;
}

.detail-view-container.comments-hidden .custom-player-wrapper.aspect-1-1:not(.is-fullscreen):not(:fullscreen):not(:-webkit-full-screen) {
  width: min(100%, calc(100vh - 180px));
  max-height: calc(100vh - 180px);
  margin: 0 auto;
}

.detail-view-container.comments-hidden .custom-image-wrapper {
  max-height: calc(100vh - 170px);
}

.detail-view-container.comments-hidden .custom-image-element {
  max-height: calc(100vh - 200px);
}

.detail-view-container.comments-visible .comments-panel {
  animation: commentsPanelSlide 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes commentsPanelSlide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Custom Player Container */
.custom-player-wrapper {
  position: relative;
  background-color: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  width: 100%;
  aspect-ratio: 16 / 9;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-player-wrapper.aspect-9-16 {
  aspect-ratio: 9 / 16;
  max-width: 480px;
  margin: 0 auto;
}

.custom-player-wrapper.aspect-4-3 {
  aspect-ratio: 4 / 3;
  max-width: 900px;
  margin: 0 auto;
}

.custom-player-wrapper.aspect-1-1 {
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
}

.custom-video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent;
}

/* Alpha Video Transparency Support (Checkerboard Grid, Black, White) */
.custom-player-wrapper.alpha-checkerboard {
  background-color: #121316;
  background-image: 
    linear-gradient(45deg, #202228 25%, transparent 25%), 
    linear-gradient(-45deg, #202228 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #202228 75%), 
    linear-gradient(-45deg, transparent 75%, #202228 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

[data-theme="light"] .custom-player-wrapper.alpha-checkerboard {
  background-color: #f1f5f9;
  background-image: 
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.custom-player-wrapper.alpha-black {
  background-color: #000000 !important;
  background-image: none !important;
}

.custom-player-wrapper.alpha-white {
  background-color: #ffffff !important;
  background-image: none !important;
}

/* Alpha Transcode State Overlay */
.alpha-transcode-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 11, 14, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 25;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.alpha-transcode-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brand-orange, #FF5400);
  border-radius: 50%;
  animation: alphaSpinnerRotate 0.8s linear infinite;
}

.alpha-transcode-text {
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

@keyframes alphaSpinnerRotate {
  to { transform: rotate(360deg); }
}

/* Top Quality Badge Alpha Tag */
.player-top-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-alpha-tag {
  background: rgba(255, 84, 0, 0.16);
  border: 1px solid rgba(255, 84, 0, 0.5);
  color: var(--brand-orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

/* Alpha Background Toggle Button in Controls */
.btn-alpha-bg {
  position: relative;
}

.btn-alpha-bg.active {
  color: var(--brand-orange);
}

.btn-alpha-bg.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-orange);
}

/* ProRes 4444 / Alpha Notice Card (For non-native browser fallback) */
.player-prores-notice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 11, 14, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.prores-notice-card {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.prores-notice-badge {
  background: rgba(255, 84, 0, 0.15);
  border: 1px solid rgba(255, 84, 0, 0.4);
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.prores-notice-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.prores-notice-card p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.prores-notice-hint {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  line-height: 1.45;
}

.prores-notice-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Light Theme: ProRes 4444 / Alpha Notice Card */
[data-theme="light"] .player-prores-notice {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .prores-notice-badge {
  background: rgba(255, 84, 0, 0.1);
  border-color: rgba(255, 84, 0, 0.3);
  color: var(--brand-orange);
}

[data-theme="light"] .prores-notice-card h3 {
  color: #0f172a;
}

[data-theme="light"] .prores-notice-card p {
  color: #475569;
}

[data-theme="light"] .prores-notice-hint {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

/* Light Theme: Alpha Transcode Preparing Overlay */
[data-theme="light"] .alpha-transcode-overlay {
  background: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .alpha-transcode-text {
  color: #0f172a;
}

[data-theme="light"] .alpha-transcode-spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--brand-orange);
}

/* Big Center Play/Pause button - "O PLAY SÓ APARECE NO HOVER DO CURSOR" */
.player-center-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  z-index: 10;
}

.custom-player-wrapper.user-active .player-center-play-overlay {
  opacity: 1;
  visibility: visible;
}

.center-play-btn {
  width: 76px;
  height: 76px;
  background: rgba(255, 255, 255, 0.94);
  color: #0d0f12;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, color 0.15s ease;
}

.custom-player-wrapper.user-active .center-play-btn {
  transform: scale(1);
}

.center-play-btn:hover {
  background: #ffffff;
  color: var(--brand-orange);
  transform: scale(1.08);
}

.center-play-btn svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
}

.center-play-btn.paused svg {
  margin-left: 0;
}

/* Center Loading Spinner (Buffer / Carregamento) */
.player-center-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(13, 15, 18, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 12;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-center-loading .player-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 84, 0, 0.22);
  border-top-color: var(--brand-orange, #FF5400);
  border-radius: 50%;
  animation: spinnerRotate 0.75s linear infinite;
  display: block;
}

@keyframes spinnerRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Durante o buffer/carregamento: o botão de pause/play do centro NÃO aparece, dando lugar ao loading */
.custom-player-wrapper.is-buffering .player-center-play-overlay,
.custom-player-wrapper.is-buffering .center-play-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.custom-player-wrapper.is-buffering .player-center-loading {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mantém o sinal de loading visível no centro mesmo sem movimento de mouse */
.custom-player-wrapper.user-inactive.is-buffering .player-center-loading {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Quality Badge in Player Top-Right (Clean Resolution Only) */
.player-top-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  width: auto;
  max-width: max-content;
  z-index: 15;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  user-select: none;
  pointer-events: none;
}

.custom-player-wrapper.user-active .player-top-badge {
  opacity: 1;
  visibility: visible;
}

/* Multifunction Bottom Control Bar */
.player-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 20px 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  pointer-events: none;
}

.custom-player-wrapper.user-active .player-controls-bar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Inactive state: 2s without activity hides all HUD, buttons, and mouse cursor */
.custom-player-wrapper.user-inactive {
  cursor: none;
}

.custom-player-wrapper.user-inactive * {
  cursor: none !important;
}

.custom-player-wrapper.user-inactive .player-controls-bar,
.custom-player-wrapper.user-inactive .player-top-badge,
.custom-player-wrapper.user-inactive .player-center-play-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Scrubber / Progress Bar */
.player-timeline-wrapper {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none !important;
}

.player-timeline-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  position: relative;
  overflow: visible;
  transition: height 0.15s ease;
}

.player-timeline-wrapper:hover .player-timeline-track {
  height: 6px;
}

.player-buffer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.15s ease-out;
}

.player-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--brand-orange);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  box-shadow: 0 0 8px var(--brand-orange-glow);
}

.player-scrubber-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.player-timeline-wrapper:hover .player-scrubber-handle,
.custom-player-wrapper.user-active .player-scrubber-handle {
  transform: translate(-50%, -50%) scale(1);
}

.player-time-tooltip {
  position: absolute;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(15, 17, 23, 0.95);
  border: 1px solid var(--border-medium);
  color: #ffffff;
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  white-space: nowrap;
}

.player-timeline-wrapper:hover .player-time-tooltip {
  opacity: 1;
}

/* Control Buttons Row */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-controls-left,
.player-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.player-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.player-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Volume Slider & Hover Reveal */
.volume-group {
  display: flex;
  align-items: center;
  position: relative;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  margin-left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  overflow: hidden;
  vertical-align: middle;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease,
              margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.volume-group:hover .volume-slider,
.volume-group.volume-active .volume-slider {
  width: 65px;
  max-width: 65px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 6px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.volume-slider:hover::-webkit-slider-thumb,
.volume-slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.volume-slider:hover::-moz-range-thumb,
.volume-slider:active::-moz-range-thumb {
  transform: scale(1.15);
}

/* Timecode Display */
.player-timecode {
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 6px;
  user-select: none;
}

.player-speed-badge {
  font-size: 12px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.player-speed-badge:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Comments Panel Column (Right Side) */
.comments-panel {
  width: 360px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 100px);
  min-height: 540px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.comments-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comments-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-orange);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-count-badge {
  background: transparent !important;
  color: var(--text-muted) !important;
  opacity: 0.55;
  font-size: 12px;
  font-weight: 600;
  padding: 0 2px;
  border-radius: 0;
  min-width: auto;
  line-height: 1;
}

.btn-close-comments-panel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-comments-panel:hover {
  background: var(--bg-tertiary);
  color: var(--brand-orange);
  transform: scale(1.08);
}

/* Header & Player Toggle Comments Button */
.toggle-comments-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
}

.toggle-comments-btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.toggle-comments-btn.is-active {
  background: var(--brand-orange-subtle) !important;
  border-color: var(--brand-orange) !important;
  color: var(--brand-orange) !important;
}

.toggle-comments-btn .comments-badge,
.btn-image-action .comments-badge {
  background: transparent !important;
  color: inherit !important;
  opacity: 0.55;
  font-size: 12px;
  font-weight: 600;
  padding: 0 1px;
  border-radius: 0;
  min-width: auto;
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.toggle-comments-btn:hover .comments-badge,
.btn-image-action:hover .comments-badge {
  opacity: 0.85;
}

.player-btn.is-active {
  color: var(--brand-orange) !important;
}

.player-btn.is-active svg {
  fill: var(--brand-orange) !important;
}

.btn-image-action.is-active {
  background: var(--brand-orange) !important;
  color: #ffffff !important;
  border-color: var(--brand-orange) !important;
}

/* Google Sign-in Banner (Requirement from Sketch 3) */
.comments-auth-banner {
  background: var(--bg-tertiary);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-banner-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-google-login {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

.btn-google-login:hover {
  background: #f9fafb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logged-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.logged-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logged-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  font-size: 0;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.logged-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-auth-switch {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

.btn-auth-switch:hover {
  color: var(--text-primary);
}

/* Comments List */
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
  gap: 8px;
}

.comment-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}

.comment-item:hover {
  border-color: var(--border-medium);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  font-size: 0;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.comment-author-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-role-author {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  letter-spacing: -0.1px;
}

/* Clickable Timecode Badge */
.comment-timecode-badge {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  color: var(--brand-orange);
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.comment-timecode-badge:hover {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange);
  transform: translateY(-1px);
}

.comment-body-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-reply-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-reply-toggle:hover {
  color: var(--brand-orange);
}

.comment-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-action-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.comment-action-link:hover {
  color: var(--text-primary);
}

.comment-action-link.danger:hover {
  color: var(--danger);
}

/* Comment Resolution Icon Button */
.btn-resolve-comment {
  background: transparent;
  border: none;
  padding: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
  flex-shrink: 0;
}

.btn-resolve-comment:hover {
  background: rgba(16, 185, 129, 0.12);
  transform: scale(1.14);
}

.btn-resolve-comment:active {
  transform: scale(0.92);
}

.btn-resolve-comment svg {
  display: block;
}

.btn-resolve-comment.is-resolved:hover svg circle {
  fill: #059669;
}

.badge-comment-resolved {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-left: 4px;
}

.badge-comment-resolved-client {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.09);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  user-select: none;
}

.comment-item.is-resolved {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
}

.comment-item.is-resolved:hover {
  border-color: #10b981;
}

.toggle-comments-btn .comments-badge.has-unresolved,
.btn-image-action .comments-badge.has-unresolved,
.comments-count-badge.has-unresolved {
  background: #ef4444 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 1px 7px !important;
  border-radius: var(--radius-full) !important;
  min-width: 18px !important;
  text-align: center !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
}

.comment-edit-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* Replies list */
.comment-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--border-subtle);
}

.reply-item {
  background: var(--bg-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.reply-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  font-size: 0;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.reply-author {
  font-weight: 600;
  font-size: 11px;
}

.reply-text {
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

/* Comment Form at bottom */
.comments-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Image Attachment Preview Bar */
.comment-attachment-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary, #1f232b);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md, 8px);
  padding: 6px 10px;
  animation: fadeInAttachment 0.18s ease;
}

@keyframes fadeInAttachment {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-attachment-thumb-wrap {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 6px;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-attachment-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-attachment-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.comment-attachment-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-attachment-size {
  font-size: 10px;
  color: var(--text-muted, #71767b);
}

.btn-remove-attachment {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-remove-attachment:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ff4d4d;
}

/* Comment Input Row with Picture Icon Button */
.comment-input-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.btn-comment-picture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-tertiary, #1f232b);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  padding: 0;
  margin-top: 1px;
}

.btn-comment-picture:hover {
  background: var(--bg-card, #23272e);
  color: var(--brand-orange, #ff6600);
  border-color: var(--brand-orange, #ff6600);
  transform: translateY(-1px);
}

.comment-textarea-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comment-textarea-wrap .comment-textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Drag overlay on message bar */
.comment-drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 102, 0, 0.12);
  border: 2px dashed var(--brand-orange, #ff6600);
  border-radius: var(--radius-md, 8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--brand-orange, #ff6600);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  z-index: 10;
  backdrop-filter: blur(2px);
}

.comment-textarea-wrap.drag-active .comment-drag-overlay {
  display: flex;
}

.comment-textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  resize: none;
  height: 64px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.comment-textarea:focus {
  border-color: var(--brand-orange);
}

/* Attached Images inside Comments List */
.comment-image-wrapper {
  margin-top: 8px;
  max-width: 280px;
}

.comment-image-card {
  position: relative;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: var(--bg-tertiary, #1a1d24);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-image-card:hover {
  border-color: var(--brand-orange, #ff6600);
  transform: translateY(-1px);
}

.comment-attached-img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

/* Predefined "Unavailable Picture" State */
.comment-image-card.is-unavailable {
  cursor: default;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 14px 10px;
}

.comment-image-card.is-unavailable:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.15);
}

.comment-image-card.is-unavailable .comment-attached-img {
  display: none !important;
}

.comment-image-unavailable {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted, #71767b);
  gap: 5px;
  padding: 6px 4px;
  user-select: none;
}

.comment-image-card.is-unavailable .comment-image-unavailable {
  display: flex;
}

.unavailable-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
}

.unavailable-desc {
  font-size: 10px;
  color: var(--text-muted, #64748b);
  line-height: 1.2;
}

.comment-image-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.comment-image-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Lightbox Modal for Comment Images */
.comment-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.comment-lightbox-backdrop.open {
  display: flex;
  animation: fadeInLb 0.2s ease;
}

@keyframes fadeInLb {
  from { opacity: 0; }
  to { opacity: 1; }
}

.comment-lightbox-dialog {
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-secondary, #181a1f);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.comment-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  gap: 12px;
}

.comment-lightbox-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-lightbox-download,
.comment-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  text-decoration: none;
}

.comment-lightbox-download:hover,
.comment-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.comment-lightbox-close {
  font-size: 22px;
  line-height: 1;
}

.comment-lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  max-height: calc(90vh - 60px);
  background: #090a0c;
}

.comment-lightbox-body img {
  max-width: 100%;
  max-height: calc(90vh - 92px);
  object-fit: contain;
  border-radius: 4px;
}

.comment-input-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timecode-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.timecode-checkbox-label input {
  accent-color: var(--brand-orange);
}

.current-time-pill {
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--brand-orange);
}

.btn-send-comment {
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-send-comment:hover {
  background: var(--brand-orange-hover);
}

.comments-disabled-notice {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Responsive detail view */
@media (max-width: 1080px) {
  .detail-view-container {
    flex-direction: column;
  }
  .comments-panel {
    width: 100%;
    height: 480px;
  }
}

/* Edge-to-Edge Fullscreen Styles for Custom Player */
/* Desktop PC / Web Nativo (Edge-to-Edge limpo sem restrição de variáveis) */
.custom-player-wrapper:fullscreen,
.custom-player-wrapper:-webkit-full-screen,
.custom-player-wrapper.is-desktop-player.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
  box-shadow: none !important;
  z-index: 2147483647 !important;
  touch-action: manipulation !important;
}

.custom-player-wrapper:fullscreen::backdrop,
.custom-player-wrapper:-webkit-full-screen::backdrop {
  background: #000000 !important;
}

/* Mobile Fullscreen (com suporte a visualViewport dinâmico no celular) */
.custom-player-wrapper.is-mobile-player.is-fullscreen:not(.fullscreen-rotated-landscape),
.custom-player-wrapper.is-fullscreen:not(.is-desktop-player):not(.fullscreen-rotated-landscape) {
  position: fixed !important;
  top: var(--fs-top, 0px) !important;
  left: var(--fs-left, 0px) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--fs-vw, 100dvw) !important;
  height: var(--fs-vh, 100dvh) !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
  box-shadow: 0 0 0 100vmax #000000 !important;
  z-index: 2147483647 !important;
  touch-action: manipulation !important;
}

/* Mobile Rotated Landscape: Automatically turns wide videos to fill the screen in wide even when phone rotation lock is active */
.custom-player-wrapper.is-fullscreen.fullscreen-rotated-landscape {
  position: fixed !important;
  top: var(--fs-center-y, 50dvh) !important;
  left: var(--fs-center-x, 50dvw) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--fs-vh, 100dvh) !important;
  height: var(--fs-vw, 100dvw) !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
  transform-origin: center center !important;
  background: #000000 !important;
  box-shadow: 0 0 0 100vmax #000000 !important;
  z-index: 2147483647 !important;
  overflow: hidden !important;
  touch-action: manipulation !important;
}

html.video-fullscreen-active,
body.video-fullscreen-active,
html.photo-fullscreen-active,
body.photo-fullscreen-active {
  background-color: #000000 !important;
}

body.video-fullscreen-active .app-header,
body.video-fullscreen-active .sidebar,
body.video-fullscreen-active .content-header-row,
body.video-fullscreen-active .mobile-portrait-guard,
body.video-fullscreen-active .floating-theme-toggle,
body.photo-fullscreen-active .app-header,
body.photo-fullscreen-active .sidebar,
body.photo-fullscreen-active .content-header-row,
body.photo-fullscreen-active .mobile-portrait-guard,
body.photo-fullscreen-active .floating-theme-toggle {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.custom-player-wrapper:fullscreen .custom-video-element,
.custom-player-wrapper:-webkit-full-screen .custom-video-element,
.custom-player-wrapper.is-fullscreen .custom-video-element {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  background: #000000 !important;
}

.custom-player-wrapper:fullscreen .player-controls-bar,
.custom-player-wrapper:-webkit-full-screen .player-controls-bar,
.custom-player-wrapper.is-fullscreen .player-controls-bar {
  padding-left: max(24px, env(safe-area-inset-left)) !important;
  padding-right: max(24px, env(safe-area-inset-right)) !important;
  padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
}

.custom-player-wrapper:fullscreen .player-top-badge,
.custom-player-wrapper:-webkit-full-screen .player-top-badge,
.custom-player-wrapper.is-fullscreen .player-top-badge,
.custom-image-wrapper:fullscreen .player-top-badge,
.custom-image-wrapper:-webkit-full-screen .player-top-badge,
.custom-image-wrapper.is-fullscreen .player-top-badge {
  top: max(20px, env(safe-area-inset-top)) !important;
  right: max(24px, env(safe-area-inset-right)) !important;
  left: auto !important;
  width: auto !important;
  max-width: max-content !important;
}

/* Custom Photo Viewer */
.custom-image-wrapper {
  position: relative;
  background-color: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  width: 100%;
  min-height: 480px;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  user-select: none;
}

.custom-image-element {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
  transition: transform 0.25s ease;
}

.image-overlay-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.btn-image-action {
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-image-action:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  transform: translateY(-1px);
}

.custom-image-wrapper:fullscreen,
.custom-image-wrapper:-webkit-full-screen,
.custom-image-wrapper.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  background: #000000 !important;
  z-index: 999999 !important;
}

.custom-image-wrapper:fullscreen .custom-image-element,
.custom-image-wrapper:-webkit-full-screen .custom-image-element,
.custom-image-wrapper.is-fullscreen .custom-image-element {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

/* Photo Navigation Buttons (Left / Right Arrows) */
.photo-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 20, 24, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
  opacity: 0.85;
}

.photo-nav-btn:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 10px 28px rgba(255, 107, 0, 0.4);
}

.photo-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-photo-btn {
  left: 20px;
}

.next-photo-btn {
  right: 20px;
}

.custom-image-wrapper:fullscreen .prev-photo-btn,
.custom-image-wrapper:-webkit-full-screen .prev-photo-btn,
.custom-image-wrapper.is-fullscreen .prev-photo-btn {
  left: 32px;
  width: 60px;
  height: 60px;
}

.custom-image-wrapper:fullscreen .next-photo-btn,
.custom-image-wrapper:-webkit-full-screen .next-photo-btn,
.custom-image-wrapper.is-fullscreen .next-photo-btn {
  right: 32px;
  width: 60px;
  height: 60px;
}

@media (max-width: 640px) {
  .photo-nav-btn {
    width: 42px;
    height: 42px;
  }
  .prev-photo-btn {
    left: 10px;
  }
  .next-photo-btn {
    right: 10px;
  }
}

/* Photo Index Badge */
.photo-index-pill {
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffffff;
}

/* Em vídeos verticais (aspect-9-16 / is-vertical), oculta os botões: Definir capa, Baixar e Comentários */
.custom-player-wrapper.is-vertical #btnSetFrameAsCover,
.custom-player-wrapper.is-vertical #btnResetFrameCover,
.custom-player-wrapper.is-vertical #btnDownload,
.custom-player-wrapper.is-vertical #btnPlayerToggleComments,
.custom-player-wrapper.aspect-9-16 #btnSetFrameAsCover,
.custom-player-wrapper.aspect-9-16 #btnResetFrameCover,
.custom-player-wrapper.aspect-9-16 #btnDownload,
.custom-player-wrapper.aspect-9-16 #btnPlayerToggleComments {
  display: none !important;
}

/* Na versão mobile (telas menores que 768px), oculta esses botões da barra do player e otimiza controles/fotos */
@media (max-width: 768px) {
  #btnSetFrameAsCover,
  #btnResetFrameCover,
  #btnDownload,
  #btnPlayerToggleComments {
    display: none !important;
  }

  .volume-group .volume-slider {
    display: none !important;
  }

  .player-controls-bar {
    padding: 16px 10px 10px 10px;
    gap: 6px;
  }

  .player-controls-left,
  .player-controls-right {
    gap: 4px;
  }

  .player-timecode {
    font-size: 11px;
    white-space: nowrap;
  }

  .center-play-btn {
    width: 62px;
    height: 62px;
  }

  .center-play-btn svg {
    width: 28px;
    height: 28px;
  }

  .custom-image-wrapper {
    min-height: 240px;
    max-height: 72vh;
    padding: 10px 10px 54px 10px;
  }

  .custom-image-element {
    max-height: 62vh;
  }

  .image-overlay-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-image-action {
    padding: 6px 10px;
    font-size: 11px;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .custom-player-wrapper:not(.is-fullscreen) .frame-step-btn {
    display: none !important;
  }
}

.custom-image-wrapper.is-loading-photo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  margin-left: -14px;
  border: 2.5px solid rgba(255, 84, 0, 0.25);
  border-top-color: var(--brand-orange, #FF5400);
  border-radius: 50%;
  animation: spinnerRotate 0.75s linear infinite;
  z-index: 15;
  pointer-events: none;
}




