.sfsb-search-wrapper,
.sfsb-search-wrapper * {
    box-sizing: border-box;
}

.sfsb-search-wrapper {
    width: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
}

.sfsb-search-form {
    margin: 0;
    padding: 0;
}

.sfsb-input-container {
    display: flex;
    align-items: stretch;
    width: min(100%, 484px);
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.18s ease;
}

.sfsb-input-container:hover {
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.10);
}

.sfsb-input-container:focus-within {
    box-shadow: 0 0 16px rgba(171, 71, 188, 0.45);
}

.sfsb-search-input::-webkit-search-decoration,
.sfsb-search-input::-webkit-search-cancel-button,
.sfsb-search-input::-webkit-search-results-button,
.sfsb-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.sfsb-search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #b5b5b5;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #eeeeee;
    color: #212121;
    font: inherit;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.sfsb-input-container:hover .sfsb-search-input,
.sfsb-input-container:focus-within .sfsb-search-input {
    border-color: #b5b5b5;
}

.sfsb-search-input::placeholder {
    color: #757575;
    opacity: 1;
}

.sfsb-search-input:focus {
    outline: none;
    box-shadow: none;
}

.sfsb-search-submit {
    flex: 0 0 64px;
    width: 64px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: #d500f9;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.sfsb-search-submit:hover,
.sfsb-search-submit:focus {
    background: #ab47bc;
    color: #ffffff;
    outline: none;
    box-shadow: none;
}

.sfsb-search-submit svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

.sfsb-screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

@media (prefers-color-scheme: dark) {
    .sfsb-input-container:hover {
        box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
    }

    .sfsb-input-container:focus-within {
        box-shadow: 0 0 18px rgba(213, 0, 249, 0.55);
    }

    .sfsb-search-input {
        background: #1a1a1a;
        border-color: #444444;
        color: #eeeeee;
    }

    .sfsb-input-container:hover .sfsb-search-input,
    .sfsb-input-container:focus-within .sfsb-search-input {
        border-color: #444444;
    }

    .sfsb-search-input::placeholder {
        color: #888888;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sfsb-input-container,
    .sfsb-search-submit {
        transition: none;
    }
}

/* Hide the page title only when the page contains a Keebu Search shortcode. */
body.keebu-search-page .entry-title,
body.keebu-search-page .page-title,
body.keebu-search-page h1.entry-title,
body.keebu-search-page .wp-block-post-title,
body.keebu-search-page header.entry-header > h1,
body.keebu-search-page .elementor-page-title,
body.keebu-search-page .ast-single-post-order .entry-title {
    display: none !important;
}
