/* ==========================================================================
   Block: Practice Area Guide (includes/blocks/practice-area-guide.php)
   Depends on css/tokens.css
   ========================================================================== */

.pa-guide {
    background: var(--cloud);
    padding: var(--space-9) 0;
    font-family: var(--font-body);
}

.pa-guide__inner {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Heading ------------------------------------------------------------- */
/* Sized to match .area-attorneys__title, the block directly above this one on
   every practice area page - the two are peer sections and should read as such. */
.pa-guide__title {
    margin: 0 0 var(--space-7);
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 800;
    line-height: 1.3;
    color: var(--ink-900);
    text-align: center;
}

/* Rows ---------------------------------------------------------------- */
.pa-guide__list {
    display: grid;
    gap: var(--space-3);
}

.pa-guide__item {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--mist);
    box-shadow: 0 0 0 1px var(--border);
}

/* The heading carries the outline; the button does the interaction, so the
   heading itself must not add any box of its own. */
.pa-guide__heading {
    margin: 0;
    font: inherit;
}

.pa-guide__trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.pa-guide__trigger-text {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink-900);
}

.pa-guide__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    transition: background-color .15s ease, color .15s ease, transform .2s ease;
}

.pa-guide__icon svg {
    width: 16px;
    height: 16px;
}

.pa-guide__item.is-open .pa-guide__icon {
    background: var(--brand-600);
    color: #fff;
    transform: rotate(180deg);
}

/* Panel --------------------------------------------------------------- */
.pa-guide__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}

.pa-guide__item.is-open .pa-guide__panel {
    grid-template-rows: 1fr;
}

.pa-guide__panel-inner {
    overflow: hidden;
}

/* Long-form copy ------------------------------------------------------ */
.pa-guide__content {
    padding: 0 var(--space-5) var(--space-5);
    color: var(--ink-500);
    font-size: var(--text-base);
    line-height: 1.7;
}

.pa-guide__content > *:first-child {
    margin-top: 0;
}

.pa-guide__content > *:last-child {
    margin-bottom: 0;
}

.pa-guide__content p {
    margin: 0 0 var(--space-4);
}

/* Sub-headings, which were H3s on the old pages - the numbered steps among
   them. */
.pa-guide__content h4 {
    margin: var(--space-5) 0 var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-h5);
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink-900);
}

.pa-guide__content ul,
.pa-guide__content ol {
    margin: 0 0 var(--space-4);
    padding-left: var(--space-6);
}

.pa-guide__content li {
    margin-bottom: var(--space-2);
}

.pa-guide__content li:last-child {
    margin-bottom: 0;
}

.pa-guide__content a {
    color: var(--brand-600);
    text-decoration: underline;
}

.pa-guide__content a:hover {
    color: var(--brand-700);
}

.pa-guide__content strong,
.pa-guide__content b {
    color: var(--ink-900);
    font-weight: 700;
}

/* Focus --------------------------------------------------------------- */
.pa-guide__trigger:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: -2px;
}

@media (max-width: 640px) {
    .pa-guide {
        padding: var(--space-7) 0;
    }

    .pa-guide__trigger {
        padding: var(--space-4);
    }

    .pa-guide__content {
        padding: 0 var(--space-4) var(--space-4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pa-guide__panel,
    .pa-guide__icon {
        transition: none;
    }
}

/* Printing and in-page search should see everything, not a stack of shut
   rows. */
@media print {
    .pa-guide__panel {
        grid-template-rows: 1fr;
    }
}
