/**
 * Mutual Verses — Frontend Stylesheet
 * Responsive Side-by-Side Al-Qur'an and The Bible Comparative Display
 */

:root {
  --mv-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mv-font-serif: 'Amiri', 'Georgia', 'Cambria', serif;
  --mv-font-heading: 'Cinzel', 'Playfair Display', 'Georgia', serif;

  /* Colors */
  --mv-bg-main: #f8fafc;
  --mv-card-bg: #ffffff;
  --mv-text-dark: #0f172a;
  --mv-text-muted: #475569;
  --mv-border-color: #e2e8f0;

  /* Al-Qur'an Accent: Sacred Emerald */
  --mv-quran-primary: #065f46;
  --mv-quran-secondary: #047857;
  --mv-quran-light: #ecfdf5;
  --mv-quran-border: #a7f3d0;
  --mv-quran-glow: rgba(16, 185, 129, 0.2);

  /* The Bible Accent: Royal Sapphire */
  --mv-bible-primary: #1e3a8a;
  --mv-bible-secondary: #2563eb;
  --mv-bible-light: #eff6ff;
  --mv-bible-border: #bfdbfe;
  --mv-bible-glow: rgba(37, 99, 235, 0.2);

  /* Mutual Wisdom Accent: Sacred Gold */
  --mv-gold-primary: #92400e;
  --mv-gold-secondary: #d97706;
  --mv-gold-accent: #f59e0b;
  --mv-gold-light: #fefce8;
  --mv-gold-border: #fde68a;
  --mv-gold-glow: rgba(245, 158, 11, 0.25);

  --mv-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --mv-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --mv-shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --mv-verse-size: 1.15rem;
}

/* Base Container */
.mv-container {
  box-sizing: border-box;
  font-family: var(--mv-font-sans);
  color: var(--mv-text-dark);
  background: var(--mv-bg-main);
  border: 1px solid var(--mv-border-color);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 30px auto;
  max-width: 1200px;
  box-shadow: var(--mv-shadow-lg);
  line-height: 1.6;
}

.mv-container *, .mv-container *::before, .mv-container *::after {
  box-sizing: border-box;
}

/* Header */
.mv-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--mv-border-color);
}

.mv-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.mv-icon-sparkle {
  color: #d97706;
}

.mv-main-title {
  font-family: var(--mv-font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.mv-subtitle {
  font-size: 1.05rem;
  color: var(--mv-text-muted);
  max-width: 760px;
  margin: 0 auto 16px auto;
}

.mv-stat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.mv-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  box-shadow: var(--mv-shadow-sm);
}

/* Controls Box */
.mv-controls-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--mv-shadow-md);
}

.mv-dropdowns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.mv-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mv-control-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
}

.mv-label-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--mv-gold-secondary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 50%;
}

.mv-select-wrapper {
  position: relative;
  width: 100%;
}

.mv-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px 40px 13px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mv-select:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.mv-select:focus {
  outline: none;
  border-color: var(--mv-gold-secondary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--mv-gold-glow);
}

.mv-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  font-size: 0.75rem;
}

/* Secondary Toolbar */
.mv-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.mv-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.mv-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.mv-search-input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.92rem;
  color: #0f172a;
  transition: all 0.2s ease;
}

.mv-search-input:focus {
  outline: none;
  border-color: var(--mv-bible-secondary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--mv-bible-glow);
}

.mv-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.mv-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mv-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.mv-btn-random {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border-color: #fde68a;
  color: #92400e;
}

.mv-btn-random:hover {
  background: linear-gradient(135deg, #fde68a, #fef08a);
  border-color: #f59e0b;
}

.mv-font-resizer {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.mv-btn-font {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-right: 1px solid #e2e8f0;
  transition: background 0.15s ease;
}

.mv-btn-font:last-child {
  border-right: none;
}

.mv-btn-font:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Active Topic Meta Bar */
.mv-topic-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 22px;
  box-shadow: var(--mv-shadow-sm);
}

.mv-category-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.mv-topic-display-title {
  font-family: var(--mv-font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.mv-counter-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Scriptures Grid: 2 Columns Side-by-Side */
.mv-scriptures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.mv-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--mv-shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.mv-card:hover {
  box-shadow: var(--mv-shadow-lg);
  transform: translateY(-2px);
}

/* Left Card: Al-Qur'an */
.mv-card-quran {
  border: 2px solid var(--mv-quran-border);
}

.mv-card-quran .mv-card-header {
  background: linear-gradient(135deg, #064e3b, #047857);
  color: #ffffff;
}

.mv-card-quran .mv-citation-pill {
  background: var(--mv-quran-light);
  border: 1px solid var(--mv-quran-border);
  color: var(--mv-quran-primary);
}

.mv-card-quran .mv-verse-quote::before {
  color: rgba(6, 95, 70, 0.2);
}

/* Right Card: The Bible */
.mv-card-bible {
  border: 2px solid var(--mv-bible-border);
}

.mv-card-bible .mv-card-header {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: #ffffff;
}

.mv-card-bible .mv-citation-pill {
  background: var(--mv-bible-light);
  border: 1px solid var(--mv-bible-border);
  color: var(--mv-bible-primary);
}

.mv-card-bible .mv-verse-quote::before {
  color: rgba(30, 58, 138, 0.2);
}

/* Common Card Header */
.mv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.mv-scripture-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mv-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-size: 1.25rem;
}

.mv-title-group {
  display: flex;
  flex-direction: column;
}

.mv-scripture-title {
  font-family: var(--mv-font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1.2;
}

.mv-scripture-subtitle {
  font-size: 0.78rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mv-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mv-copy-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Card Citation & Verse Content */
.mv-citation-pill {
  margin: 18px 20px 8px 20px;
  padding: 10px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.mv-ref-text {
  font-weight: 700;
}

.mv-verse-content {
  flex: 1;
  padding: 12px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Scripture Quote Presentation (English Manuscript Version) */
.mv-verse-quote {
  font-family: var(--mv-font-serif);
  font-size: calc(var(--mv-verse-size) * 1.08);
  font-style: italic;
  line-height: 1.85;
  color: #1e293b;
  margin: 0;
  position: relative;
  padding: 20px 22px 20px 28px;
  border-left: 4px solid #cbd5e1;
  border-radius: 0 12px 12px 0;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.mv-card-quran .mv-verse-quote {
  border-left-color: #059669;
  background: #f0fdf4;
  color: #064e3b;
}

.mv-card-bible .mv-verse-quote {
  border-left-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
}

.mv-verse-quote::before {
  content: '“';
  position: absolute;
  left: 6px;
  top: -8px;
  font-size: 2.8rem;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.25;
}

.mv-card-footer {
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.mv-source-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mv-dot {
  font-size: 0.6rem;
  color: var(--mv-gold-secondary);
}

/* Central Illuminated Banner: THE MUTUAL MESSAGE */
.mv-mutual-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fde68a;
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: var(--mv-shadow-md);
  position: relative;
  overflow: hidden;
}

.mv-mutual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #d97706, #f59e0b, #d97706);
}

.mv-mutual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #fcd34d;
}

.mv-mutual-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fde68a;
  border: 1px solid #fcd34d;
  border-radius: 50%;
  font-size: 1.4rem;
  color: #92400e;
}

.mv-mutual-title-wrap {
  flex: 1;
}

.mv-mutual-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.mv-mutual-title {
  font-family: var(--mv-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #78350f;
  margin: 0;
  letter-spacing: -0.01em;
}

.mv-copy-all-btn {
  background: #92400e;
  border: 1px solid #78350f;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mv-copy-all-btn:hover {
  background: #78350f;
}

.mv-mutual-body {
  margin-bottom: 14px;
}

.mv-mutual-text {
  font-family: var(--mv-font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
  color: #451a03;
  font-weight: 500;
}

.mv-mutual-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #92400e;
}

.mv-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
}

/* Toast Notification */
.mv-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  pointer-events: none;
}

.mv-toast.mv-toast-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Animation on verse transition */
.mv-anim-fade {
  animation: mvFadeIn 0.35s ease forwards;
}

@keyframes mvFadeIn {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Media Queries */
@media (max-width: 860px) {
  .mv-dropdowns-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mv-scriptures-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mv-main-title {
    font-size: 1.75rem;
  }

  .mv-topic-display-title {
    font-size: 1.35rem;
  }

  .mv-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mv-action-buttons {
    justify-content: space-between;
  }
}

@media (max-width: 540px) {
  .mv-container {
    padding: 20px 14px;
    border-radius: 12px;
  }

  .mv-controls-box {
    padding: 16px 12px;
  }

  .mv-action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .mv-btn {
    width: 100%;
    justify-content: center;
  }

  .mv-font-resizer {
    width: 100%;
    justify-content: center;
  }

  .mv-btn-font {
    flex: 1;
    text-align: center;
  }
}
