/* ===================================================== */
/* COMPONENTES MODULARES (IMPORTADOS)                   */
/* ===================================================== */
@import url('./components/concordancia.css');
@import url('./components/comparison.css');
@import url('./components/settings-panel.css');
@import url('./components/highlights.css');
@import url('./components/toasts.css');

/* ===================== */
/* 3. HEADER Y SWITCH    */
/* ===================== */
header {
  background: var(--bg-header);
  color: white;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-content {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px;
}

.header-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0;
}

#mainTitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  letter-spacing: 0.3px;
  font-family: var(--font-ui);
}

/* Theme Switch */
.switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background-color: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(22px);
}

/* Font Switch */
.font-switch-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
}

.font-switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
}

.font-label-right {
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-ui);
  color: rgba(255, 255, 255, 0.8);
  user-select: none;
  line-height: 1;
}

.font-track {
  position: relative;
  display: inline-block;
  width: 68px;
  height: 26px;
  min-width: 68px;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 34px;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.font-knob {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  color: #1e3a5f;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  user-select: none;
}

/* Estilo para el selector de idioma */
.language-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.language-select:hover {
  border-color: #999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-select:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 4px rgba(0, 102, 204, 0.3);
}

[data-theme="dark"] .language-select {
  background: #333;
  color: #fff;
  border-color: #555;
}

[data-theme="dark"] .language-select:hover {
  border-color: #777;
}

/* ===================== */
/* 4. TABS DE MODO       */
/* ===================== */
.mode-tabs {
  display: flex;
  background: var(--bg-header);
  padding: 8px 16px;
  gap: 4px;
}

.mode-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.mode-tab.active {
  background: var(--bg-container);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tab-text {
  white-space: nowrap;
}

.custom-tab-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  pointer-events: none;
  transition: filter 0.3s ease;
}

[data-theme="dark"] .custom-tab-img {
  filter: invert(1);
}

/* ===================== */
/*   FAB MULTIFUNCIÓN     */
/* ===================== */
.floating-action-button {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: 32px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(102, 126, 234, 0.45),
    0 12px 40px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
  animation: fabSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.02em;
  white-space: nowrap;
}


.floating-action-button:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 10px 28px rgba(102, 126, 234, 0.55),
    0 16px 48px rgba(0, 0, 0, 0.22);
}

.floating-action-button:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 4px 12px rgba(102, 126, 234, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.14);
}

@keyframes fabSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fab-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

#selectedVersesCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-ui);
  line-height: 1;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 28px 32px;
  background: var(--bg-filters);
  border-bottom: 1px solid var(--border);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.filter-group label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select,
.btn-search,
input[type="text"] {
  width: 100%;
  text-overflow: ellipsis;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--bg-container);
  color: var(--text-main);
  font-family: var(--font-ui);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

select:hover {
  border-color: var(--accent);
}

select:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(102, 126, 234, 0.15));
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.btn-search {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-ui);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.btn-search:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.btn-search:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.btn-search:active {
  transform: translateY(0);
  opacity: 1;
}

.btn-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filters-toggle {
  display: flex;
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-filters);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: inherit;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filters-toggle:hover {
  background: var(--card-hover);
}

.filters-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.filters-toggle-ref {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.filters-toggle-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-commentary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-container, #ffffff));
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  color: var(--accent);
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  font-family: var(--font-ui, 'Inter', -apple-system, sans-serif);
  font-size: 0.76rem;
  font-weight: 600;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.filter-commentary-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

.filter-commentary-btn:active {
  transform: scale(0.97);
}

.filter-commentary-icon {
  font-size: 0.72rem;
  color: inherit;
}

[data-theme="dark"] .filter-commentary-btn {
  background: color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.4));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

/* ── BOTÓN INFO 'i' Y PERGAMINO 'scroll' CIRCULARES EN LA BARRA DE FILTROS ── */
.filter-info-btn,
.filter-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-container, #ffffff));
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-family: inherit;
}

.filter-info-btn:hover,
.filter-scroll-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

.filter-info-btn:active,
.filter-scroll-btn:active {
  transform: scale(0.94);
}

.filter-scroll-btn.active {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: scale(1.04);
}

.filter-info-icon,
.filter-scroll-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

[data-theme="dark"] .filter-info-btn,
[data-theme="dark"] .filter-scroll-btn {
  background: color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.4));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

/* ── MODAL FLOTANTE DE INFORMACIÓN DE VERSIÓN ── */
.version-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.version-info-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.version-info-modal {
  background: var(--bg-container, #ffffff);
  color: var(--text, #2d3748);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.version-info-modal-overlay.show .version-info-modal {
  transform: scale(1) translateY(0);
}

[data-theme="dark"] .version-info-modal {
  background: #1e222b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.6);
}

.version-info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-container, #ffffff));
}

[data-theme="dark"] .version-info-modal-header {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.modal-header-icon {
  font-size: 1.15rem;
}

.modal-header-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  letter-spacing: -0.01em;
}

.version-info-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted, #718096);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.version-info-modal-close:hover {
  color: var(--text, #1a202c);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .version-info-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.version-info-modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.version-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.07));
}

.version-info-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.version-info-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  line-height: 1.35;
}

.version-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.version-info-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #718096);
}

.version-info-val {
  font-size: 0.88rem;
  line-height: 1.48;
  color: var(--text, #2d3748);
}

[data-theme="dark"] .version-info-val {
  color: #e2e8f0;
}

.version-info-note {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.8rem;
  color: var(--text-muted, #718096);
  line-height: 1.42;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 4px;
}

[data-theme="dark"] .version-info-note {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

.version-info-modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  display: flex;
  justify-content: flex-end;
  background: color-mix(in srgb, var(--bg-container, #ffffff) 97%, black);
}

[data-theme="dark"] .version-info-modal-footer {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.08);
}

.version-info-btn-confirm {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 30%, transparent);
}

.version-info-btn-confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.return-full-chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px 7px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-container, #ffffff));
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  font-family: var(--font-ui, 'Inter', -apple-system, sans-serif);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.return-full-chapter-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 35%, transparent);
}

.return-full-chapter-btn:active {
  transform: scale(0.97);
}

.return-full-chapter-btn .return-icon {
  flex-shrink: 0;
  stroke: currentColor;
}

[data-theme="dark"] .return-full-chapter-btn {
  background: color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.45));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.filters-toggle-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  flex-shrink: 0;
}


.filters-collapsible {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 600px;
  opacity: 1;
}

.filters-collapsible.collapsed {
  max-height: 0;
  opacity: 0;
}

.filters-toggle.collapsed .filters-toggle-icon {
  transform: rotate(180deg);
}

/* 6. CONCORDANCIA -> css/components/concordancia.css */
/* 8. TARJETAS COMPARACIÓN -> css/components/comparison.css */

/* ===================== */
/* 13. SELECCIÓN Y COPIADO */
/* ===================== */
.verse {
  padding: 0 10px;
  /* ← SOLO padding horizontal */
  margin: 0;
  /* ← sin margen */
  border-radius: 0;
  /* ← sin bordes redondeados entre versos */
  transition: line-height 0.25s ease, background 0.2s ease,
    border 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  position: relative;
  border: 2px solid transparent;
  line-height: var(--line-height-content, 1.5);
}

.verse.selected {
  background-color: var(--card-hover, rgba(102, 126, 234, 0.08));
  border-left: 5px solid var(--accent);
  border-color: var(--accent);
  padding-left: 11px;
  transform: translateX(3px);
  box-shadow: none;
}

@keyframes verse-select-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.verse.selected {
  animation: verse-select-pulse 0.4s ease-out;
}

[data-theme="dark"] .verse.selected {
  background-color: rgba(102, 126, 234, 0.12);
  border-left-color: var(--accent);
  box-shadow: none;
}

/* components.css — línea ~en sección 13 */
.verse-number {
  font-weight: 700;
  color: var(--accent);
  margin-right: 0;
  /* ← sin margen */
  padding-right: 0;
  /* ← sin padding */
  pointer-events: none;
  user-select: none;
  display: inline;
  /* ← inline, no inline-block */
  min-width: 0;
  /* ← sin ancho mínimo */
  font-size: 0.65em;
  /* ← superíndice más pequeño */
  vertical-align: super;
  /* ← sube el número */
  line-height: 0;
  /* ← no afecta interlineado */
  transition: transform 0.2s ease;
}

.verse.selected .verse-number {
  transform: scale(1.1);
  font-weight: 800;
}

.verse::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}



.verse.selected::after {
  content: '✓';
  opacity: 0.7;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.verse-highlighted {
  background-color: rgba(255, 215, 0, 0.15);
  border-left: 4px solid #ffd700;
  animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {

  0%,
  100% {
    background-color: rgba(255, 215, 0, 0.15);
  }

  50% {
    background-color: rgba(255, 215, 0, 0.25);
  }
}

[data-theme="dark"] .verse-highlighted {
  background-color: rgba(255, 215, 0, 0.12);
}

/* ===================== */
/* BOTÓN FLOTANTE COPIAR */
/* ===================== */
.floating-action-button {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: var(--bg-container, #ffffff);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1000;
}

.floating-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  filter: brightness(1.1);
}

.floating-action-button:active {
  transform: translateY(0);
}

.verse-count-badge {
  background: white;
  color: var(--accent);
  border-radius: 50%;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  padding: 0 6px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-container);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  color: var(--text-main);
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-main);
}

.modal-content textarea {
  width: 100%;
  height: 200px;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
  background-color: var(--bg-filters);
  color: var(--text-main);
}

.close-button {
  color: var(--text-muted);
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.copy-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--accent);
  text-align: center;
}

.modal-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  cursor: pointer;
  user-select: none;
}

.modal-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.modal-checkbox-group label {
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
}

/* PANEL FLOTANTE AJUSTES -> css/components/settings-panel.css */

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 768px) {
  .verse {
    padding: 0 12px;
    /* ← SOLO horizontal */
    margin: 0;
  }

  .verse::after {
    display: none;
  }

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

  /* ── FIX: Inputs compactos y sin zoom en iOS ── */
  select,
  input[type="text"],
  textarea,
  .language-select {
    font-size: 16px !important;
    /* 16px exactos evita zoom en iOS sin verse gigante */
    padding: 8px 10px;
    /* Reducimos el relleno para que la caja sea más delgada */
  }

  /* ── Filtros más compactos en móvil ── */
  .filters {
    padding: 12px 16px;
    /* Menos padding arriba y abajo */
    gap: 10px;
    /* Menos separación entre los filtros */
    grid-template-columns: 1fr 1fr;
  }

  .filter-group {
    gap: 2px;
    /* Junta el título ("VERSIÓN") con la caja selectora */
  }

  .filter-group label {
    font-size: 0.75rem;
    /* Títulos de filtro un poco más pequeños */
  }

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

  .mode-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: var(--tab-inactive);
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 0.92em;
    /* antes: 1rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px 12px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .tab-text {
    font-size: 0.75rem;
  }

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

  /* ── Toggle de filtros ── */
  .filters-toggle {
    display: flex;
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-filters);
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.85em;
    /* antes: 0.9rem */
    font-weight: 600;
    color: var(--text-main);
    font-family: inherit;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .filters-toggle-ref {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.88em;
    /* antes: 0.95rem */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }

  /* ── Modal ── */
  .modal-content {
    width: 95%;
    padding: 16px;
  }

  .verse-actions-modal-content {
    max-width: none;
    width: 95%;
  }

  .verse-action-btn {
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  /* ── Header ── */
  header {
    padding: 6px 12px;
  }
}

@media (max-width: 380px) {
  .filters {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .mode-tab {
    padding: 8px 4px;
  }

  .tab-text {
    font-size: 0.7rem;
  }
}

/* ===================== */
/* MODAL MULTIFUNCIÓN    */
/* ===================== */
.verse-actions-modal-content {
  max-width: 380px;
  padding: 20px;
}

.verse-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--bg-filters);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.2s ease;
  text-align: left;
}

.verse-action-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateX(3px);
}

.verse-action-btn:last-child {
  margin-bottom: 0;
}

.verse-action-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.verse-action-label {
  font-weight: 600;
  flex: 1;
}

.verse-action-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.verse-action-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 12px 0;
  font-family: inherit;
  display: block;
}

.verse-action-back:hover {
  opacity: 0.7;
}

.verse-action-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 14px 0;
  font-weight: 600;
}

.verse-actions-text-preview {
  background: var(--bg-filters);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.5;
}

.verse-actions-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-container);
  color: var(--text-main);
  resize: vertical;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.verse-actions-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===================== */
/* ICONOS VERSE ACTIONS  */
/* ===================== */
.verse-action-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.fab-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

[data-theme="dark"] .verse-action-img,
[data-theme="dark"] .fab-icon {
  filter: brightness(0) invert(1);
}

/* ===================== */
/* MODO CONTINUO (INLINE)*/
/* ===================== */

/* Esta clase se aplicará al contenedor principal de los versos mediante JS */
.lectura-modo-continuo .verse {
  display: inline;
  /* Hace que el texto fluya sin saltos de línea */
  padding: 0 4px;
  /* Reducimos el padding lateral para que las palabras no queden muy separadas */
}

.lectura-modo-continuo .verse-number {
  margin-left: 3px;
  /* ← mínima separación del verso anterior */
  margin-right: 0;
  /* ← pegado al texto siguiente */
}

/* Quitamos el sol y la luna del nuevo switch para que se vea como un switch normal */
.switch input:checked+.slider.plain-slider:before {
  content: "";
}

.slider.plain-slider:before {
  content: "";
}

/* ══════════════════════════════════════════════════════
   BOTÓN BÚSQUEDA MINIMALISTA - CONCORDANCIA
   ══════════════════════════════════════════════════════ */
.btn-minimal-search {
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-accent, var(--accent, #c9a84c));
  border: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.2s ease,
              filter 0.2s ease,
              opacity 0.2s ease;
  padding: 0;
}

.btn-minimal-search .search-icon-svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2.2;
  transition: transform 0.25s ease;
}

/* Efecto Hover */
.btn-minimal-search:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
  filter: brightness(1.12);
}

.btn-minimal-search:hover .search-icon-svg {
  transform: rotate(-6deg) scale(1.1);
}

/* Efecto clic */
.btn-minimal-search:active {
  transform: translateY(0) scale(0.94);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Estado deshabilitado (mientras carga) */
.btn-minimal-search:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Responsive Móvil ── */
@media (max-width: 480px) {
  .btn-minimal-search {
    width: 38px;
    height: 38px;
  }

  .btn-minimal-search .search-icon-svg {
    width: 16px;
    height: 16px;
  }
}

/* ======================================================= */
/* FIX: DESVINCULAR TAMAÑO DE UI DEL TAMAÑO DE LECTURA     */
/* ======================================================= */
/* Usamos 'rem' o 'px' para que la interfaz se mantenga   */
/* estable aunque el usuario ponga la letra de lectura gigante */

/* 1. Cajas de selección (Fijas a 16px para evitar zoom en iOS) */
select,
input[type="text"],
textarea,
.language-select {
  font-size: 16px !important;
  padding: 8px 10px !important;
  /* Las hacemos más delgadas */
}

/* 2. Títulos pequeños de los filtros ("VERSIÓN", "LIBRO") */
.filter-group label {
  font-size: 0.75rem !important;
  /* 'rem' no se ve afectado por la rueda de ajustes */
  margin-bottom: 2px !important;
}

/* 3. El botón que despliega los filtros (donde dice "Éxodo 3") */
.filters-toggle {
  font-size: 0.9rem !important;
}

.filters-toggle-ref {
  font-size: 0.95rem !important;
}

/* 4. Las pestañas superiores (Lectura, Comparación, etc) */
.mode-tab {
  font-size: 0.95rem !important;
}

/* 5. Ajustes específicos para móviles */
@media (max-width: 768px) {
  .mode-tab {
    font-size: 0.8rem !important;
    /* Pestañas compactas en móvil */
    padding: 10px 4px !important;
  }

  .filters-toggle {
    font-size: 0.85rem !important;
  }

  .filters-toggle-ref {
    font-size: 0.9rem !important;
  }

  .filters {
    padding: 12px 14px !important;
    /* Menos espacio vacío alrededor de los filtros */
    gap: 10px !important;
  }
}

/* 14. SISTEMA DE RESALTADO (HIGHLIGHTS) -> css/components/highlights.css */

/* ===================================================== */
/* INDICADORES DE CONEXIÓN OFFLINE (WIFI TACHADO)         */
/* ===================================================== */
.offline-feature-disabled {
  position: relative !important;
  opacity: 0.6 !important;
  filter: grayscale(40%);
  cursor: not-allowed !important;
}

.offline-wifi-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  background: #dc2626;
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.offline-wifi-badge svg {
  width: 9px;
  height: 9px;
  stroke: #ffffff;
}

/* SISTEMA DE TOASTS -> css/components/toasts.css */