/* Bible Verse Highlighter Library CSS - Минималистичный стиль для белого дизайна */
/* Version 1.0 - Compatible with any SPA projects */

.bible-ref {
    background: none;
    padding: 1px 2px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    color: #4a90a4;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
    display: inline;
}

.bible-ref:hover {
    background: #f8f9fa;
    color: #2c3e50;
    border-bottom-color: #4a90a4;
    text-decoration: none;
}

.bible-tooltip {
    position: fixed;
    background: #ffffff;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    z-index: 9999;
    max-width: 400px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 18px;
    line-height: 1.5;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: default;
    font-family: Georgia, 'Times New Roman', serif;
}

.bible-tooltip.show {
    display: block;
    opacity: 1;
}

.bible-tooltip::-webkit-scrollbar {
    width: 6px;
}

.bible-tooltip::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bible-tooltip::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bible-tooltip::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.bible-tooltip-header {
    font-weight: bold;
    color: #4a90a4;
    margin-bottom: 8px;
    font-size: 16px;
}

.bible-tooltip-verse {
    margin-bottom: 0;
    text-align: justify;
}

.bible-tooltip-verse-number {
    font-weight: bold;
    color: #6c757d;
    margin-right: 4px;
}

.bible-tooltip-loading {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.bible-tooltip-error {
    color: #dc3545;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.bible-tooltip-close {
    text-align: right;
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.7;
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .bible-ref {
        color: #8fd3f4;
        border-bottom-color: #34495e;
    }
    
    .bible-ref:hover {
        background: #2c3e50;
        color: white !important;
        border-bottom-color: #8fd3f4;
    }
    
    .bible-tooltip {
        background: #2c3e50;
        color: white;
        border-color: #34495e;
    }
    
    .bible-tooltip-header {
        color: #8fd3f4;
    }
    
    .bible-tooltip-verse-number {
        color: #84fab0;
    }
    
    .bible-tooltip::-webkit-scrollbar-track {
        background: #34495e;
    }
    
    .bible-tooltip::-webkit-scrollbar-thumb {
        background: #84fab0;
    }
    
    .bible-tooltip::-webkit-scrollbar-thumb:hover {
        background: #8fd3f4;
    }
    
    .bible-tooltip-close {
        border-top-color: #34495e;
    }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .bible-tooltip {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 100px);
        font-size: 15px;
    }
}

/* Дополнительные правила для очень узких экранов */
@media (max-width: 480px) {
    .bible-tooltip {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
        width: calc(100vw - 20px) !important;
        max-height: 60vh !important;
        font-size: 16px !important;
        padding: 12px !important;
    }
}

@media (max-width: 360px) {
    .bible-tooltip {
        left: 5px !important;
        right: 5px !important;
        width: calc(100vw - 10px) !important;
        font-size: 15px !important;
        padding: 10px !important;
        max-height: 50vh !important;
    }
}

/* Печать - скрыть тултипы */
@media print {
    .bible-tooltip {
        display: none !important;
    }
    
    .bible-ref {
        background: none !important;
        color: inherit !important;
        text-decoration: underline;
        border: none !important;
    }
}