/* IntelliClerk — Edit Profile.
   A layer over dashboard-v3.css, form.css, and account.css, in that order: the
   leaf is the new-matter form's, the fields are its fields, and the logo plate
   is the one the account page sets the mark on. This file adds the three-up
   address row, the admissions list, and the logo's controls. */

/* ---------- three to a line ---------- */

/* City, state, and ZIP are one line of an address and are read as one, so they
   share a rule the way practice area and jurisdiction do on the matter form. */
.field-trio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 9rem;
    column-gap: 1.75rem;
    border-bottom: 1px solid var(--rule-soft);
}

.field-trio .field {
    border-bottom: 0;
}

.field-trio .field__input,
.field-trio .field__select {
    max-width: none;
}

/* ---------- bar admissions ---------- */

/* One line per jurisdiction the attorney is admitted in. The list grows, so
   the headings are set once above it rather than on every row. */
.admit {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admit-head,
.admit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 6.5rem 9rem 2.75rem;
    align-items: center;
    gap: 0.75rem;
}

.admit-head {
    padding-bottom: 0.5rem;
    font-family: var(--data);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.admit-row {
    padding: 0.4rem 0;
}

.admit-row .field__input,
.admit-row .field__select {
    max-width: none;
}

/* Dropping a line is not a labelled act — the row it sits on says what goes. */
.admit__drop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    color: var(--muted);
    background: var(--plate);
    border: 1px solid var(--rule);
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.admit__drop:hover {
    color: #FFFFFF;
    background: var(--ochre-deep);
    border-color: var(--ochre-deep);
}

/* An account must carry at least one bar number, so the last line cannot go. */
.admit__drop[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
}

.admit__drop[disabled]:hover {
    color: var(--muted);
    background: var(--plate);
    border-color: var(--rule);
}

/* Removing the mark is not the affirmative act beside it, so it never takes
   the brass Replace does. */
.case-act--drop {
    color: var(--muted);
    background: var(--plate);
    border: 1px solid var(--rule);
    border-radius: var(--radius-control);
    padding: 0.45rem 0.85rem;
}

.case-act--drop:hover {
    color: #FFFFFF;
    background: var(--ochre-deep);
    border-color: var(--ochre-deep);
}

.admit-add {
    margin-top: 0.9rem;
}

/* ---------- firm logo ---------- */

/* The mark as it stands, with what may be done to it beside rather than under
   it — the plate is the thing being edited, not a field of the form. */
.logo-field {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    margin-top: 0.2rem;
}

.logo-field__acts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

/* ---------- narrow screens ---------- */

@media (max-width: 62rem) {
    .admit-head {
        display: none;
    }

    /* Without the headings above them the fields state their own, so each line
       becomes a small stack ruled off from the next. */
    .admit-row {
        grid-template-columns: minmax(0, 1fr) 2.75rem;
        gap: 0.5rem 0.75rem;
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--rule-soft);
    }

    .admit-row > :not(.admit__drop) {
        grid-column: 1;
    }

    .admit__drop {
        grid-row: 1;
        grid-column: 2;
    }

    .admit .admit-row:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 48rem) {
    .field-trio {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .field-trio .field:not(:last-child) {
        border-bottom: 1px solid var(--rule-soft);
    }

    .field-trio .field + .field {
        padding-top: 1.5rem;
    }

    .logo-field {
        grid-template-columns: minmax(0, 1fr);
    }

    .logo-field .mark-plate {
        max-width: 13rem;
    }
}
