/* Member sign-in / sign-up: wagtail.org kit layout (grid, sign-up-form--block, .form, .button).
   Typography matches other pali.talk pages via inscribe-fonts.css on pali.talk_base. */

body:is(.template-member-login, .template-member-register) .grid:has(.accounts-member-form) {
    padding-top: 2rem;
    margin-bottom: 3rem;
}

/* Same grid span as .rich-text--sf (home principles copy), not default sign-up-form (wider). */
.grid > .accounts-member-form.sign-up-form {
    grid-column: 2 / span 2;
}

@media (min-width: 599px) {
    .grid > .accounts-member-form.sign-up-form {
        grid-column: 2 / span 3;
    }
}

@media (min-width: 1023px) {
    .grid > .accounts-member-form.sign-up-form {
        grid-column: 3 / span 3;
    }
}

/* Single-column auth card (kit --block assumes optional icon column at medium+). */
.grid > .accounts-member-form.sign-up-form--block {
    flex-direction: column;
}

@media (min-width: 599px) {
    .grid > .accounts-member-form.sign-up-form--block {
        flex-direction: column;
    }
}

.accounts-member-form .sign-up-form__sub-heading {
    font-size: 1.125rem;
    line-height: 1.6;
}

.accounts-member-form__alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color--text, #262626);
    border-radius: 6px;
    background-color: var(--color--light-dark, #fafafa);
    color: var(--color--text, #262626);
    font-size: 1rem;
    line-height: 1.5;
}

.accounts-member-form__social {
    margin-top: 1.5rem;
}

.accounts-member-form__social-action {
    margin: 0 0 0.75rem;
}

.accounts-member-form__social-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}

.accounts-member-form__social-icon {
    flex-shrink: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

.accounts-member-form__social-button--google {
    border: 1px solid #747775;
    background-color: #fff;
    color: #1f1f1f;
}

.accounts-member-form__social-button--google:hover,
.accounts-member-form__social-button--google:focus-visible {
    border-color: #747775;
    background-color: #f8f9fa;
    color: #1f1f1f;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.accounts-member-form__social-button--google:hover > svg,
.accounts-member-form__social-button--google:focus-visible > svg {
    transform: none;
    fill: unset;
}

.accounts-member-form__social-button--line {
    border: 1px solid #06c755;
    background-color: #06c755;
    color: #fff;
}

.accounts-member-form__social-button--line:hover,
.accounts-member-form__social-button--line:focus-visible {
    border-color: #05b34c;
    background-color: #05b34c;
    color: #fff;
}

.accounts-member-form__social-divider {
    margin: 1.5rem 0 0;
    color: var(--color--text, #262626);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.accounts-member-form__form {
    margin-top: 0;
}

.accounts-member-form__form .form__field {
    margin: 0 0 1.25rem;
}

.accounts-member-form__form .form__label {
    display: block;
    margin: 0 0 0.35rem;
    color: var(--color--text, #262626);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.accounts-member-form__form .form__input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: none;
}

.accounts-member-form__form .form__input:-webkit-autofill,
.accounts-member-form__form .form__input:-webkit-autofill:hover,
.accounts-member-form__form .form__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color--text, #262626);
    transition: background-color 9999s ease-out 0s;
}

.accounts-member-form__form .form__error {
    display: block;
    margin-top: 0.35rem;
    color: var(--color--highlight, #2e1f5e);
    font-size: 0.95rem;
    line-height: 1.4;
}

.accounts-member-form__submit {
    margin: 0;
}

.accounts-member-form__submit .sign-up-form__button {
    box-sizing: border-box;
    justify-content: center;
    width: 100%;
    margin-top: 0;
}

@media (min-width: 599px) {
    .accounts-member-form__submit .sign-up-form__button {
        width: auto;
        min-width: 11rem;
        margin-top: 0;
    }
}

.accounts-member-form__footer {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.accounts-member-form__footer a {
    font-weight: 700;
}

.accounts-member-form__list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.accounts-home {
    display: grid;
    gap: 2rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

@media (min-width: 800px) {
    .accounts-home {
        grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
        align-items: start;
    }
}

.accounts-home h1,
.accounts-home h2 {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    line-height: 1.2;
}

.accounts-home__facts {
    margin: 0;
}

.accounts-home__facts div {
    margin: 0 0 0.75rem;
}

.accounts-home__facts dt {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
}

.accounts-home__facts dd {
    margin: 0.15rem 0 0;
}

.accounts-home__favorites-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.accounts-home__favorites-head h2 {
    margin: 0;
}

.accounts-home__favorite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.accounts-home__play-all {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    background: transparent;
    color: inherit;
}

.accounts-home__play-all:disabled {
    opacity: 0.45;
}

.accounts-favorites {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
}

.accounts-favorites th,
.accounts-favorites td {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #e4dfd6;
    text-align: left;
    vertical-align: middle;
}

.accounts-favorites__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.accounts-favorites__drag {
    border: 0;
    background: transparent;
    padding: 0.15rem;
    cursor: grab;
    color: #6b6358;
}

.accounts-favorites__drag svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.accounts-favorites__options {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.accounts-favorites__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6f675c;
    text-decoration: none;
    cursor: pointer;
}

.accounts-favorites__icon:hover {
    color: #6b2d2d;
    background: rgba(107, 45, 45, 0.08);
}

.accounts-favorites__icon svg {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.accounts-favorites__icon[aria-label^="Play"] svg {
    fill: currentColor;
    stroke: none;
}

.accounts-favorites__dialog {
    border: 1px solid #e4dfd6;
    border-radius: 8px;
    padding: 1.25rem 1.4rem;
    max-width: 24rem;
    background: #f6f4f0;
    color: #1a1a1a;
}

.accounts-favorites__dialog::backdrop {
    background: rgba(26, 26, 26, 0.35);
}

.accounts-favorites__dialog-text {
    margin: 0 0 1rem;
}

.accounts-favorites__dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.accounts-favorites__dialog-actions button {
    min-height: 2.25rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.accounts-favorites__dialog-actions [data-delete-confirm] {
    color: #6b2d2d;
}
