/* Custom Brand Properties */
:root {
  --bg-main: #12141c;
  --bg-sidebar: #0b0d13;
  --bg-card: #1d2030;
  --bg-card-hover: #262a3f;
  --bg-active: #2f344e;
  
  --text-main: #f1f3f9;
  --text-muted: #9ba3b8;
  
  --brand-rose: #d6336c;
  --brand-rose-glow: rgba(214, 51, 108, 0.4);
  --brand-gold: #fcc419;
  
  --color-green: #2b8a3e;
  --color-green-light: #40c057;
  --color-yellow: #e67e22;
  --color-yellow-light: #f1c40f;
  --color-red: #c92a2a;
  --color-red-light: #fa5252;
  
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.app-header {
  height: 70px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
}

.header-logo h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--brand-rose);
  background: rgba(214, 51, 108, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.month-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-selector-group label {
  font-size: 14px;
  color: var(--text-muted);
}

.month-selector-group select {
  font-family: inherit;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-speed);
}

.month-selector-group select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons & Badges */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-rose);
  color: white;
  box-shadow: 0 4px 12px var(--brand-rose-glow);
}

.btn-primary:hover {
  background-color: #f73b7a;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn input[type="file"] {
  display: none;
}

.btn-success {
  background-color: var(--color-green);
  color: white;
}

.btn-success:hover {
  background-color: var(--color-green-light);
}

.btn-success-outline {
  background: transparent;
  color: var(--color-green-light);
  border: 2px solid var(--color-green);
}

.btn-success-outline.active {
  background: var(--color-green);
  color: white;
}

.btn-danger {
  background-color: var(--color-red);
  color: white;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background-color: var(--bg-card);
}

.badge-active {
  background-color: rgba(43, 138, 62, 0.2);
  color: var(--color-green-light);
  border: 1px solid var(--color-green);
}

.badge-inactive {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Layout */
.app-main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 70px);
}

/* Sidebar */
.app-sidebar {
  width: 380px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-section {
  padding: 20px;
}

.filters-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filters-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.filter-group {
  margin-bottom: 12px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.filter-group select {
  width: 100%;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}

.progress-bar-container {
  margin-top: 15px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-track {
  height: 6px;
  background-color: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background-color: var(--brand-rose);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Video List */
.list-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.list-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.video-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
}

/* Scrollbar customization */
.video-list::-webkit-scrollbar,
.prompter-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.video-list::-webkit-scrollbar-thumb,
.prompter-scroll-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Video List Item Card */
.video-item-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.video-item-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateX(4px);
}

.video-item-card.active {
  background-color: var(--bg-active);
  border-color: var(--brand-rose);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.video-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-rose);
}

.status-indicator {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-completed {
  color: var(--color-green-light);
}

.status-pending {
  color: var(--text-muted);
}

.status-uploading {
  color: #339af0;
  animation: statusPulse 1.5s infinite ease-in-out;
}

@keyframes statusPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.intent-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.intent-verde { background-color: rgba(43, 138, 62, 0.15); color: var(--color-green-light); }
.intent-amarillo { background-color: rgba(230, 126, 34, 0.15); color: var(--color-yellow-light); }
.intent-rojo { background-color: rgba(201, 42, 42, 0.15); color: var(--color-red-light); }

/* Main Detail Panel */
.app-content-detail {
  flex: 1;
  background-color: var(--bg-main);
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

/* Welcome state */
.detail-welcome-state {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.welcome-box {
  text-align: center;
  max-width: 450px;
}

.welcome-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 20px;
}

.welcome-box h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.welcome-box p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Active detail state */
.detail-active-state {
  display: flex;
  flex-direction: column;
  gap: 25px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.video-id-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-rose);
  background-color: rgba(214, 51, 108, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.title-area h2 {
  font-size: 24px;
  font-weight: 700;
}

/* Metadata Grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.meta-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.meta-icon {
  font-size: 24px;
}

.meta-info {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-val {
  font-size: 15px;
  font-weight: 600;
}

/* Detail sections */
.detail-section {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
}

.detail-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.setup-col h4 {
  font-size: 12px;
  color: var(--brand-rose);
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.setup-col p {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.setup-col p strong {
  color: var(--text-muted);
}

/* Script block styling */
.script-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.script-block {
  background-color: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--brand-rose);
  padding: 15px;
  border-radius: 0 8px 8px 0;
}

.hook-block { border-left-color: var(--color-yellow-light); }
.body-block { border-left-color: var(--brand-rose); }
.cta-block { border-left-color: var(--color-green-light); }

.block-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.script-block p {
  font-size: 16px;
  line-height: 1.6;
}

/* Copy Instagram Display */
.copy-display-box {
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  max-height: 200px;
  overflow-y: auto;
}

.copy-display-box pre {
  font-family: inherit;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Teleprompter Overlay Modal */
.prompter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050608;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.prompter-controls-bar {
  height: 80px;
  background-color: #0b0d13;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.prompter-title {
  font-size: 18px;
  font-weight: 600;
}

.prompter-title span {
  color: var(--brand-rose);
  font-weight: 700;
}

.prompter-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-ctrl {
  background-color: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-ctrl:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.speed-slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.speed-slider-group input {
  width: 120px;
}

/* Teleprompter Scroll Container */
.prompter-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 60px 0;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
}

.prompter-text-wrapper {
  max-width: 800px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 300px; /* Space to scroll content all the way to the top */
}

.prompter-section-label {
  color: var(--brand-rose);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 20px;
}

.prompter-p {
  font-size: 38px; /* Standard starting size for prompter reading */
  line-height: 1.6;
  font-weight: 600;
  transition: font-size 0.2s ease;
}

.prompter-p.hook { color: #ffe066; }
.prompter-p.body { color: #e9ecef; }
.prompter-p.cta { color: #8ce99a; }

/* Helpers */
.hidden {
  display: none !important;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.mobile-only-btn {
  display: none !important;
}

/* ==========================================
   📱 Responsive Styles (Mobile-First Switch)
   ========================================== */
@media (max-width: 767px) {
  .mobile-only-btn {
    display: inline-flex !important;
  }

  .app-header {
    height: auto;
    padding: 10px !important;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .header-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .month-selector-group {
    grid-column: span 2;
    width: 100% !important;
    justify-content: center;
    gap: 6px;
    display: inline-flex;
  }

  .month-selector-group select {
    max-width: 200px !important;
    width: 100% !important;
  }

  .header-actions .btn,
  .header-actions .badge {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
    padding: 8px 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
    line-height: 1.2 !important;
    display: inline-flex;
    align-items: center;
  }

  #drive-status {
    grid-column: span 2;
  }

  html {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box;
  }

  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    height: auto !important;
    box-sizing: border-box;
  }

  .app-main-layout {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    position: relative;
    flex-direction: column !important;
    box-sizing: border-box;
  }

  /* List vs Detail toggle logic on mobile */
  .app-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    box-sizing: border-box;
  }

  .list-section {
    height: auto !important;
    overflow: visible !important;
  }

  .video-list {
    overflow-y: visible !important;
    max-height: none !important;
  }

  .app-content-detail {
    width: 100% !important;
    height: auto !important;
    padding: 15px;
    display: none !important;
    overflow: visible !important;
  }

  .detail-section {
    padding: 15px !important;
  }

  .detail-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding-bottom: 15px !important;
  }

  #back-to-list-btn {
    align-self: flex-start !important;
    width: auto !important;
  }

  .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    border-bottom: none !important;
  }

  .section-header div {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  .section-header div .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  /* When a video is selected, show detail and hide list */
  body.show-detail .app-sidebar {
    display: none !important;
  }

  body.show-detail .app-content-detail {
    display: flex !important;
  }

  /* Grid adaptations */
  .metadata-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .setup-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Teleprompter mobile controls */
  .prompter-controls-bar {
    height: auto;
    flex-direction: column;
    padding: 15px;
    gap: 12px;
  }

  .prompter-title {
    font-size: 15px;
    text-align: center;
  }

  .prompter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    align-items: center !important;
    box-sizing: border-box;
  }

  #font-decrease-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-right: 15px !important;
  }

  #font-increase-btn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    margin-left: 15px !important;
  }

  .speed-slider-group {
    grid-column: span 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 4px 0 !important;
  }

  .speed-slider-group input {
    flex: 1 !important;
    max-width: 220px !important;
  }

  #prompter-play-btn {
    grid-column: span 2 !important;
    grid-row: 3 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #btn-toggle-camera-panel {
    grid-column: 1 !important;
    grid-row: 4 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  #close-prompter-btn {
    grid-column: 2 !important;
    grid-row: 4 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .prompter-p {
    font-size: 26px; /* Smaller base size on phone screen */
  }
}

/* Checkbox and Visibility Filters */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
  user-select: none;
  transition: color var(--transition-speed);
}

.checkbox-container:hover {
  color: var(--brand-rose);
}

.checkbox-container input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-rose);
  cursor: pointer;
}

.checkbox-label {
  font-weight: 500;
}

/* Detail Title Badges and Status Indicators */
.title-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.title-badges .video-id-badge {
  margin-bottom: 0;
}

.status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  transition: all var(--transition-speed);
}

.status-badge.status-completed {
  background-color: rgba(43, 138, 62, 0.15);
  color: var(--color-green-light);
  border: 1px solid rgba(43, 138, 62, 0.3);
}

.status-badge.status-pending {
  background-color: rgba(230, 126, 34, 0.15);
  color: var(--color-yellow-light);
  border: 1px solid rgba(230, 126, 34, 0.3);
}

/* ==========================================
   🎬 Granular Recording & Camera Styles
   ========================================== */

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.block-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-speed);
  user-select: none;
}

.section-check-label:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.section-check-label input[type="checkbox"] {
  accent-color: var(--color-green-light);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  background-color: rgba(214, 51, 108, 0.1);
  border: 1px solid rgba(214, 51, 108, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-upload-file:hover {
  background-color: rgba(214, 51, 108, 0.2);
  border-color: rgba(214, 51, 108, 0.4);
  transform: translateY(-1px);
}

.btn-upload-file.uploaded {
  background-color: rgba(43, 138, 62, 0.1);
  border: 1px solid rgba(43, 138, 62, 0.3);
  color: var(--color-green-light);
}

.btn-upload-file.uploaded:hover {
  background-color: rgba(43, 138, 62, 0.2);
  border-color: rgba(43, 138, 62, 0.5);
  transform: translateY(-1px);
}

/* Teleprompter Camera Layout */
.prompter-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 80px);
  position: relative;
}

.prompter-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 60px 0;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
  transition: all 0.3s ease;
}

.camera-panel {
  width: 400px;
  background-color: #0b0d13;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
  z-index: 10;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.camera-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.camera-header h3 {
  font-size: 16px;
  color: var(--text-main);
}

.camera-section-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.camera-section-selector label {
  font-size: 12px;
  color: var(--text-muted);
}

.camera-section-selector select {
  font-family: inherit;
  font-size: 14px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.camera-box {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #000;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--brand-rose);
  box-shadow: 0 0 15px var(--brand-rose-glow);
}

#webcam-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-indicator {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--color-red);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.camera-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.save-controls {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.save-controls h4 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.saved-filename-label {
  font-size: 12px;
  word-break: break-all;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: 6px;
}

.save-actions {
  display: flex;
  gap: 10px;
}

.save-actions .btn {
  flex: 1;
  justify-content: center;
}

.drive-icon {
  color: #4285f4;
  font-size: 16px;
  line-height: 1;
}

#btn-connect-drive:hover .drive-icon {
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

/* Stacking for smaller viewports */
@media (max-width: 1024px) {
  .prompter-workspace {
    flex-direction: column;
  }
  .camera-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 300px;
  }
}

/* Small Button Class */
.btn-sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* Edit Mode Styles */
.script-block p[contenteditable="true"],
.copy-display-box pre[contenteditable="true"] {
  cursor: text;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 10px;
  border-radius: 6px;
  outline: none;
  transition: all var(--transition-speed);
}

.script-block p[contenteditable="true"]:focus,
.copy-display-box pre[contenteditable="true"]:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-style: solid;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Specific border focus colors based on section blocks */
.hook-block p[contenteditable="true"]:focus {
  border-color: var(--color-yellow-light);
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}

.body-block p[contenteditable="true"]:focus {
  border-color: var(--brand-rose);
  box-shadow: 0 0 10px var(--brand-rose-glow);
}

.cta-block p[contenteditable="true"]:focus {
  border-color: var(--color-green-light);
  box-shadow: 0 0 10px rgba(64, 192, 87, 0.2);
}

.btn-toggle-edit-active {
  background-color: var(--brand-rose) !important;
  color: white !important;
  box-shadow: 0 4px 12px var(--brand-rose-glow);
}


