/* ———————————————————————————————————
   Provider Search Form – Base Layout
   ——————————————————————————————————— */
.aps-search {
    /* create a tidy card-like wrapper */
    background: #fff;
    padding: 2rem 2.5rem;
    border: 1px solid #EFF5F8;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    position: relative;
    z-index: 100;
}

@media (min-width: 1200px) {
    .aps-search {
        display: grid;
        grid-template-columns: repeat(4, 1fr) auto; /* 4 fields + button */
        gap: 1.5rem 2rem;
        align-items: flex-end;
    }
}

/* ———————————————————————————————————
   Elements
   ——————————————————————————————————— */
.aps-search label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: #333;
}

.aps-search input[type="text"],
.aps-search input[type="number"],
.aps-search select {
    width: 100%;
    padding: .55rem .75rem;
    font-size: .9375rem;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    background: #fff;
    transition: border-color .2s ease;
}

.aps-search input[type="text"]:focus,
.aps-search input[type="number"]:focus,
.aps-search select:focus {
    border-color: #1E6AA2;      /* brand 1 */
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}

.aps-search select {
    width: 100%;
    padding: 0.5em 2.5em 0.5em 0.5em; /* extra right padding for arrow */
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.7em center;
    background-size: 0.65em auto;
    appearance: none; /* removes default arrow so we can add custom one */
}

.aps-search select:focus {
    outline: none;
    border-color: #0094EA; /* WP-admin blue or your brand color */
    box-shadow: 0 0 0 1px #0094EA;
}

.aps-search button {
    background: #1E6AA2;
    z-index: 9999;
}

.aps-search button[type="submit"] {
    padding: .7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #1E6AA2;        /* brand red */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.aps-search button[type="submit"]:hover,
.aps-search button[type="submit"]:focus {
    background: #1E6AA2;        /* slightly darker */
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    outline: none;
}

/* make the button start on a new line on small screens */
@media (max-width: 1199.98px) {
    .aps-search button[type="submit"] {
        margin-top: 1rem;
        width: 100%;
    }
    
    .aps-search .aps-field {
        margin-bottom: 1rem;
    }
}

/* ———————————————————————————————————
   Loading Spinner
   ——————————————————————————————————— */
.aps-spinner {
    display: none;                 /* revealed via JS */
    margin: 2rem auto;
    text-align: center;
}
.aps-spinner::after {
    content: '';
    display: inline-block;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    border: 6px solid #1E6AA2;     /* brand red */
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: aps-spin .8s linear infinite;
}
@keyframes aps-spin {
    100% { transform: rotate(360deg); }
}

/* ———————————————————————————————————
   Result Card Appearance
   ——————————————————————————————————— */
.aps-card {
    border: 1px solid #EFF5F8;
    border-radius: 6px;
    background: #EFF5F8;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    font-size: .9375rem;
    line-height: 1.45;
}
.aps-card h4 {
    margin-top: 0;
    margin-bottom: .3rem;
    font-size: 1.125rem;
    color: #1E6AA2;                /* brand red highlight */
}
.aps-card strong {
    font-weight: 600;
    color: #1E6AA2;
}
.aps-card address {
    font-style: normal;
    margin: .25rem 0 0;
}