/**
 * Search Dialog Form
 * ------------------
 * Styles for .woa-search-form — the plain HTML search form used
 * inside the WOA Search popup synced block.
 *
 * ARCHITECTURE NOTE: These are THEME-level styles, not popup-manager
 * styles. The popup manager (woa-popup.css) is content-agnostic.
 * Add styles for other dialog content types alongside this file.
 */


/* ── Form layout ────────────────────────────────────────────────── */
.woa-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}


/* ── Search input ───────────────────────────────────────────────── */
.woa-search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;                           /* allows shrink in flex */
    height: 48px;
    padding: 0 16px;
    border: 2px solid var(--wp--preset--color--contrast);
    border-radius: 12px;
    background: transparent;
    font-family: var(--wp--preset--font-family--baloo-bhai-2);
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--contrast);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woa-search-form input[type="search"]:focus {
    border-color: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 3px rgba(166, 148, 211, 0.20);
}

.woa-search-form input[type="search"]::placeholder {
    color: var(--wp--preset--color--contrast);
    opacity: 0.45;
}

/* Remove the native clear (×) button on search inputs */
.woa-search-form input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}


/* ── Submit button ──────────────────────────────────────────────── */
.woa-search-form button[type="submit"] {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.woa-search-form button[type="submit"]:hover,
.woa-search-form button[type="submit"]:focus-visible {
    background: var(--wp--preset--color--accent);
    outline: none;
}

.woa-search-form button[type="submit"] svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}


/* ── Screen-reader-only label ───────────────────────────────────── */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
