/* Recipe search box.
 *
 * Shared by /recipes and its hubs, the A-Z index pages and every single
 * recipe page, so it hardcodes the brand palette rather than reading CSS
 * variables: those four pages define their custom properties in three
 * different places and one of them not at all.
 *
 * Brand: peach #FFB4A2, coral #FF8A73, sage #B4C7A8, cream #FFF8F0,
 * charcoal #2D2A26, muted #7A7068, hairline #EADBCB.
 */

.recipe-search {
    width: 100%;
    max-width: 620px;
    margin: 1.5rem 0 0;
    font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

.recipe-search-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A89E95;
    margin-bottom: 0.5rem;
}

.recipe-search-field {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.recipe-search-input-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.recipe-search-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #A89E95;
    pointer-events: none;
}

.recipe-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-family: inherit;
    font-size: 1rem;
    color: #2D2A26;
    background: #FFFFFF;
    border: 1px solid #EADBCB;
    border-radius: 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.recipe-search-input::placeholder {
    color: #A89E95;
}

.recipe-search-input:focus {
    border-color: #FF8A73;
    box-shadow: 0 0 0 3px rgba(255, 138, 115, 0.18);
}

/* Kill the WebKit clear cross: it sits under our own icon spacing and looks
   like a broken second control. */
.recipe-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.recipe-search-button {
    flex: 0 0 auto;
    padding: 0.85rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    background: #FF8A73;
    border: 1px solid #FF8A73;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.recipe-search-button:hover,
.recipe-search-button:focus {
    background: #F4745C;
    border-color: #F4745C;
}

.recipe-search-hint {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: #7A7068;
}

.recipe-search-hint a {
    color: #FF8A73;
    font-weight: 600;
    text-decoration: none;
}

.recipe-search-hint a:hover {
    text-decoration: underline;
}

/* Compact variant: single recipe pages and the A-Z index, where search is a
   secondary action and must not compete with the page's own content. */
.recipe-search--compact {
    max-width: 460px;
    margin: 1.25rem 0;
}

.recipe-search--compact .recipe-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.recipe-search--compact .recipe-search-input {
    padding: 0.7rem 0.9rem 0.7rem 2.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

.recipe-search--compact .recipe-search-button {
    padding: 0.7rem 1.15rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* Alignment slot for single recipe pages, whose breadcrumb and content column
   are 900px wide with 2rem gutters. */
.recipe-search-slot {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 0.75rem;
}

/* Results state on /recipes */

.recipe-search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #7A7068;
}

.recipe-search-summary strong {
    color: #2D2A26;
}

.recipe-search-clear {
    color: #FF8A73;
    font-weight: 600;
    text-decoration: none;
}

.recipe-search-clear:hover {
    text-decoration: underline;
}

.recipe-search-empty {
    padding: 2.5rem 1.5rem;
    background: #FFF8F0;
    border: 1px solid #EADBCB;
    border-radius: 16px;
    text-align: center;
}

.recipe-search-empty h3 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #2D2A26;
    margin: 0 0 0.65rem;
}

.recipe-search-empty p {
    max-width: 46ch;
    margin: 0 auto 1.25rem;
    font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.98rem;
    line-height: 1.6;
    color: #7A7068;
}

.recipe-search-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.recipe-search-empty-actions a {
    display: inline-block;
    padding: 0.6rem 1.15rem;
    font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2D2A26;
    background: #FFFFFF;
    border: 1px solid #EADBCB;
    border-radius: 999px;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.recipe-search-empty-actions a:hover {
    border-color: #FF8A73;
    color: #FF8A73;
}

@media (max-width: 560px) {
    .recipe-search-field {
        flex-wrap: wrap;
    }

    .recipe-search-input-wrap {
        flex: 1 1 100%;
    }

    .recipe-search-button {
        flex: 1 1 100%;
    }
}
