/* =====================================================
   TABLET & MOBILE DOCK LAYOUT — Estilos de navegación y lectura
   ===================================================== */

/* =====================================================
   FASE 2 — MOBILE DOCK PREMIUM (≤600px)
   Mejoras del bottom nav y experiencia de lectura
   ===================================================== */

@media (max-width: 600px) {

  /* ── Bottom Dock más premium ─────────────────────── */
  .mode-tabs {
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 600px;
    bottom: max(14px, env(safe-area-inset-bottom, 10px));
    padding: 5px 4px;
    border-radius: 26px;
    background: var(--studio-panel);
    border: 1px solid var(--studio-line);
    box-shadow: var(--studio-shadow-soft);
  }

  .mode-tab {
    min-height: 52px;
    padding: 6px 4px;
    gap: 3px;
    border-radius: 20px;
    flex: 1;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    color: rgba(255, 255, 255, 0.42);
    transition: background 0.2s ease, color 0.2s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  [data-theme="light"] .mode-tab {
    color: rgba(0, 0, 0, 0.36);
  }

  .mode-tab:active {
    transform: scale(0.92);
  }

  /* Tab activo con acento del skin */
  .mode-tab.active {
    background: color-mix(in srgb, var(--studio-accent) 20%, rgba(255, 255, 255, 0.06));
    color: var(--studio-accent);
    box-shadow: none;
  }

  [data-theme="light"] .mode-tab.active {
    background: color-mix(in srgb, var(--studio-accent) 13%, rgba(255, 255, 255, 0.92));
    color: var(--studio-accent);
  }

  /* Punto indicador bajo el icono en tab activo */
  .mode-tab.active::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--studio-accent);
    margin: 1px auto 0;
  }

  .custom-tab-img {
    width: 22px;
    height: 22px;
  }

  [data-theme="light"] .mode-tab:not(.active) .custom-tab-img {
    filter: brightness(0) opacity(0.42);
  }

  /* Tab activa en tema claro: icono dorado para que no aparezca con fondo blanco */
  [data-theme="light"] .mode-tab.active .custom-tab-img {
    filter: brightness(0) sepia(1) saturate(5) hue-rotate(5deg) opacity(0.85);
  }

  /* Tab activa en tema oscuro: icono dorado/acento */
  [data-theme="dark"] .mode-tab.active .custom-tab-img {
    filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(5deg) opacity(0.9);
  }

  /* ── Header compacto en mobile ───────────────────── */
  header {
    padding: 8px 10px !important;
    min-height: 48px !important;
  }

  .header-content {
    min-height: 36px !important;
    gap: 4px !important;
  }

  #mainTitle {
    font-size: 1.04rem !important;
    font-family: 'Cinzel', var(--font-title);
    letter-spacing: 0.03em !important;
    color: #f7eedb;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px !important;
    flex-shrink: 0;
  }

  .app-logo {
    width: 32px !important;
    height: 32px !important;
  }

  #mainTitle .title-brit {
    font-size: 10px !important;
  }

  #mainTitle .title-bible {
    font-size: 13px !important;
    letter-spacing: 0.04em !important;
  }

  /* ── Lectura con más aire ────────────────────────── */
  .content {
    padding: 20px 18px 160px;
  }

  .verse {
    padding: 8px 12px 8px 14px;
  }

  .verse-number {
    font-size: 0.7rem;
    opacity: 0.82;
  }

  /* ── Referencia editorial ────────────────────────── */
  .reference.visible {
    padding: 16px 18px 4px;
    font-size: 1.06rem;
  }

  /* ── FAB mejor posición ──────────────────────────── */
  .floating-action-button {
    right: 16px;
    bottom: 88px;
  }

  /* ── Modal acciones como bottom sheet ───────────── */
  #verseActionsModal {
    align-items: flex-end;
  }

  .verse-actions-modal-content {
    border-radius: 28px 28px 22px 22px;
    padding-bottom: 85px;
  }
}

.modal {
  z-index: 2000 !important;
}

.ia-panel-wrapper {
  z-index: 1500 !important;
}

/* =====================================================
   FASE 2 — TABLET MEJORAS GENERALES (601–1179px)
   ===================================================== */

@media (min-width: 601px) and (max-width: 1179px) {

  /* Tabs superiores más elegantes */
  .mode-tab {
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
  }

  /* Mejor padding de lectura */
  .content {
    padding: 32px clamp(32px, 6vw, 72px) 52px;
  }

  .reference {
    padding-inline: clamp(32px, 6vw, 72px);
  }


  /* Panel IA en tablet: drawer de pantalla completa sin bordes redondeados */
  .ia-panel-wrapper.ia-open {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: var(--studio-shadow) !important;
  }

}

