/* Ajax search container  */
form#attorney-filter-form {
    display: flex;
    justify-content: space-between;

    & input,
    & select {
        max-width: 40%;
        border-color: #e3e3e3;
    }

    & select {
        color: #8F949D;
        font-size: var(--wp--preset--font-size--x-small);
    }

    &.search-only input {
        max-width: unset;
        min-width: 400px;
    }

}

.filter-group select {
    border-radius: 0;
    padding: 12px 15px;
    color: inherit;
    font-size: var(--wp--preset--font-size--x-small);
}

button#load-more-attorneys {
    color: var(--wp--preset--color--contrast);
    background: transparent;
    padding: 10px 30px;
    border: 1px solid currentColor;
    font-family: inherit;
    margin-top: 30px;
    margin-inline: auto;
    cursor: pointer;

    &:hover {
        color: var(--wp--preset--color--custom-accent);
        background: var(--wp--preset--color--neutral);
    }
}

#attorney-results {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px;
    background: var(--wp--preset--color--base);
    margin-top: 50px;
}

.attorney-card {
    text-align: center;
    transform-origin: center;

    & :has(a[href*="super-lawyer"]) {
        &:after {
            content: '\2605  Super Lawyer';
            font-size: 13px;
            color: var(--wp--preset--color--base);
            background: var(--wp--preset--color--custom-accent);
            border-radius: 30px;
            display: flex;
            align-content: center;
            justify-content: center;
            position: absolute;
            width: fit-content;
            padding-inline: 10px;
            margin: auto;
            position-anchor: --lawyer-image;
            top: calc(anchor(bottom) - 20px);
            justify-self: anchor-center;
            font-family: var(--wp--preset--font-family--google-sans);
            text-transform: none !important;
        }
    }

    h2 {
        margin: 0;
    }

    img {
        box-shadow: 0px 0px 0px 1px var(--wp--preset--color--custom-accent);
        outline: 1px solid transparent;
        outline-offset: 8px;
        transition: all .2s ease;
        anchor-name: --lawyer-image;
        transform-origin: center;
    }

    span a {
        margin: 0;
        text-transform: uppercase;
        color: var(--wp--preset--color--custom-accent);
        font-family: var(--wp--preset--font-family--cormorant-garamond);
    }

    .attorney-position:has(a[href*='super']) {
        a[href*='super'] {
            display: none !important;
        }

        .wp-block-post-terms__separator {
            display: none;
        }
    }

    .stretched-link a::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1;
    }

    &:has(.stretched-link) {
        position: relative;

        &:hover img {
            box-shadow: 0px 0px 0px 4px var(--wp--preset--color--custom-accent);
            outline: 1px solid #aaa;
        }
    }
}