/* ============================================================
   ВИДЖЕТ "ПРАВОСЛАВНЫЙ СЛОВАРЬ" (Оригинальный темный стиль)
   ============================================================ */
.lexicon-widget-block {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    font-family: "Georgia", serif;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.8)),
    url('/wp-content/uploads/gemini_generated_image_peilfrpeilfrpeil.webp') center/cover no-repeat !important;
    color: #fff;
    text-align: center;
    padding: 40px 30px;
    border: 1px solid rgba(245, 230, 184, 0.3);
    box-sizing: border-box;
    /* backdrop-filter УДАЛЕН для устранения зависаний при прокрутке */
}

.lexicon-widget-block h3.olw-section-title {
    font-family: 'Advent Pro', 'oldcyr_bold', serif !important;
    font-size: 26px !important;
    font-weight: normal;
    margin: 0 0 20px;
    color: #f5e6b8 !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lexicon-widget-block .olw-divider {
    border: 0;
    border-top: 1px dashed rgba(179,139,77,0.4);
    margin: 25px 0;
    opacity: 0.8;
}

/* Умный поиск (Поле и кнопка) */
.olw-search-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}
.olw-search-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(245, 230, 184, 0.3);
    border-radius: 10px;
    padding: 14px 20px;
    font-family: "Georgia", serif;
    font-size: 1.1em;
    color: #f5e6b8;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}
.olw-search-input::placeholder {
    color: rgba(245, 230, 184, 0.5);
}
.olw-search-input:focus {
    outline: none;
    border-color: #b38b4d;
    background: rgba(0, 0, 0, 0.6);
}
.olw-search-btn {
    background: rgba(179, 139, 77, 0.2);
    border: 1px solid rgba(245, 230, 184, 0.3);
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.olw-search-btn:hover {
    background: rgba(179, 139, 77, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Режим учёбы: Флешкарточки */
.olw-flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.olw-flashcard {
    background: rgba(179, 139, 77, 0.2);
    border: 1px solid rgba(245, 230, 184, 0.3);
    color: #f5e6b8;
    font-weight: bold;
    font-size: 1.1em;
    border-radius: 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s ease;
    text-align: center;
}
.olw-flashcard:hover {
    background: rgba(179, 139, 77, 0.4);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.olw-study-hint {
    text-align: center;
    font-size: 0.9em;
    font-style: italic;
    color: #e6c28a;
    opacity: 0.8;
    margin-top: 5px;
}

/* ============================================================
   МОДАЛЬНЫЕ ОКНА
   ============================================================ */
.lexicon-modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.96); 
    z-index: 10000000; 
    align-items: center; 
    justify-content: center; 
    /* backdrop-filter УДАЛЕН */
}
.lexicon-modal-inner {
    max-width: 850px; 
    width: 92%; 
    max-height: 85vh;
    background: #1a1a1a; 
    border: 1px solid #b38b4d;
    padding: 50px; 
    overflow-y: auto; 
    position: relative;
    color: #fdfaf3; 
    border-radius: 20px; 
    font-family: "Georgia", serif;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}
.lexicon-modal-h { 
    text-align: center; 
    color: #f5e6b8; 
    margin-bottom: 35px; 
    font-weight: normal; 
    border-bottom: 1px double rgba(179,139,77,0.4); 
    padding-bottom: 25px; 
    font-size: 32px; 
    font-family: 'oldcyr_bold', 'Advent Pro', serif !important;
}
.lexicon-modal-close { 
    position: absolute; 
    top: 15px; 
    right: 25px; 
    background: none !important; 
    border: none !important; 
    color: #b38b4d; 
    font-size: 50px; 
    cursor: pointer; 
    line-height: 1; 
    transition: 0.3s; 
}
.lexicon-modal-close:hover { color: #fdfaf3; transform: rotate(90deg); }

.lexicon-search-result-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px dashed rgba(179,139,77,0.3);
}
.lexicon-search-result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.lexicon-search-result-term {
    font-size: 1.4em;
    color: #e6c28a;
    margin-bottom: 10px;
    font-weight: bold;
}
.lexicon-search-result-def {
    line-height: 1.8;
    font-size: 1.1em;
    text-align: justify;
}

/* Стили для читабельности подзаголовков внутри результатов */
.lexicon-search-result-def h2,
.lexicon-search-result-def h3,
.lexicon-search-result-def h4 {
    color: #e6c28a;
    font-family: 'oldcyr_bold', 'Advent Pro', serif !important;
    font-size: 1.4em;
    font-weight: normal;
    margin: 25px 0 15px 0;
    line-height: 1.4;
}

.lexicon-search-result-def p {
    margin-bottom: 15px;
}

.lexicon-search-result-def blockquote {
    border-left: 2px solid #b38b4d;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: rgba(253, 250, 243, 0.9);
}

.lexicon-modal-inner::-webkit-scrollbar { width: 4px; }
.lexicon-modal-inner::-webkit-scrollbar-thumb { background: #b38b4d; border-radius: 2px; }

@media (max-width: 921px) {
    .lexicon-widget-block { 
        padding: 30px 20px !important; 
        margin: 20px 0 !important; 
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px;
        border-left: none !important;
        border-right: none !important;
    }
    .lexicon-modal-inner { padding: 30px 20px; width: 96%; }
}