/* ============================================================
   Fullscreen Search Overlay
   Подключите этот файл через Elementor → Custom CSS или
   wp_enqueue_style() в functions.php
   ============================================================ */

/* ── Overlay ──────────────────────────────────────────────── */
.fs-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    /* Стартовое состояние (скрыт) */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1),
                visibility .35s cubic-bezier(.4, 0, .2, 1);
}

.fs-search-overlay.fs-search--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Декоративный градиент ──────────────────────────────── */
.fs-search-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(99, 102, 241, .18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 35% at 80% 70%, rgba(168, 85, 247, .14) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Кнопка закрытия ────────────────────────────────────── */
.fs-search-close {
    position: absolute;
    top: 28px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s, border-color .2s;
    z-index: 1;
}

.fs-search-close:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .4);
    transform: rotate(90deg) scale(1.1);
}

/* ── Подсказка ESC ──────────────────────────────────────── */
.fs-search-esc-hint {
    position: absolute;
    top: 40px;
    right: 92px;
    color: rgba(255, 255, 255, .4);
    font-size: 12px;
    letter-spacing: .05em;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fs-search-esc-hint kbd {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .5);
    font-family: monospace;
}

/* ── Внутренний контейнер ───────────────────────────────── */
.fs-search-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 780px;
    padding: 0 24px;

    /* Анимация появления контента */
    transform: translateY(24px);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1) .05s;
}

.fs-search-overlay.fs-search--open .fs-search-inner {
    transform: translateY(0);
}

/* ── Заголовок ──────────────────────────────────────────── */
.fs-search-label {
    display: block;
    color: rgba(255, 255, 255, .45);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ── Поле поиска ────────────────────────────────────────── */
.fs-search-form {
    display: flex;
    padding-bottom: 15px;
    align-items: center;
    gap: 0;
    border-bottom: 2px solid rgba(255, 255, 255, .18);
    transition: border-color .25s;
}

.fs-search-form:focus-within {
    border-color: rgba(99, 102, 241, .8);
}
select, textarea, html input[type="search"], html input[type="text"], html input[type="email"], html input[type="password"], html input[type="date"], html input[type="number"], html input[type="tel"], .woocommerce form .form-row .input-text, .woocommerce form .form-row select, body .select2-container-default .select2-selection--ts-single, body .select2-container-default .select2-search--ts-dropdown .select2-search__field, .woocommerce form .form-row.woocommerce-validated input.input-text, .woocommerce form .form-row.woocommerce-validated select, #add_payment_method table.cart td.actions .coupon .input-text, .chosen-container a.chosen-single, .woocommerce-cart table.cart td.actions .coupon .input-text, .woocommerce-checkout .form-row .chosen-container-single .chosen-single, .woocommerce-checkout table.cart td.actions .coupon .input-text, .woocommerce-page table.cart td.actions .coupon .input-text, body .select2-container-default .select2-selection--ts-multiple, body .select2-container--default .select2-selection--single .select2-selection__rendered {
    filter: none !important;
    margin-bottom: 0;
    border-radius: 36px !important;
    width: 100%;
    line-height: var(--ts-btn-line-height);
    color: var(--ts-input-color);
    background-color: var(--ts-input-bg-color);
    border: 1px solid var(--ts-input-border);
    padding: var(--ts-btn-pd-v) var(--ts-btn-pd-h);
    box-shadow: none;
    border-radius: 0;
}
.fs-search-form svg.fs-search-icon {
    flex-shrink: 0;
    display: none;
    width: 26px;
    height: 26px;
    fill: rgba(255, 255, 255, .4);
    margin-right: 16px;
    transition: fill .2s;
}

.fs-search-form:focus-within svg.fs-search-icon {
    fill: rgba(99, 102, 241, .9);
}

.fs-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 300;
    letter-spacing: -.01em;
    padding: 16px 0;
    caret-color: #6366f1;

    /* Placeholder */
    font-family: inherit;
}

.fs-search-input::placeholder {
    color: rgba(255, 255, 255, .2);
}

.fs-search-submit {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin-left: 16px;
    background: #6366f1;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
}

.fs-search-submit:hover {
    background: #4f46e5;
    transform: scale(1.07);
}

.fs-search-submit svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* ── Подсказки / быстрые ссылки ─────────────────────────── */
.fs-search-suggestions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fs-search-suggestions-label {
    color: rgba(255, 255, 255, .35);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    flex: 0 0 100%;
    margin-bottom: 2px;
}

.fs-search-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50px;
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    text-decoration: none;
    background: rgba(255, 255, 255, .05);
    transition: background .2s, border-color .2s, color .2s, transform .15s;
    cursor: pointer;
}

.fs-search-tag:hover {
    background: rgba(99, 102, 241, .2);
    border-color: rgba(99, 102, 241, .5);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ── Иконка поиска (тригер) — курсор ───────────────────── */
.elementor-element-ac093df {
    cursor: pointer;
}

.elementor-element-ac093df .elementor-icon {
    transition: transform .2s, opacity .2s;
}

.elementor-element-ac093df:hover .elementor-icon {
    transform: scale(1.15);
    opacity: .75;
}

/* ── Мобильная адаптация ────────────────────────────────── */
@media (max-width: 600px) {
    .fs-search-esc-hint { display: none; }
    .fs-search-close { top: 16px; right: 16px; }
    .fs-search-inner { padding: 0 16px; }
}
