/* XCake public live search */

.search-page {
    padding-bottom: 64px;
}

.search-hero {
    margin-top: 18px;
    padding: clamp(24px, 5vw, 52px);
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, .72), transparent 36%),
        linear-gradient(135deg, #fff7ed, #f8e4d4);
    border: 1px solid #ead5c2;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(92, 55, 39, .08);
}

.search-title {
    margin: 10px 0 8px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.02;
    letter-spacing: -.04em;
}

.search-lead {
    max-width: 760px;
    margin: 0;
    color: #6f625a;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.6;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 28px;
}

.search-input-shell {
    min-height: 62px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #dfc9b7;
    border-radius: 17px;
    box-shadow: 0 10px 28px rgba(91, 57, 42, .08);
}

.search-input-shell:focus-within {
    border-color: #b96f53;
    box-shadow: 0 0 0 4px rgba(185, 111, 83, .14);
}

.search-input-icon {
    color: #a7654f;
    font-size: 31px;
    line-height: 1;
}

.search-input {
    width: 100%;
    min-width: 0;
    padding: 17px 0;
    color: #342b27;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 18px;
}

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

.search-clear {
    width: 36px;
    height: 36px;
    padding: 0;
    color: #7b685f;
    background: #f5ede8;
    border: 0;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.search-submit,
.search-more {
    min-height: 52px;
    padding: 0 23px;
    color: #fff;
    background: #9d543e;
    border: 0;
    border-radius: 15px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.search-submit:hover,
.search-more:hover {
    background: #874532;
}

.search-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: #78675e;
    font-size: 14px;
}

.search-popular button {
    padding: 7px 11px;
    color: #704434;
    background: rgba(255, 255, 255, .72);
    border: 1px solid #dfc6b4;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
}

.search-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0 18px;
}

.search-sort-label {
    display: grid;
    gap: 7px;
    color: #71645d;
    font-size: 13px;
    font-weight: 800;
}

.search-sort-label select {
    min-height: 44px;
    padding: 0 38px 0 13px;
    color: #3f342f;
    background: #fff;
    border: 1px solid #dbc9be;
    border-radius: 11px;
    font: inherit;
}

.search-status {
    margin: 0;
    color: #756860;
}

.search-results[aria-busy="true"] {
    opacity: .7;
}

.search-welcome,
.search-empty,
.search-error {
    grid-column: 1 / -1;
    padding: 52px 24px;
    text-align: center;
    background: #fffaf6;
    border: 1px dashed #dfc7b7;
    border-radius: 22px;
}

.search-welcome-icon,
.search-empty-icon,
.search-error-icon {
    margin-bottom: 10px;
    font-size: 44px;
}

.search-welcome h2,
.search-empty h2,
.search-error h2 {
    margin: 0 0 8px;
}

.search-welcome p,
.search-empty p,
.search-error p {
    max-width: 540px;
    margin: 0 auto;
    color: #786b64;
    line-height: 1.55;
}

.search-skeleton {
    min-height: 330px;
    overflow: hidden;
    background: #f2ebe6;
    border-radius: 20px;
    position: relative;
}

.search-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
    animation: search-shimmer 1.1s infinite;
}

@keyframes search-shimmer {
    to { transform: translateX(100%); }
}

.search-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.search-more {
    min-width: 190px;
}

.search-more:disabled {
    opacity: .55;
    cursor: wait;
}

@media (max-width: 760px) {
    .search-hero {
        border-radius: 22px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-submit {
        width: 100%;
    }

    .search-controls {
        display: grid;
        align-items: stretch;
    }

    .search-sort-label select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-page {
        padding-bottom: 38px;
    }

    .search-hero {
        padding: 22px 17px;
    }

    .search-input-shell {
        min-height: 56px;
        padding: 0 12px;
    }

    .search-input {
        font-size: 16px;
    }
}
