/* Explain: Styles for the header search bar component, visible on medium screens and up. */
/* ---------- مربع البحث في ترويسة الموقع ---------- */
.header-search {
    display: none;
}

@media (min-width: 768px) {
    .header-search {
        display: flex;
        width: 150px;
    }
}

@media (min-width: 1024px) {
    .header-search {
        width: 165px;
    }
}

@media (min-width: 1280px) {
    .header-search { width: 220px; }
}

.header-search-mobile {
    display: flex;
    width: 100%;
    margin-bottom: 0.75rem;
}

.header-search,
.header-search-mobile {
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.header-search:focus-within,
.header-search-mobile:focus-within {
    border-color: var(--primary-color);
}

.header-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0.5rem 0.8rem;
    color: var(--text-color);
    font-size: 0.88rem;
}

.header-search-input::placeholder { color: var(--text-muted); }
.header-search-input:focus { outline: none; }

.header-search-btn {
    flex-shrink: 0;
    width: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.header-search-btn:hover {
    color: var(--primary-color);
    background: rgba(212, 175, 55, 0.08);
}

.header-search-btn:focus-visible {
    outline: none;
    color: var(--primary-color);
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.header-search-voice {
    flex-shrink: 0;
    width: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease, background 0.25s ease;
}

.header-search-voice:hover {
    color: var(--primary-color);
    background: rgba(212, 175, 55, 0.08);
}

.header-search-voice:focus-visible {
    outline: none;
    color: var(--primary-color);
    box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.header-search-voice.is-recording {
    color: #ef4444;
}

.header-search-voice.is-recording i {
    animation: voicePulse 1.1s ease-in-out infinite;
}