/* ==========================================================================
   GUNERY × GRUPO MÉDICO — MOBILE-FIRST APP STYLESHEET
   Optimized for Dr. Mario's Smartphone Experience
   ========================================================================== */

/* Bottom Navigation Bar for Mobile */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  z-index: 900;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-medium);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

@media (min-width: 900px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  padding: 0.25rem;
  position: relative;
}

.bottom-nav-item .nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.bottom-nav-item.active {
  color: var(--gm-teal);
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.15);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--gm-teal);
  border-radius: var(--radius-full);
}

/* Mobile Viewport Refinements */
@media (max-width: 768px) {
  .app-container {
    padding: 1.25rem 0.85rem 7.5rem 0.85rem;
  }

  .header-inner {
    padding: 0.65rem 0.85rem;
  }

  .brand-partnership {
    gap: 0.5rem;
  }

  .brand-logo-gm {
    height: 26px;
  }

  .brand-divider {
    height: 20px;
  }

  .brand-logo-gg {
    height: 20px;
  }

  .header-controls {
    gap: 0.4rem;
  }

  .lang-toggle-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
  }

  .btn-icon {
    width: 32px;
    height: 32px;
  }

  /* Views Toolbar on Mobile */
  .views-toolbar {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    gap: 0.75rem;
  }

  .views-toolbar .nav-tabs-group {
    display: none; /* Controlled by mobile bottom nav */
  }

  .filter-search-group {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .search-input {
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem 0.5rem 2rem;
  }

  .category-select {
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
    max-width: 140px;
  }

  /* Pulse Section on Mobile */
  .pulse-section {
    margin: 1.75rem 0 1rem 0;
  }

  .pulse-card {
    padding: 1rem;
    gap: 1rem;
  }

  .pulse-title {
    font-size: 0.75rem;
  }

  .countdown-num {
    font-size: 0.95rem;
  }

  .countdown-box {
    padding: 0.25rem 0.5rem;
  }

  .next-shoot-card {
    padding: 1rem;
    gap: 0.6rem;
  }

  .next-shoot-date-main {
    font-size: 1.05rem;
  }

  .video-pill-title {
    font-size: 0.88rem;
  }

  .integrated-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.65rem 0.75rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  /* Kanban Video Cards on Mobile */
  .kanban-board {
    gap: 0.85rem;
  }

  .kanban-col {
    min-height: auto;
    max-height: none;
    border-radius: var(--radius-md);
  }

  .kanban-col-cards {
    padding: 0.65rem;
    gap: 0.65rem;
  }

  .video-card {
    padding: 0.85rem;
    gap: 0.6rem;
  }

  .video-card-title {
    font-size: 0.88rem;
  }

  /* Mobile Bottom Sheet Modal */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    max-height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin: 0;
    width: 100%;
    transform: translateY(100%);
  }

  .modal-overlay.open .modal-dialog {
    transform: translateY(0);
  }

  /* Modal Handle Bar */
  .modal-dialog::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border-medium);
    border-radius: var(--radius-full);
    margin: 0.6rem auto 0.2rem auto;
  }

  .modal-header {
    padding: 1.1rem 1.15rem 0.5rem 1.15rem;
    gap: 0.75rem;
  }

  .modal-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin-top: 0.2rem;
  }

  .modal-tabs-nav {
    margin: 0.75rem 1rem 0.35rem 1rem;
    padding: 0.35rem 0.45rem;
    gap: 0.35rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-subtle);
  }

  .modal-tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .modal-body {
    padding: 1.15rem 1rem;
    max-height: calc(92vh - 160px);
  }

  /* Mobile Teleprompter Screen */
  .prompter-studio-container {
    gap: 0.85rem;
  }

  .prompter-toolbar {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .prompter-timer-badge {
    font-size: 1.25rem;
  }

  .prompter-viewport {
    padding: 1.25rem 1rem;
    min-height: 280px;
    max-height: 380px;
    font-size: 20px !important; /* Perfect mobile reading size */
    border-radius: var(--radius-md);
  }

  .prompter-script-list {
    gap: 1rem;
    padding-bottom: 5rem;
  }

  .prompter-line-item {
    padding: 0.85rem 1rem;
  }

  .prompter-text {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  /* Compact Audio Takes Bar */
  .takes-vault-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .take-item-card {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .take-meta audio {
    max-width: 130px;
    height: 28px;
  }

  /* Mobile Script Table Cards */
  .script-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
  }

  .timecode-chip {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
  }

  /* Mobile Comments & Role Badges */
  .comment-card {
    padding: 0.85rem;
    gap: 0.5rem;
  }

  .comment-role-pill {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    white-space: nowrap;
  }

  .comment-content {
    font-size: 0.82rem;
  }

  .reply-item {
    padding: 0.5rem 0.65rem;
  }
}

