/**
 * Bible Lookup Widget Styles
 *
 * Floating button and modal for KJV Bible verse lookup.
 * Supports light and dark mode via [data-theme="dark"].
 *
 * @package PristineGrace
 * @since 4.3
 */

/* ============================================================================
   FLOATING BUTTON
   ============================================================================ */

.bible-lookup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(57, 91, 169, 0.5);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #304e96;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.bible-lookup-btn:hover {
    background: rgba(48, 78, 150, 0.15);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(57, 91, 169, 0.3);
}

.bible-lookup-btn:active {
    transform: scale(0.95);
}

.bible-lookup-btn:focus {
    outline: 2px solid rgba(57, 91, 169, 0.5);
    outline-offset: 2px;
}

/* Dark mode */
[data-theme="dark"] .bible-lookup-btn {
    background: rgba(127, 168, 232, 0.2);
    border-color: rgba(127, 168, 232, 0.3);
    color: #7fa8e8;
}

[data-theme="dark"] .bible-lookup-btn:hover {
    background: rgba(127, 168, 232, 0.3);
    box-shadow: 0 4px 12px rgba(127, 168, 232, 0.2);
}

/* ============================================================================
   MODAL STYLES
   ============================================================================ */

.bible-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.bible-modal .modal-header {
    background: linear-gradient(135deg, #18274b 0%, #304e96 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.bible-modal .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bible-modal .modal-title i {
    font-size: 1.25rem;
}

.bible-modal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.bible-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.bible-modal .modal-body {
    padding: 1.25rem;
    background: #fdfcfa;
}

.bible-modal .modal-footer {
    border-top: 1px solid #eee;
    background: #f8f7f5;
    padding: 0.75rem 1.25rem;
}

/* Dark mode modal */
[data-theme="dark"] .bible-modal .modal-content {
    background: #1e1e24;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .bible-modal .modal-header {
    background: linear-gradient(135deg, #0d1526 0%, #1a2847 100%);
}

[data-theme="dark"] .bible-modal .modal-body {
    background: #1e1e24;
    color: #e0e0e0;
}

[data-theme="dark"] .bible-modal .modal-footer {
    background: #252530;
    border-top-color: #333;
}

/* ============================================================================
   INPUT MODES (Tabs)
   ============================================================================ */

.bible-input-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bible-mode-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: #666;
}

.bible-mode-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.bible-mode-btn.active {
    background: #395ba9;
    border-color: #395ba9;
    color: white;
}

[data-theme="dark"] .bible-mode-btn {
    background: #2a2a35;
    border-color: #444;
    color: #aaa;
}

[data-theme="dark"] .bible-mode-btn:hover {
    background: #333340;
    border-color: #555;
}

[data-theme="dark"] .bible-mode-btn.active {
    background: #2a4080;
    border-color: #2a4080;
    color: #fff;
}

/* ============================================================================
   INPUT PANELS
   ============================================================================ */

.bible-input-panel {
    display: none;
}

.bible-input-panel.active {
    display: block;
}

/* Text input mode */
.bible-text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.bible-text-input:focus {
    outline: none;
    border-color: #395ba9;
}

.bible-text-input::placeholder {
    color: #999;
}

[data-theme="dark"] .bible-text-input {
    background: #2a2a35;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .bible-text-input:focus {
    border-color: #7fa8e8;
}

[data-theme="dark"] .bible-text-input::placeholder {
    color: #666;
}

/* Dropdown mode */
.bible-dropdown-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.bible-dropdown-group {
    flex: 1;
    min-width: 120px;
}

.bible-dropdown-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 0.25rem;
}

.bible-dropdown-group select,
.bible-dropdown-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.bible-dropdown-group select:focus,
.bible-dropdown-group input:focus {
    outline: none;
    border-color: #395ba9;
}

[data-theme="dark"] .bible-dropdown-group label {
    color: #888;
}

[data-theme="dark"] .bible-dropdown-group select,
[data-theme="dark"] .bible-dropdown-group input {
    background: #2a2a35;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .bible-dropdown-group select:focus,
[data-theme="dark"] .bible-dropdown-group input:focus {
    border-color: #7fa8e8;
}

/* Verse range separator */
.bible-verse-to {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.5rem;
    color: #999;
    font-size: 0.875rem;
}

/* Verse range hint */
.bible-verse-range-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bible-verse-range-hint i {
    color: #395ba9;
}

[data-theme="dark"] .bible-verse-range-hint {
    background: #2a2a35;
    color: #aaa;
}

[data-theme="dark"] .bible-verse-range-hint i {
    color: #7fa8e8;
}

/* ============================================================================
   LOOKUP BUTTON
   ============================================================================ */

.bible-lookup-submit {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #18274b 0%, #395ba9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bible-lookup-submit:hover {
    background: linear-gradient(135deg, #1a2d57 0%, #4268b8 100%);
    transform: translateY(-1px);
}

.bible-lookup-submit:active {
    transform: translateY(0);
}

.bible-lookup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

[data-theme="dark"] .bible-lookup-submit {
    background: linear-gradient(135deg, #0d1526 0%, #2a4080 100%);
}

[data-theme="dark"] .bible-lookup-submit:hover {
    background: linear-gradient(135deg, #111c33 0%, #335099 100%);
}

/* ============================================================================
   RECENT LOOKUPS
   ============================================================================ */

.bible-recent-lookups {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.bible-recent-lookups h6 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.5rem;
}

.bible-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bible-recent-item {
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.bible-recent-item:hover {
    background: #e0e0e0;
    color: #333;
}

[data-theme="dark"] .bible-recent-lookups {
    border-top-color: #333;
}

[data-theme="dark"] .bible-recent-item {
    background: #333340;
    color: #aaa;
}

[data-theme="dark"] .bible-recent-item:hover {
    background: #444450;
    color: #ddd;
}

/* ============================================================================
   VERSE DISPLAY
   ============================================================================ */

.bible-verse-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #395ba9;
}

.bible-verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bible-verse-reference {
    font-size: 1.25rem;
    font-weight: 600;
    color: #395ba9;
}

.bible-verse-translation {
    font-size: 0.875rem;
    color: #888;
    font-weight: normal;
}

[data-theme="dark"] .bible-verse-result {
    border-top-color: #2a4080;
}

[data-theme="dark"] .bible-verse-reference {
    color: #7fa8e8;
}

/* Verse text display */
.bible-verse-display {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.9;
    padding: 1.25rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    max-height: 400px;
    overflow-y: auto;
}

[data-theme="dark"] .bible-verse-display {
    background: #252530;
    border-color: #333;
    color: #e0e0e0;
}

/* Verse numbers */
.verse-number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.65em;
    vertical-align: super;
    color: #395ba9;
    margin-right: 0.15em;
    font-weight: 700;
}

[data-theme="dark"] .verse-number {
    color: #7fa8e8;
}

/* Chapter headers in multi-chapter passages */
.bible-chapter-header {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    color: #395ba9;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ddd;
}

.bible-chapter-header:first-child {
    margin-top: 0;
}

[data-theme="dark"] .bible-chapter-header {
    color: #7fa8e8;
    border-bottom-color: #444;
}

/* Truncation warning */
.bible-truncation-warning {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #856404;
}

[data-theme="dark"] .bible-truncation-warning {
    background: #3d3520;
    color: #ffc107;
}

/* ============================================================================
   DISPLAY OPTIONS & COPY
   ============================================================================ */

.bible-verse-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.bible-display-options {
    display: flex;
    gap: 1rem;
}

.bible-display-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
}

.bible-display-option input {
    cursor: pointer;
}

[data-theme="dark"] .bible-display-option {
    color: #aaa;
}

/* Copy button group */
.bible-copy-group {
    display: flex;
    gap: 0.25rem;
}

.bible-copy-btn {
    padding: 0.5rem 1rem;
    background: #395ba9;
    color: white;
    border: none;
    border-radius: 6px 0 0 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.bible-copy-btn:hover {
    background: #2e4a8a;
}

.bible-copy-dropdown-btn {
    padding: 0.5rem;
    background: #395ba9;
    color: white;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.2);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.bible-copy-dropdown-btn:hover {
    background: #2e4a8a;
}

[data-theme="dark"] .bible-copy-btn,
[data-theme="dark"] .bible-copy-dropdown-btn {
    background: #2a4080;
}

[data-theme="dark"] .bible-copy-btn:hover,
[data-theme="dark"] .bible-copy-dropdown-btn:hover {
    background: #335099;
}

/* Copy format dropdown */
.bible-copy-formats {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    min-width: 180px;
    display: none;
}

.bible-copy-formats.show {
    display: block;
}

.bible-copy-format-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.bible-copy-format-item:hover {
    background: #f5f5f5;
}

.bible-copy-format-item:first-child {
    border-radius: 6px 6px 0 0;
}

.bible-copy-format-item:last-child {
    border-radius: 0 0 6px 6px;
}

[data-theme="dark"] .bible-copy-formats {
    background: #2a2a35;
    border-color: #444;
}

[data-theme="dark"] .bible-copy-format-item {
    color: #ddd;
}

[data-theme="dark"] .bible-copy-format-item:hover {
    background: #333340;
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.bible-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #888;
}

.bible-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
}

/* ============================================================================
   ERROR MESSAGE
   ============================================================================ */

.bible-error {
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin-top: 1rem;
}

[data-theme="dark"] .bible-error {
    background: #3d2020;
    border-color: #5a3030;
    color: #f8d7da;
}

/* ============================================================================
   TOAST NOTIFICATION
   ============================================================================ */

.bible-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: #333;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bible-toast.show {
    opacity: 1;
}

.bible-toast.success {
    background: #28a745;
}

.bible-toast.error {
    background: #dc3545;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 576px) {
    .bible-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .bible-modal .modal-content {
        border-radius: 0;
        height: 100%;
    }

    .bible-modal .modal-body {
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }

    .bible-dropdown-row {
        flex-direction: column;
    }

    .bible-dropdown-group {
        min-width: 100%;
    }

    .bible-verse-to {
        display: none;
    }

    .bible-verse-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bible-display-options {
        justify-content: center;
    }

    .bible-copy-group {
        justify-content: center;
    }

    .bible-lookup-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Landscape on small devices */
@media (max-height: 500px) and (orientation: landscape) {
    .bible-lookup-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .bible-lookup-btn,
    .bible-mode-btn,
    .bible-lookup-submit,
    .bible-copy-btn,
    .bible-toast {
        transition: none;
    }

    .bible-lookup-btn:hover {
        transform: none;
    }
}

/* ============================================================================
   ABOUT SECTION
   ============================================================================ */

.bible-about {
    width: 100%;
    text-align: center;
    color: #395ba9;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .bible-about {
    color: #7fa8e8;
}

/* ============================================================================
   SEARCH PANEL
   ============================================================================ */

.bible-search-input-wrapper {
    position: relative;
}

.bible-search-input {
    padding-right: 2.5rem; /* Space for clear button */
}

.bible-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    line-height: 1;
}

.bible-search-clear:hover {
    color: #666;
}

[data-theme="dark"] .bible-search-clear {
    color: #666;
}

[data-theme="dark"] .bible-search-clear:hover {
    color: #999;
}

/* Search options */
.bible-search-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bible-search-type-label {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.bible-search-type-select {
    padding: 0.35rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.bible-search-type-select:focus {
    outline: none;
    border-color: #395ba9;
    box-shadow: 0 0 0 2px rgba(57, 91, 169, 0.1);
}

[data-theme="dark"] .bible-search-type-label {
    color: #aaa;
}

[data-theme="dark"] .bible-search-type-select {
    background: #2a2a35;
    border-color: #444;
    color: #ddd;
}

[data-theme="dark"] .bible-search-type-select:focus {
    border-color: #7fa8e8;
    box-shadow: 0 0 0 2px rgba(127, 168, 232, 0.15);
}

/* Search results */
.bible-search-results {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for Safari */
}

.bible-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-size: 0.8rem;
    color: #666;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bible-search-results-list {
    /* Content flows naturally, parent handles scrolling */
}

.bible-search-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0.75rem;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.15s;
}

.bible-search-result-item:hover {
    background: #f5f5f5;
}

.bible-search-result-item:last-child {
    border-bottom: none;
}

.bible-search-result-ref {
    font-weight: 600;
    font-size: 0.9rem;
    color: #395ba9;
}

.bible-search-result-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bible-search-highlight {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

.bible-search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

[data-theme="dark"] .bible-search-results {
    background: #252530;
    border-color: #444;
}

[data-theme="dark"] .bible-search-results-header {
    background: #2a2a35;
    border-bottom-color: #444;
    color: #888;
}

[data-theme="dark"] .bible-search-result-item {
    border-bottom-color: #333;
}

[data-theme="dark"] .bible-search-result-item:hover {
    background: #2a2a35;
}

[data-theme="dark"] .bible-search-result-ref {
    color: #7fa8e8;
}

[data-theme="dark"] .bible-search-result-text {
    color: #aaa;
}

[data-theme="dark"] .bible-search-highlight {
    background: #3d3520;
    color: #ffc107;
}

/* ============================================================================
   HISTORY SECTION
   ============================================================================ */

.bible-history-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.bible-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bible-history-header h6 {
    margin-bottom: 0;
}

.bible-history-section h6 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 0.75rem;
}

.bible-history-clear-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bible-history-clear-btn:hover {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

[data-theme="dark"] .bible-history-clear-btn {
    border-color: #444;
    color: #888;
}

[data-theme="dark"] .bible-history-clear-btn:hover {
    background: #3d2020;
    border-color: #5a3030;
    color: #f8d7da;
}

.bible-history-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.bible-history-tab {
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.bible-history-tab:hover {
    background: #e0e0e0;
}

.bible-history-tab.active {
    background: #395ba9;
    color: white;
}

.bible-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bible-history-item {
    padding: 0.35rem 0.75rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bible-history-item:hover {
    background: #e0e0e0;
    color: #333;
}

.bible-history-query {
    font-style: italic;
}

.bible-history-count {
    font-size: 0.7rem;
    color: #888;
}

.bible-history-empty {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.bible-history-guest {
    color: #888;
    font-size: 0.85rem;
    padding: 0.5rem;
}

.bible-history-guest a {
    color: #395ba9;
    text-decoration: underline;
}

[data-theme="dark"] .bible-history-section {
    border-top-color: #333;
}

[data-theme="dark"] .bible-history-tab {
    background: #333340;
    color: #aaa;
}

[data-theme="dark"] .bible-history-tab:hover {
    background: #444450;
}

[data-theme="dark"] .bible-history-tab.active {
    background: #2a4080;
    color: white;
}

[data-theme="dark"] .bible-history-item {
    background: #333340;
    color: #aaa;
}

[data-theme="dark"] .bible-history-item:hover {
    background: #444450;
    color: #ddd;
}

[data-theme="dark"] .bible-history-guest a {
    color: #7fa8e8;
}

/* ============================================================================
   EXPAND CHAPTER BUTTON
   ============================================================================ */

.bible-expand-chapter {
    margin-top: 0.75rem;
    text-align: center;
}

.bible-expand-chapter-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #395ba9;
    color: #395ba9;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bible-expand-chapter-btn:hover {
    background: #395ba9;
    color: white;
}

[data-theme="dark"] .bible-expand-chapter-btn {
    background: #252530;
    border-color: #7fa8e8;
    color: #7fa8e8;
}

[data-theme="dark"] .bible-expand-chapter-btn:hover {
    background: #2a4080;
    border-color: #2a4080;
    color: white;
}

/* ============================================================================
   CHAPTER NAVIGATION
   ============================================================================ */

.bible-chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.bible-chapter-nav-btn {
    padding: 0.4rem 0.75rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bible-chapter-nav-btn:hover:not(:disabled) {
    background: #395ba9;
    border-color: #395ba9;
    color: white;
}

.bible-chapter-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f0f0f0;
}

.bible-chapter-nav-current {
    font-size: 0.9rem;
    font-weight: 600;
    color: #395ba9;
}

[data-theme="dark"] .bible-chapter-nav {
    background: #252530;
}

[data-theme="dark"] .bible-chapter-nav-btn {
    background: #2a2a35;
    border-color: #444;
    color: #aaa;
}

[data-theme="dark"] .bible-chapter-nav-btn:hover:not(:disabled) {
    background: #2a4080;
    border-color: #2a4080;
    color: white;
}

[data-theme="dark"] .bible-chapter-nav-btn:disabled {
    background: #1e1e24;
}

[data-theme="dark"] .bible-chapter-nav-current {
    color: #7fa8e8;
}

/* Target verse highlight (for search context) */
.bible-verse-target {
    background: rgba(57, 91, 169, 0.1);
    padding: 0.25rem 0;
    border-radius: 4px;
}

[data-theme="dark"] .bible-verse-target {
    background: rgba(127, 168, 232, 0.15);
}

/* ============================================================================
   MOBILE FIXED COPY BUTTONS
   ============================================================================ */

@media (max-width: 576px) {
    .bible-modal .modal-body {
        padding-bottom: 80px; /* Space for fixed copy buttons */
    }

    .bible-copy-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fdfcfa;
        border-top: 1px solid #ddd;
        padding: 0.75rem 1rem;
        z-index: 1060;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }

    .bible-verse-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bible-display-options {
        justify-content: center;
        margin-bottom: 0;
    }

    /* Hide actions row in result when showing fixed buttons */
    .bible-verse-result .bible-copy-actions {
        position: fixed;
    }

    [data-theme="dark"] .bible-copy-actions {
        background: #1e1e24;
        border-top-color: #333;
    }

    /* Search results mobile adjustments */
    .bible-search-results {
        max-height: 250px;
    }

    .bible-search-result-item {
        padding: 0.6rem;
    }

    /* History mobile adjustments */
    .bible-history-list {
        max-height: 120px;
        overflow-y: auto;
    }
}
