.search-appointment-filter {
    position: relative;
    min-inline-size: 0;
    margin: 0 0 .625rem;
    padding: 0;
    border: 0;
}

.search-appointment-filter legend {
    padding: .3rem 0;
    color: #172554;
    font-family: YekanBakh-Bold, sans-serif;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
}

.search-appointment-filter__modes {
    position: absolute;
    inset-block-start: -1.875rem;
    inset-inline-end: 0;
    display: flex;
    gap: .25rem;
}

.search-appointment-filter__all {
    position: relative;
    cursor: pointer;
}

.search-appointment-filter__all span {
    display: grid;
    min-inline-size: 3rem;
    min-block-size: 1.875rem;
    padding-inline: .375rem;
    place-items: center;
    border: 1px solid #dce5f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.search-appointment-filter__all:hover span,
.search-appointment-filter__all input:checked + span {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.search-appointment-filter__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .375rem;
    margin-block-start: .3rem;
}

.search-appointment-filter__option {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.search-appointment-filter__option--in-person {
    --appointment-accent: #1d4ed8;
    --appointment-tint: #eaf2ff;
    --appointment-ring: #bed3ff;
}

.search-appointment-filter__option--phone {
    --appointment-accent: #0f766e;
    --appointment-tint: #e4f7f3;
    --appointment-ring: #9fdfd0;
}

.search-appointment-filter__option--chat {
    --appointment-accent: #6d28d9;
    --appointment-tint: #f2ebff;
    --appointment-ring: #d8c5fd;
}

.search-appointment-filter input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.search-appointment-filter__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    min-block-size: 5rem;
    padding: .5rem .2rem;
    border: 1px solid #dfe7f1;
    border-radius: .875rem;
    background: linear-gradient(155deg, #fff 50%, #f5f8fd);
    color: #334155;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.search-appointment-filter__icon {
    display: grid;
    inline-size: 2rem;
    block-size: 2rem;
    place-items: center;
    border-radius: .65rem;
    background: var(--appointment-tint);
    color: var(--appointment-accent);
}

.search-appointment-filter__icon svg {
    inline-size: 1.125rem;
    block-size: 1.125rem;
}

.search-appointment-filter__option:hover .search-appointment-filter__card {
    transform: translateY(-1px);
    border-color: var(--appointment-ring);
}

.search-appointment-filter__option input:checked + .search-appointment-filter__card {
    border-color: var(--appointment-accent);
    background: linear-gradient(155deg, #fff 10%, var(--appointment-tint));
    box-shadow: 0 0 0 1px var(--appointment-ring);
    color: var(--appointment-accent);
}

.search-appointment-filter__option input:checked + .search-appointment-filter__card::after {
    position: absolute;
    inset-block-start: .35rem;
    inset-inline-start: .4rem;
    inline-size: .4rem;
    block-size: .62rem;
    transform: rotate(45deg);
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
}

.search-appointment-filter input:focus-visible + span {
    outline: 2px solid #1d4ed8;
    outline-offset: 3px;
}

.doctor-search-empty {
    padding: 1.5rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #fff;
    color: #475569;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .search-appointment-filter__all span,
    .search-appointment-filter__card {
        transition: none;
    }

    .search-appointment-filter__option:hover .search-appointment-filter__card {
        transform: none;
    }
}
