/* Search appearance is shared by booking, events and news. */
.spinmatch-search {
    min-width: 0;
}

.spinmatch-search .search-reveal {
    min-width: 0;
    min-height: 0;
}

.spinmatch-search .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    min-height: 40px;
    box-sizing: border-box;
    padding: 5px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.spinmatch-search .search-input-wrapper:focus-within {
    background: rgba(255,255,255,.025);
    box-shadow: inset 0 -1px 0 rgba(236,239,244,.42);
}

.spinmatch-search .search-icon {
    position: static;
    transform: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    flex-shrink: 0;
    pointer-events: none;
}

.spinmatch-search .search-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.5;
    appearance: none;
}

.spinmatch-search .search-input::placeholder {
    color: var(--sm-field-placeholder, #9599a3);
}

.spinmatch-search .search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.spinmatch-search .search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.spinmatch-search .search-clear[hidden] {
    display: none;
}

.spinmatch-search .search-clear:hover {
    color: var(--sm-text, #f4f5f7);
    background: rgba(var(--sm-accent-rgb, 216, 222, 232), 0.1);
}

.spinmatch-search .search-clear:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 1px;
}

@media (max-width: 768px) {
    .spinmatch-search .search-input-wrapper {
        min-width: 0;
        max-width: 100%;
        min-height: 46px;
        padding: 0 10px;
    }

    .spinmatch-search .search-input {
        font-size: 1rem;
    }

    .spinmatch-search .search-clear {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
        margin-right: -10px;
    }
}

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;

}

.search-toggle.active {
    background: rgba(var(--sm-accent-rgb, 216, 222, 232), 0.15);
    color: var(--sm-text, #f4f5f7);
}

.search-toggle i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .spinmatch-search.mobile-search-collapsible {
        display: grid;
        grid-template-rows: 0fr;
        width: 100%;
        margin: 0;
        min-width: 0;
        max-width: 100%;
        order: 2;
        opacity: 0;
        visibility: hidden;
        transition: grid-template-rows 220ms cubic-bezier(.22,.68,0,1),
            margin-top 220ms cubic-bezier(.22,.68,0,1), opacity 180ms ease,
            visibility 0s linear 220ms;
    }

    .spinmatch-search.mobile-search-collapsible > .search-reveal {
        overflow: hidden;
    }

    .spinmatch-search.mobile-search-collapsible.show {
        grid-template-rows: 1fr;
        margin-top: 4px;
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }
}

@media (min-width: 769px) {
    .search-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .spinmatch-search.mobile-search-collapsible,
    .spinmatch-search.mobile-search-collapsible.show {
        transition: none;
        transform: none;
    }
}

/* Optional full-width reveal uses the same motion as the mobile search. */
.spinmatch-search.search-collapsible {
    display:grid;grid-template-rows:0fr;min-width:0;max-width:100%;
    opacity:0;visibility:hidden;
    transition:grid-template-rows 220ms cubic-bezier(.22,.68,0,1),opacity 180ms ease,visibility 0s linear 220ms;
}
.spinmatch-search.search-collapsible>.search-reveal { overflow:hidden; }
.spinmatch-search.search-collapsible.show { grid-template-rows:1fr;opacity:1;visibility:visible;transition-delay:0s; }
@media(prefers-reduced-motion:reduce) { .spinmatch-search.search-collapsible { transition:none; } }
