/* ==========================================================================
   Attorney portal (page-attorney-login.php, page-my-listing.php)
   Depends on css/tokens.css and css/blocks/get-listed-hero.css
   ========================================================================== */

.portal__inner {
    max-width: 44rem;
    text-align: left;
}

.portal__card {
    margin-top: var(--space-6);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-lg);
    color: var(--ink-900);
}

.portal__notice,
.portal__error {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-small);
    line-height: 1.5;
}

.portal__notice {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.portal__notice--waiting {
    background: rgba(255, 199, 44, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 199, 44, .4);
}

.portal__error {
    background: rgba(223, 27, 65, .14);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(223, 27, 65, .45);
}

/* The card sits on the dark hero, so anything inside it reads on white. */
.portal__card .portal__error {
    background: rgba(223, 27, 65, .08);
    color: #b3123a;
    box-shadow: inset 0 0 0 1px rgba(223, 27, 65, .3);
}

.portal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 var(--space-5);
}

.portal__field label {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
}

.portal__help {
    color: var(--ink-700);
    font-size: var(--text-caption);
}

.portal__field input[type="url"],
.portal__field input[type="text"],
.portal__field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--ink-900);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
}

.portal__field textarea {
    min-height: 14rem;
    resize: vertical;
}

.portal__field input:focus-visible,
.portal__field textarea:focus-visible {
    outline: none;
    border-color: var(--brand-700);
    box-shadow: var(--ring-brand);
}

.portal__photo {
    width: 8rem;
    height: 10rem;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.portal__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: 0;
}

.portal__button {
    display: inline-block;
    padding: 12px 24px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--accent-500);
    color: var(--ink-950);
    font-family: var(--font-display);
    font-size: var(--text-small);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease;
}

.portal__button:hover,
.portal__button:focus-visible {
    background: var(--accent-400);
}

.portal__link {
    color: var(--ink-700);
    font-size: var(--text-small);
}

.portal__hint {
    margin: var(--space-4) 0 0;
    color: var(--ink-700);
    font-size: var(--text-small);
}

/* WordPress's own login form markup. */
.portal__card .login-username,
.portal__card .login-password {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 var(--space-4);
}

.portal__card .login-username label,
.portal__card .login-password label {
    font-family: var(--font-display);
    font-weight: 700;
}

.portal__card .login-username input,
.portal__card .login-password input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
}

.portal__card .login-remember {
    margin: 0 0 var(--space-4);
    color: var(--ink-700);
    font-size: var(--text-small);
}

.portal__card .login-submit input {
    padding: 12px 24px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--accent-500);
    color: var(--ink-950);
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
}

/* Practice area checkboxes. Two columns so twenty of them do not become a
   very long scroll on the dashboard. */
.portal__checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px var(--space-4);
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.portal__checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: var(--text-small);
    font-weight: 400;
    cursor: pointer;
}

.portal__checks input {
    flex-shrink: 0;
    margin: 0;
}

@media (max-width: 40rem) {
    .portal__checks {
        grid-template-columns: 1fr;
    }
}

/* Bar number and its issuing state sit together - one is meaningless alone. */
.portal__pair {
    display: flex;
    gap: var(--space-3);
}

.portal__pair input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
}

.portal__pair .portal__state {
    width: 6rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Reviews on the attorney's dashboard
   Below the edit form, because a review is not an edit to the profile: the
   replies here publish straight away, while everything in the form above waits
   for approval. Keeping them apart stops that distinction getting lost.
   -------------------------------------------------------------------------- */

.portal-reviews {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #e3ebf7;
}

.portal-reviews__title {
    margin: 0 0 6px;
    font-size: 1.125rem;
    color: #0f172a;
}

.portal-reviews__summary {
    margin: 0 0 18px;
    color: #5b6b85;
    font-size: .875rem;
}

.portal-reviews__empty {
    margin: 0;
    color: #5b6b85;
    font-size: .9375rem;
    line-height: 1.6;
}

.portal-review {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #e3ebf7;
    border-radius: 14px;
    background: #fbfcfe;
}

.portal-review__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: .9375rem;
    color: #0f172a;
}

.portal-review__date {
    margin-left: auto;
    color: #8092ab;
    font-size: .75rem;
}

.portal-review__body {
    margin-bottom: 12px;
    color: #42506b;
    font-size: .9375rem;
    line-height: 1.6;
}

.portal-review__body p {
    margin: 0 0 .7em;
}

.portal-review__body p:last-child {
    margin-bottom: 0;
}

.portal-review__form label {
    display: block;
    margin-bottom: 6px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #0f172a;
}

.portal-review__form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c8d2e0;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: .875rem;
    line-height: 1.5;
    resize: vertical;
}

.portal-review__form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.portal-review__form button {
    margin-top: 10px;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-family: inherit;
    font-weight: 650;
    font-size: .875rem;
    cursor: pointer;
    transition: background .14s ease;
}

.portal-review__form button:hover {
    background: #1d4ed8;
}

.portal-review__live {
    margin-left: 10px;
    color: #17603a;
    font-size: .75rem;
}

.portal-reviews__smallprint {
    margin: 18px 0 0;
    color: #8092ab;
    font-size: .75rem;
    line-height: 1.55;
}

/* The star markup is shared with the profile, but single-attorney.css is not
   loaded on this page - without these the two rows stack instead of overlaying
   and the rating reads as ten stars. */
.attorney-stars {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    line-height: 0;
}

.attorney-stars svg {
    width: 14px;
    height: 14px;
    display: inline-block;
    /* No fill attribute on the path, so without this the stars render black
       and every colour rule below is decoration. */
    fill: currentColor;
}

.attorney-stars__empty {
    display: block;
    color: #dadce0;
}

.attorney-stars__full {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    overflow: hidden;
    color: #fbbc04;
}

.attorney-stars__full svg {
    vertical-align: top;
}

/* Suite and ZIP side by side: two short fields stacked read as two questions
   when they are the tail of one. */
.portal__field--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4, 16px);
}

.portal__field--split .portal__field {
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .portal__field--split {
        grid-template-columns: 1fr;
    }
}
