/* ========================================
   MUJAM SEARCH + АЛФАВИТНАЯ НАВИГАЦИЯ
   ======================================== */

/* ── Поисковая строка ── */
.mujam-search-bar {
    padding: 16px 0 8px;
}

.mujam-search-input-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.mujam-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}

.mujam-search-input {
    width: 100%;
    padding: 10px 40px 10px 42px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md, 12px);
    font-size: 15px;
    font-family: 'Inter', 'Amiri', sans-serif;
    background: var(--white, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #1f2937;
}
.mujam-search-input::placeholder { color: #9ca3af; }
.mujam-search-input:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 10%, transparent);
}

.mujam-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #9ca3af;
    cursor: pointer;
    display: none;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.mujam-search-clear:hover { color: #374151; background: #f3f4f6; }
.mujam-search-clear.visible { display: block; }

[dir="rtl"] .mujam-search-icon { left: auto; right: 14px; }
[dir="rtl"] .mujam-search-input { padding: 10px 42px 10px 40px; direction: rtl; text-align: end; }
[dir="rtl"] .mujam-search-clear { right: auto; left: 12px; }

/* ── Арабский алфавит ── */
.mujam-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
}

.mujam-alpha-btn {
    min-width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: var(--white, #fff);
    font-family: 'Amiri', serif;
    font-size: 16px;
    color: #374151;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mujam-alpha-btn:hover {
    border-color: var(--emerald);
    color: var(--emerald);
    background: var(--emerald-50, #ecfdf5);
}
.mujam-alpha-btn.active {
    background: var(--emerald);
    color: #fff;
    border-color: var(--emerald);
}

/* ── Русский алфавит ── */
.mujam-alphabet-ru {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    border-top: 1px solid #f3f4f6;
    padding-top: 6px;
    margin-top: 2px;
}

.mujam-alpha-btn-ru {
    min-width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: var(--white, #fff);
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mujam-alpha-btn-ru:hover {
    border-color: var(--gold, #c5a059);
    color: var(--gold-dark, #a8873d);
    background: #fef9ee;
}
.mujam-alpha-btn-ru.active {
    background: var(--gold, #c5a059);
    color: #fff;
    border-color: var(--gold);
}

/* ── Счётчик результатов ── */
.mujam-results-count {
    padding: 6px 0;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}
.mujam-results-count strong {
    color: var(--emerald);
    font-weight: 700;
}
