/* ==========================================================================
   Find a Lawyer — shared filter form
   Used by: aggressive_nimble_responsive (home banner card) and teamfind.php.
   Field rules are scoped under .team-filter so they outrank the theme's
   global `input[type="text"]` / `select` resets in style.css.

   Two variants share one set of field styles:
     .team-filter--card  -> "How can we help?" card in the home banner
     .team-filter--find  -> "Find a Lawyer" panel on the results page
   ========================================================================== */

.team-filter {
    display: block;
    width: 100%;
}

.team-filter-heading {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.7;
    margin: 0 0 10px;
}

.team-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.team-filter-field {
    position: relative;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Inputs and selects — same 46px pill on a translucent white fill so both
   the navy banner and the blue panel read the same.
   -------------------------------------------------------------------------- */
.team-filter .team-filter-input,
.team-filter .team-filter-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    margin: 0;
    padding: 13.5px 18px;
    box-sizing: border-box;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 0;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.team-filter .team-filter-select {
    padding-right: 42px;
    cursor: pointer;
}

.team-filter .team-filter-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

.team-filter .team-filter-input:hover,
.team-filter .team-filter-select:hover {
    border-color: rgba(255, 255, 255, 0.75);
}

.team-filter .team-filter-input:focus,
.team-filter .team-filter-select:focus {
    outline: none;
    color: var(--color-white);
    border-color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.16);
}

/* Native option lists render on the OS surface — keep them readable. */
.team-filter .team-filter-select option {
    color: #333333;
    background-color: var(--color-white);
}

.team-filter-chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--color-white);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Advanced Search drawer
   -------------------------------------------------------------------------- */
.team-filter-advanced {
    display: none;
    margin-top: 12px;
}

.team-filter-advanced.is-open {
    display: block;
}

.team-filter-advanced-toggle {
    display: inline-block;
    margin-top: 16px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.team-filter-advanced-toggle:hover,
.team-filter-advanced-toggle:focus {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Submit
   -------------------------------------------------------------------------- */
.team-filter .team-filter-submit {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 12px;
    padding: 11px 16px;
    background-color: var(--color-white);
    border: 1px solid var(--color-white);
    border-radius: 0;
    color: var(--color-text-dark);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.team-filter .team-filter-submit:hover,
.team-filter .team-filter-submit:focus {
    background-color: transparent;
    color: var(--color-white);
    outline: none;
}

/* --------------------------------------------------------------------------
   AJAX busy state
   -------------------------------------------------------------------------- */
.team-filter .team-filter-submit {
    position: relative;
}

.team-filter-spinner {
    display: none;
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: team-filter-spin 0.7s linear infinite;
}

.team-filter.is-loading .team-filter-spinner {
    display: block;
}

.team-filter.is-loading .team-filter-submit {
    cursor: progress;
}

@keyframes team-filter-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .team-filter-spinner { animation-duration: 2s; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
    .team-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}