/* ==========================================================================
   Block: Practice Area Page Hero (includes/blocks/practice-area-page-hero.php)
   Depends on css/tokens.css
   ========================================================================== */

/* Raised above what follows so the city dropdown is not painted over. */
.pap-hero {
    position: relative;
    z-index: 10;
    background: var(--mist);
    font-family: var(--font-body);
}

.pap-hero__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-8) var(--gutter);
}

/* Breadcrumb ---------------------------------------------------------- */
.pap-hero__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    color: var(--ink-400);
    font-size: var(--text-caption);
    font-weight: 600;
}

.pap-hero__crumb {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}

.pap-hero__crumb:hover {
    color: var(--brand-600);
}

.pap-hero__crumb--current {
    color: var(--brand-600);
}

/* Headline ------------------------------------------------------------ */
.pap-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-5);
}

@media (min-width: 1024px) {
    .pap-hero__grid {
        grid-template-columns: 1.1fr .9fr;
        align-items: center;
    }
}

.pap-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: var(--text-caption);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.2;
}

.pap-hero__badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pap-hero__title {
    margin: var(--space-4) 0 0;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.025em;
    color: var(--ink-900);
}

@media (min-width: 640px) {
    .pap-hero__title {
        font-size: var(--text-h1);
    }
}

.pap-hero__title-mark {
    position: relative;
    display: inline-block;
}

.pap-hero__title-mark::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -.15em;
    left: 0;
    height: .42em;
    background-image: var(--underline-image);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.pap-hero__lead {
    max-width: 36rem;
    margin: 0;
    color: var(--ink-500);
    font-size: var(--text-lead);
    line-height: 1.625;
}

.pap-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-top: var(--space-5);
    color: var(--ink-500);
    font-size: var(--text-small);
    font-weight: 600;
}

.pap-hero__trust-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.pap-hero__trust-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pap-hero__trust-item--brand svg {
    color: var(--brand-600);
}

.pap-hero__trust-item--accent svg {
    color: var(--accent-600);
}

/* Gold search panel --------------------------------------------------- */
.pap-hero__panel {
    margin-top: var(--space-7);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: var(--accent-500);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-lg);
}

.pap-hero__panel-label {
    margin: 0 0 var(--space-3);
    color: var(--ink-700);
    font-size: var(--text-caption);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.pap-hero__bar {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
    border-radius: var(--radius-xl);
    background: var(--cloud);
    box-shadow: var(--ring-brand), var(--shadow-lg);
}

@media (min-width: 1024px) {
    .pap-hero__bar {
        flex-direction: row;
        align-items: stretch;
    }
}

.pap-hero__field {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color .18s ease;
}

.pap-hero__field:hover {
    background: var(--mist);
}

.pap-hero__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.pap-hero__icon svg {
    width: 20px;
    height: 20px;
}

.pap-hero__icon--brand {
    background: var(--brand-50);
    color: var(--brand-600);
}

.pap-hero__icon--accent {
    background: rgba(245, 179, 1, .15);
    color: var(--accent-600);
}

.pap-hero__field-body {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.pap-hero__label {
    display: block;
    color: var(--ink-400);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.pap-hero__select-wrap {
    position: relative;
    display: block;
}

.pap-hero__select,
.pap-hero__input {
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink-900);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.pap-hero__select:focus,
.pap-hero__input:focus {
    outline: none;
    box-shadow: none;
}

.pap-hero__select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: var(--space-5);
    cursor: pointer;
}

.pap-hero__input::placeholder {
    color: var(--ink-400);
    font-weight: 500;
    opacity: 1;
}

.pap-hero__chevron {
    position: absolute;
    top: 50%;
    right: 0;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--ink-400);
    pointer-events: none;
    transition: transform .18s ease;
}

.pap-hero__field:hover .pap-hero__chevron {
    transform: translateY(-62%);
}

.pap-hero__divider {
    display: none;
}

@media (min-width: 768px) {
    .pap-hero__divider {
        display: block;
        align-self: stretch;
        width: 1px;
        background: var(--border);
    }
}

.pap-hero__submit {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border: 0;
    border-radius: var(--radius-md);
    background: var(--brand-600);
    color: #fff;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color .18s ease, transform .1s ease;
}

.pap-hero__submit svg {
    width: 20px;
    height: 20px;
}

.pap-hero__submit:hover {
    background: var(--brand-700);
}

.pap-hero__submit:active {
    transform: scale(.98);
}

/* City dropdown ------------------------------------------------------- */
.pap-hero__field--city {
    position: relative;
}

.pap-hero__cities {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    z-index: 30;
    width: max(100%, 18rem);
    max-height: 17rem;
    margin: 0;
    padding: var(--space-2);
    overflow-y: auto;
    list-style: none;
    border-radius: var(--radius-lg);
    background: var(--cloud);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-lg);
}

.pap-hero__cities[hidden] {
    display: none;
}

.pap-hero__cities li {
    margin: 0;
}

.pap-hero__cities li[hidden] {
    display: none;
}

.pap-hero__city {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s ease;
}

.pap-hero__city:hover,
.pap-hero__city.is-active {
    background: var(--mist);
}

.pap-hero__city-name {
    color: var(--ink-900);
    font-size: var(--text-base);
    font-weight: 600;
}

.pap-hero__city-count {
    flex-shrink: 0;
    color: var(--ink-400);
    font-size: var(--text-small);
}

.pap-hero__city--any {
    color: var(--ink-500);
    font-size: var(--text-base);
    font-weight: 500;
}

.pap-hero__city-empty {
    padding: var(--space-2) var(--space-3);
    color: var(--ink-400);
    font-size: var(--text-small);
}

.pap-hero__city-empty[hidden] {
    display: none;
}

/* Focus --------------------------------------------------------------- */
.pap-hero__crumb:focus-visible,
.pap-hero__select:focus-visible,
.pap-hero__input:focus-visible,
.pap-hero__submit:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .pap-hero__crumb,
    .pap-hero__field,
    .pap-hero__chevron,
    .pap-hero__submit,
    .pap-hero__city {
        transition: none;
    }
}
