/* ===================== */
/* 14. PANEL STRONG      */
/* ===================== */

/* Versículo con Strong */
.strong-verse {
  margin-bottom: 20px;
  line-height: 2.4;
  text-align: justify;
}

.strong-verse .verse-number {
  font-weight: bold;
  color: var(--accent);
  margin-right: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.strong-word-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 1px;
  vertical-align: bottom;
  position: relative;
}

.strong-code {
  font-size: 0.55em;
  color: var(--accent);
  opacity: 0.7;
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  transition: all 0.2s ease;
  padding: 1px 3px;
  border-radius: 3px;
  user-select: none;
}

.strong-code:hover {
  opacity: 1;
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.strong-code.active {
  opacity: 1;
  background: var(--accent);
  color: white;
}

.strong-word-text {
  line-height: 1.4;
}

.strong-plain-word {
  margin: 0 1px;
}

/* Panel Inferior Strong */
.strong-bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-container);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  transition: max-height 0.4s ease, padding 0.4s ease;
  z-index: 1000;
  padding: 0 20px;
}

.strong-bottom-panel.open {
  max-height: 55vh;
  padding: 16px 20px;
}

.strong-bottom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.strong-bottom-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.strong-code-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
}

.strong-ref-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===================== */
/* CONTROLES STRONG      */
/* (Minimizar, Maximizar, Cerrar) */
/* ===================== */

.strong-bottom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.strong-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.45;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, color 0.2s ease;
    border-radius: 4px;
    line-height: 1;
}

.strong-control-btn:hover {
    opacity: 0.85;
    color: var(--accent);
}

.strong-control-btn:active {
    opacity: 1;
}

/* Estado minimizado */
.strong-bottom-panel.minimized {
    max-height: 55vh !important;
    padding: 16px 20px !important;
    transform: translateY(calc(100% - 52px));
}

.strong-bottom-panel.minimized .strong-bottom-content {
    display: none;
}

/* Estado maximizado: desde el header hacia abajo, tapando las pestañas */
.strong-bottom-panel.maximized {
    position: fixed;
    top: var(--app-header-height, 56px); /* solo la altura del <header> */
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    max-height: none !important;
    border-radius: 0;
    transform: translateY(0) !important;
    padding: 16px 20px;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.strong-bottom-panel.maximized .strong-bottom-content {
    max-height: none;
    flex: 1;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.strong-bottom-panel.maximized .strong-bottom-content {
    max-height: none;
    flex: 1;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.strong-bottom-content {
  overflow-y: auto;
  max-height: calc(55vh - 70px);
  padding-right: 8px;
}

/* Lista de referencias */
.strong-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.strong-ref-item {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-filters);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.strong-ref-item:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.strong-ref-item .ref-testament {
  font-size: 0.75rem;
  margin-right: 2px;
}

/* Paginación panel Strong */
.strong-ref-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 0 4px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.strong-ref-pagination .pagination-btn {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.strong-ref-pagination .pagination-info {
  font-size: 0.8rem;
}

.strong-bottom-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* Referencias detalladas */
.strong-ref-list-detailed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.strong-bottom-content .search-result-card {
  margin-bottom: 0;
  background: var(--bg-filters);
  border-left-width: 3px;
}

.strong-bottom-content .search-result-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 4px;
  color: var(--text-main);
}

.strong-bottom-content .search-pagination {
  padding: 15px 0;
  gap: 10px;
}

.strong-bottom-content .pagination-btn {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* ===================== */
/* TABS DEL DICCIONARIO  */
/* ===================== */
.strong-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.strong-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
}

.strong-tab:hover {
  color: var(--accent);
}

.strong-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===================== */
/* ENTRADA DICCIONARIO   */
/* ===================== */
.strong-dict-entry {
  padding: 0 0.25rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.strong-dict-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.strong-dict-lemma {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.strong-dict-translit {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
}

.strong-dict-pronun {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Badges diccionario */
.strong-dict-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.strong-dict-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.strong-dict-badge.lang   { background: #dbeafe; color: #1d4ed8; }
.strong-dict-badge.morph  { background: #fef3c7; color: #92400e; }
.strong-dict-badge.speech { background: #f3f4f6; color: #374151; }

[data-theme="dark"] .strong-dict-badge.lang   { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .strong-dict-badge.morph  { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .strong-dict-badge.speech { background: #374151; color: #d1d5db; }

/* Secciones contenido */
.strong-dict-section {
  margin-bottom: 0.65rem;
}

.strong-dict-section.kjv {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0.375rem 0.375rem 0;
}

.strong-dict-section.exegesis {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0.375rem 0.375rem 0;
}

[data-theme="dark"] .strong-dict-section.kjv {
  background: #1e3a5f;
  border-left-color: #3b82f6;
}

[data-theme="dark"] .strong-dict-section.exegesis {
  background: #451a03;
  border-left-color: #f59e0b;
}

.strong-dict-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.strong-dict-section p {
  margin: 0;
  color: var(--text-main);
}

/* Relaciones */
.strong-dict-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.strong-dict-rel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg-filters);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.strong-dict-rel-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

.rel-code     { font-weight: 700; color: var(--accent); }
.rel-translit { font-style: italic; color: var(--text-muted); }
.rel-type     { color: var(--text-muted); font-size: 0.7rem; }

.strong-dict-empty {
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* ===================== */
/* 9. RESPONSIVE         */
/* ===================== */
@media (max-width: 600px) {
  
  /* Body y Container fullscreen móvil */
  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
  }

  body {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .container {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  header,
  .mode-tabs,
  #panelLectura,
  #panelComparacion,
  #panelConcordancia,
  .reference {
    flex-shrink: 0;
  }

  .content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
  }

  /* Tabs compactos */
  .mode-tabs {
    padding: 0 8px;
    gap: 3px;
  }

  .mode-tab {
    padding: 10px 4px;
    font-size: 0.8rem;
  }

  .tab-text { display: none; }
  .tab-icon { font-size: 1.4rem; }

  /* Mostrar toggle filtros */
  .filters-toggle { display: flex; }

  /* Filtros 2 columnas */
  .filters {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 10px;
  }

  .filters .filter-group:first-child,
  .filters .filter-group:last-child {
    grid-column: 1 / -1;
  }

  .concordancia-filters { grid-template-columns: 1fr 1fr; }
  .search-input-group   { grid-column: 1 / -1; }

  select, input[type="text"] {
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .filter-group label { font-size: 0.78rem; }
  .reference { padding: 0 16px; }

  /* Búsqueda */
  .search-wrapper     { flex-direction: column; }
  .search-stats       { flex-direction: column; text-align: center; }
  .search-pagination  { flex-direction: column; }

  /* Comparación */
  .comp-row    { grid-template-columns: 1fr; }
  .comp-header { grid-template-columns: 1fr 1fr; }

  /* Pista orientación */
  .filters-toggle-left {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
  }

  .filters-toggle-ref {
    max-width: 150px;
    flex-shrink: 1;
  }

  .orientation-hint {
    display: flex;
  }

  /* Modal y FAB */
  .modal-content {
    width: 95%;
    padding: 15px;
    border-radius: 0;
  }

  .floating-action-button {
    bottom: 15px;
    right: 15px;
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  /* Panel Strong responsive */
.strong-bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-container);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  transition: max-height 0.4s ease, padding 0.4s ease, transform 0.3s ease, height 0.3s ease;
  z-index: 1000;
  padding: 0 20px;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
}

  .strong-bottom-content {
    max-height: calc(65vh - 70px);
  }

  .strong-code {
    font-size: 0.5em;
  }

  .strong-ref-item {
    padding: 4px 8px;
    font-size: 0.78rem;
  }

  .strong-code-badge {
    font-size: 0.85rem;
    padding: 3px 10px;
  }

  .strong-tab {
    font-size: 0.78rem;
    padding: 0.4rem 0.5rem;
  }

  .strong-dict-lemma   { font-size: 1.3rem; }
  .strong-dict-translit { font-size: 0.9rem; }

  /* Panel ajustes */
  .settings-panel {
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .settings-item {
    justify-content: space-between;
  }

  .settings-item > label:first-child {
    font-size: 0.9rem;
  }
}
