/* Scripture Theme - Illuminated Manuscript / Royal Bible aesthetic */
.scripture-theme {
    /* Warm parchment/beige backgrounds */
    --scripture-bg: #faf6f0;
    --scripture-bg-warm: #f5efe5;
    --scripture-parchment: #fdfaf4;
    
    /* Rich deep cranberry - primary accent */
    --scripture-burgundy: #6b1c2a;
    --scripture-burgundy-light: #7d2535;
    --scripture-burgundy-dark: #4a1420;
    
    /* Royal blue - secondary accent */
    --scripture-royal: #1e3a5f;
    --scripture-royal-light: #2c4a73;
    
    /* Gold/amber accents */
    --scripture-gold: #c9a227;
    --scripture-gold-light: #dbb84d;
    --scripture-gold-muted: #b8963a;
    
    /* Elegant greens */
    --scripture-green: #2d5a4a;
    --scripture-green-light: #3d7a64;
    
    /* Text colors */
    --scripture-text: #3a2f2a;
    --scripture-text-muted: #6b5b52;
    
    /* Borders */
    --scripture-border: #e8dfd2;
    --scripture-border-gold: rgba(201, 162, 39, 0.3);
}

.scripture-theme body,
.scripture-theme {
    background: linear-gradient(135deg, var(--scripture-bg) 0%, var(--scripture-bg-warm) 100%) !important;
}

.scripture-theme .glass {
    background: rgba(253, 250, 244, 0.95) !important;
    border-color: var(--scripture-border) !important;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.08) !important;
}

/* Header - Rich burgundy with gold accent */
.scripture-theme header,
.scripture-theme header.bg-indigo-600 {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    border-bottom: 2px solid var(--scripture-gold) !important;
}

.scripture-theme header .glass {
    background: rgba(74, 20, 32, 0.95) !important;
    border-color: rgba(201, 162, 39, 0.3) !important;
}

/* Force all header text to be light/gold */
.scripture-theme header,
.scripture-theme header *,
.scripture-theme header span,
.scripture-theme header a,
.scripture-theme header h1,
.scripture-theme header p,
.scripture-theme header div {
    color: var(--scripture-parchment) !important;
}

/* Header buttons - parchment with gold border */
.scripture-theme header button,
.scripture-theme header button[class*="bg-gray"],
.scripture-theme header a[class*="bg-gray"],
.scripture-theme header a.p-2,
.scripture-theme header a[class*="rounded-xl"] {
    background: var(--scripture-parchment) !important;
    color: var(--scripture-burgundy) !important;
    border: 1px solid var(--scripture-gold-muted) !important;
}

.scripture-theme header button:hover,
.scripture-theme header a[class*="rounded-xl"]:hover {
    background: var(--scripture-gold-light) !important;
    color: var(--scripture-burgundy-dark) !important;
}

.scripture-theme header button i,
.scripture-theme header button span,
.scripture-theme header a i {
    color: var(--scripture-burgundy) !important;
}

/* Logo gradient text override - gold shimmer */
.scripture-theme header h1.bg-gradient-to-r,
.scripture-theme header .bg-gradient-to-r {
    background: linear-gradient(135deg, var(--scripture-gold-light) 0%, var(--scripture-gold) 50%, var(--scripture-gold-light) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.scripture-theme header input {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--scripture-text) !important;
    border-color: var(--scripture-gold-muted) !important;
}

.scripture-theme header input::placeholder {
    color: var(--scripture-text-muted) !important;
}

/* Main content area */
.scripture-theme main,
.scripture-theme .card,
.scripture-theme [class*="rounded-2xl"],
.scripture-theme [class*="rounded-xl"] {
    background: var(--scripture-parchment) !important;
    border-color: var(--scripture-border) !important;
}

/* Headings - elegant burgundy */
.scripture-theme h1, 
.scripture-theme h2, 
.scripture-theme h3,
.scripture-theme h4 {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    color: var(--scripture-burgundy) !important;
}

.scripture-theme p,
.scripture-theme span,
.scripture-theme div {
    color: var(--scripture-text);
}

.scripture-theme .text-gray-500,
.scripture-theme .text-gray-600,
.scripture-theme .text-gray-700 {
    color: var(--scripture-text-muted) !important;
}

/* Accent colors - use burgundy and royal blue */
.scripture-theme .text-purple-600,
.scripture-theme .text-violet-600 {
    color: var(--scripture-burgundy) !important;
}

.scripture-theme .text-indigo-600,
.scripture-theme .text-blue-600 {
    color: var(--scripture-royal) !important;
}

/* Primary buttons - burgundy with gold hover */
.scripture-theme .btn-primary,
.scripture-theme button[class*="bg-purple"],
.scripture-theme button[class*="bg-violet"],
.scripture-theme a[class*="bg-purple"],
.scripture-theme .gradient-bg {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    border: 1px solid var(--scripture-gold-muted) !important;
}

.scripture-theme .btn-primary:hover,
.scripture-theme button[class*="bg-purple"]:hover,
.scripture-theme .gradient-bg:hover {
    background: linear-gradient(135deg, var(--scripture-burgundy-light) 0%, var(--scripture-burgundy) 100%) !important;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.3) !important;
}

/* Secondary buttons - royal blue */
.scripture-theme button[class*="bg-indigo"],
.scripture-theme button[class*="bg-blue"] {
    background: linear-gradient(135deg, var(--scripture-royal) 0%, var(--scripture-royal-light) 100%) !important;
}

/* Links - burgundy with gold hover */
.scripture-theme a {
    color: var(--scripture-burgundy);
}

.scripture-theme a:hover {
    color: var(--scripture-gold-muted);
}

/* Scrollbar - burgundy */
.scripture-theme ::-webkit-scrollbar-thumb {
    background: rgba(114, 47, 55, 0.4) !important;
}

.scripture-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(114, 47, 55, 0.6) !important;
}

/* Cards and containers */
.scripture-theme .bg-white,
.scripture-theme .bg-gray-50,
.scripture-theme .bg-slate-50 {
    background: var(--scripture-parchment) !important;
}

.scripture-theme .border-gray-200,
.scripture-theme .border-gray-300 {
    border-color: var(--scripture-border) !important;
}

/* Header ribbon button - keep pink/rose */
.scripture-theme header #headerRibbonBtn {
    background: var(--scripture-parchment) !important;
    border: 1px solid #c44569 !important;
}
.scripture-theme header #headerRibbonBtn i {
    color: #c44569 !important;
}

/* Fix gradient backgrounds */
.scripture-theme .bg-gradient-to-br,
.scripture-theme .bg-gradient-to-r {
    background: linear-gradient(135deg, var(--scripture-bg) 0%, var(--scripture-bg-warm) 100%) !important;
}

/* Note cards - parchment with subtle gold border */
.scripture-theme .paper-texture {
    background-color: var(--scripture-parchment) !important;
    border: 1px solid var(--scripture-border) !important;
}

/* Badges and pills - themed colors */
.scripture-theme [class*="bg-purple-100"] {
    background: rgba(114, 47, 55, 0.1) !important;
    border: 1px solid rgba(114, 47, 55, 0.2) !important;
}

.scripture-theme [class*="bg-amber-100"] {
    background: rgba(201, 162, 39, 0.15) !important;
    border: 1px solid rgba(201, 162, 39, 0.3) !important;
}

.scripture-theme [class*="bg-emerald-100"],
.scripture-theme [class*="bg-green-100"] {
    background: rgba(45, 90, 74, 0.1) !important;
    border: 1px solid rgba(45, 90, 74, 0.2) !important;
}

.scripture-theme [class*="bg-blue-100"],
.scripture-theme [class*="bg-indigo-100"] {
    background: rgba(30, 58, 95, 0.1) !important;
    border: 1px solid rgba(30, 58, 95, 0.2) !important;
}

.scripture-theme [class*="bg-pink-100"],
.scripture-theme [class*="bg-rose-100"] {
    background: rgba(196, 69, 105, 0.1) !important;
    border: 1px solid rgba(196, 69, 105, 0.2) !important;
}

/* Badge text colors */
.scripture-theme [class*="text-purple-"] {
    color: var(--scripture-burgundy) !important;
}

.scripture-theme [class*="text-amber-"] {
    color: var(--scripture-gold-muted) !important;
}

.scripture-theme [class*="text-emerald-"],
.scripture-theme [class*="text-green-"] {
    color: var(--scripture-green) !important;
}

.scripture-theme [class*="text-blue-"],
.scripture-theme [class*="text-indigo-"] {
    color: var(--scripture-royal) !important;
}

/* Sidebar sections - subtle color coding */
.scripture-theme aside .text-amber-600 { color: var(--scripture-gold-muted) !important; }
.scripture-theme aside .text-emerald-600 { color: var(--scripture-green) !important; }
.scripture-theme aside .text-blue-600 { color: var(--scripture-royal) !important; }
.scripture-theme aside .text-purple-600 { color: var(--scripture-burgundy) !important; }
.scripture-theme aside .text-rose-600 { color: #c44569 !important; }

/* Verse numbers - gold accent */
.scripture-theme .verse-number,
.scripture-theme sup {
    color: var(--scripture-gold-muted) !important;
    font-weight: 600;
}

/* Highlight colors - richer tones */
.scripture-theme .highlight-yellow { background-color: rgba(219, 184, 77, 0.35) !important; }
.scripture-theme .highlight-green { background-color: rgba(61, 122, 100, 0.25) !important; }
.scripture-theme .highlight-blue { background-color: rgba(44, 74, 115, 0.25) !important; }
.scripture-theme .highlight-pink { background-color: rgba(196, 69, 105, 0.25) !important; }
.scripture-theme .highlight-purple { background-color: rgba(114, 47, 55, 0.25) !important; }
.scripture-theme .highlight-orange { background-color: rgba(201, 162, 39, 0.35) !important; }

/* Selection color */
.scripture-theme ::selection {
    background: rgba(201, 162, 39, 0.3);
    color: var(--scripture-text);
}

/* ============================================
   SIDEBAR FIXES - Active states need light text
   ============================================ */

/* Active book button in sidebar */
.scripture-theme .sidebar-book-btn.active,
.scripture-theme aside button.active,
.scripture-theme aside [class*="bg-purple"],
.scripture-theme aside [class*="bg-violet"],
.scripture-theme aside [class*="bg-indigo"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border-color: var(--scripture-gold) !important;
}

.scripture-theme .sidebar-book-btn.active *,
.scripture-theme aside button.active * {
    color: #fdfaf4 !important;
}

/* Chapter number buttons - active state */
.scripture-theme aside .chapter-btn.active,
.scripture-theme aside button[class*="bg-"]:not([class*="bg-gray"]):not([class*="bg-white"]) {
    color: #fdfaf4 !important;
}

/* ============================================
   NOTES PAGE FIXES
   ============================================ */

/* Tab buttons - active state needs light text */
.scripture-theme button[class*="gradient-bg"],
.scripture-theme .gradient-bg,
.scripture-theme [class*="bg-purple-600"],
.scripture-theme [class*="bg-purple-700"],
.scripture-theme [class*="bg-violet-600"],
.scripture-theme [class*="bg-indigo-600"] {
    color: #fdfaf4 !important;
}

.scripture-theme button[class*="gradient-bg"] *,
.scripture-theme .gradient-bg * {
    color: #fdfaf4 !important;
}

/* Filter button */
.scripture-theme button[class*="bg-purple"] span,
.scripture-theme button[class*="bg-purple"] i,
.scripture-theme button.gradient-bg span,
.scripture-theme button.gradient-bg i {
    color: #fdfaf4 !important;
}

/* ============================================
   LINKS PAGE FIXES
   ============================================ */

/* Action buttons on links page */
.scripture-theme .btn,
.scripture-theme button[class*="bg-amber"],
.scripture-theme button[class*="bg-blue"],
.scripture-theme button[class*="bg-indigo"] {
    color: #fdfaf4 !important;
}

.scripture-theme button[class*="bg-amber"] i,
.scripture-theme button[class*="bg-blue"] i,
.scripture-theme button[class*="bg-indigo"] i {
    color: #fdfaf4 !important;
}

/* New Collection button */
.scripture-theme button[class*="gradient-bg"],
.scripture-theme a[class*="gradient-bg"] {
    color: #fdfaf4 !important;
}

/* ============================================
   GENERAL DARK BACKGROUND BUTTON FIXES
   ============================================ */

/* Any button with a dark background should have light text */
.scripture-theme button[style*="background"],
.scripture-theme [class*="bg-purple-500"],
.scripture-theme [class*="bg-purple-600"],
.scripture-theme [class*="bg-purple-700"],
.scripture-theme [class*="bg-violet-500"],
.scripture-theme [class*="bg-violet-600"],
.scripture-theme [class*="bg-indigo-500"],
.scripture-theme [class*="bg-indigo-600"],
.scripture-theme [class*="bg-blue-500"],
.scripture-theme [class*="bg-blue-600"],
.scripture-theme [class*="bg-amber-500"],
.scripture-theme [class*="bg-amber-600"] {
    color: #fdfaf4 !important;
}

/* Ensure icons inside dark buttons are light */
.scripture-theme [class*="bg-purple-500"] i,
.scripture-theme [class*="bg-purple-600"] i,
.scripture-theme [class*="bg-purple-700"] i,
.scripture-theme [class*="bg-violet-500"] i,
.scripture-theme [class*="bg-violet-600"] i,
.scripture-theme [class*="bg-indigo-500"] i,
.scripture-theme [class*="bg-indigo-600"] i,
.scripture-theme [class*="bg-blue-500"] i,
.scripture-theme [class*="bg-blue-600"] i,
.scripture-theme [class*="bg-amber-500"] i,
.scripture-theme [class*="bg-amber-600"] i {
    color: #fdfaf4 !important;
}

/* Small rounded buttons (like chapter numbers) */
.scripture-theme aside .grid button.active,
.scripture-theme aside .flex button.active {
    background: var(--scripture-burgundy) !important;
    color: #fdfaf4 !important;
    border-color: var(--scripture-gold) !important;
}

/* ============================================
   SIDEBAR - Active book items
   ============================================ */

/* Active book link in sidebar - needs light text on purple/cranberry bg */
.scripture-theme aside a.bg-purple-100,
.scripture-theme aside a[class*="bg-purple-100"],
.scripture-theme aside .sidebar-item.bg-purple-100 {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

.scripture-theme aside a.bg-purple-100 span,
.scripture-theme aside a[class*="bg-purple-100"] span,
.scripture-theme aside .sidebar-item.bg-purple-100 span {
    color: #fdfaf4 !important;
}

/* Active chapter number buttons */
.scripture-theme aside a.gradient-bg,
.scripture-theme aside .chapter-btn.gradient-bg,
.scripture-theme a.chapter-btn.gradient-bg {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

/* ============================================
   NOTES PAGE - Tab links with gradient-bg
   ============================================ */

/* Active tab links */
.scripture-theme a.gradient-bg,
.scripture-theme a[class*="gradient-bg"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

.scripture-theme a.gradient-bg i,
.scripture-theme a.gradient-bg span,
.scripture-theme a[class*="gradient-bg"] i,
.scripture-theme a[class*="gradient-bg"] span {
    color: #fdfaf4 !important;
}

/* Filter button */
.scripture-theme button.gradient-bg,
.scripture-theme button[class*="gradient-bg"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

.scripture-theme button.gradient-bg i,
.scripture-theme button.gradient-bg span,
.scripture-theme button[class*="gradient-bg"] i,
.scripture-theme button[class*="gradient-bg"] span {
    color: #fdfaf4 !important;
}

/* ============================================
   LINKS PAGE - Action buttons
   ============================================ */

/* Amber/gold action buttons */
.scripture-theme button.bg-amber-500,
.scripture-theme button[class*="bg-amber-5"],
.scripture-theme button[class*="bg-amber-6"] {
    background: var(--scripture-gold) !important;
    color: #3a2f2a !important;
}

/* Blue action buttons */
.scripture-theme button.bg-blue-500,
.scripture-theme button.bg-indigo-500,
.scripture-theme button[class*="bg-blue-5"],
.scripture-theme button[class*="bg-blue-6"],
.scripture-theme button[class*="bg-indigo-5"],
.scripture-theme button[class*="bg-indigo-6"] {
    background: var(--scripture-royal) !important;
    color: #fdfaf4 !important;
}

.scripture-theme button.bg-blue-500 i,
.scripture-theme button.bg-indigo-500 i,
.scripture-theme button[class*="bg-blue-5"] i,
.scripture-theme button[class*="bg-indigo-5"] i {
    color: #fdfaf4 !important;
}

/* ============================================
   GENERAL - Ensure text-white stays white
   ============================================ */

.scripture-theme .text-white {
    color: #fdfaf4 !important;
}

.scripture-theme [class*="gradient-bg"].text-white,
.scripture-theme [class*="gradient-bg"] .text-white {
    color: #fdfaf4 !important;
}

/* ============================================
   NOTES PAGE - Location badges and note type badges
   ============================================ */

/* Location badge (book/chapter link) - cranberry with light text */
.scripture-theme a.rounded-full[class*="bg-purple"],
.scripture-theme a[class*="rounded-full"][class*="bg-purple"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

.scripture-theme a.rounded-full[class*="bg-purple"] i,
.scripture-theme a.rounded-full[class*="bg-purple"] span,
.scripture-theme a[class*="rounded-full"][class*="bg-purple"] i,
.scripture-theme a[class*="rounded-full"][class*="bg-purple"] span {
    color: #fdfaf4 !important;
}

/* Study Note badge - gold with dark text */
.scripture-theme span.rounded-full[class*="bg-amber"],
.scripture-theme span[class*="rounded-full"][class*="bg-amber"] {
    background: var(--scripture-gold) !important;
    color: #3a2f2a !important;
    border: 1px solid var(--scripture-gold-muted) !important;
}

.scripture-theme span.rounded-full[class*="bg-amber"] i,
.scripture-theme span[class*="rounded-full"][class*="bg-amber"] i {
    color: #3a2f2a !important;
}

/* Verse Note badge - use the highlight color but ensure readability */
.scripture-theme span.rounded-full[class*="bg-yellow"],
.scripture-theme span.rounded-full[class*="bg-green"],
.scripture-theme span.rounded-full[class*="bg-blue"],
.scripture-theme span.rounded-full[class*="bg-pink"],
.scripture-theme span.rounded-full[class*="bg-purple"],
.scripture-theme span.rounded-full[class*="bg-orange"] {
    border: 1px solid currentColor !important;
}

/* Purple badges (not links) need light text on cranberry */
.scripture-theme span.rounded-full[class*="bg-purple-100"],
.scripture-theme span[class*="rounded-full"][class*="bg-purple-100"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
}

.scripture-theme span.rounded-full[class*="bg-purple-100"] i,
.scripture-theme span[class*="rounded-full"][class*="bg-purple-100"] i {
    color: #fdfaf4 !important;
}

/* ============================================
   NOTES PAGE - Action button on note cards
   ============================================ */

/* The small square button on the right of note cards */
.scripture-theme .card a[class*="rounded-xl"][class*="bg-purple"],
.scripture-theme .card button[class*="rounded-xl"][class*="bg-purple"],
.scripture-theme a.rounded-xl[class*="bg-purple-100"],
.scripture-theme button.rounded-xl[class*="bg-purple-100"] {
    background: linear-gradient(135deg, var(--scripture-burgundy) 0%, var(--scripture-burgundy-dark) 100%) !important;
    color: #fdfaf4 !important;
    border: 1px solid var(--scripture-gold) !important;
}

.scripture-theme .card a[class*="rounded-xl"][class*="bg-purple"] i,
.scripture-theme a.rounded-xl[class*="bg-purple-100"] i {
    color: #fdfaf4 !important;
}

/* ============================================
   NOTES PAGE - Go to chapter/verse action buttons
   ============================================ */

/* The arrow button on note cards - keep it light/subtle, not cranberry */
.scripture-theme .card a.p-2.rounded-lg,
.scripture-theme .card a.rounded-lg.text-gray-400,
.scripture-theme .card a[class*="rounded-lg"][class*="text-gray"] {
    background: var(--scripture-parchment) !important;
    border: 1px solid var(--scripture-border) !important;
    color: var(--scripture-burgundy) !important;
}

.scripture-theme .card a.p-2.rounded-lg:hover,
.scripture-theme .card a.rounded-lg.text-gray-400:hover,
.scripture-theme .card a[class*="rounded-lg"][class*="text-gray"]:hover {
    background: var(--scripture-gold-light) !important;
    color: var(--scripture-burgundy-dark) !important;
}

.scripture-theme .card a.p-2.rounded-lg i,
.scripture-theme .card a.rounded-lg.text-gray-400 i,
.scripture-theme .card a[class*="rounded-lg"][class*="text-gray"] i {
    color: var(--scripture-burgundy) !important;
}

/* Override: If a link inside card has fa-arrow-right, make it visible */
.scripture-theme .card a i.fa-arrow-right {
    color: var(--scripture-burgundy) !important;
}

.scripture-theme .card a:hover i.fa-arrow-right {
    color: var(--scripture-burgundy-dark) !important;
}
