/* Membership signup/correction form enhancements v0.5.3 */

.auth-field-status {
    min-height: 18px;
    margin: 0;
    color: var(--auth-muted-soft);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.auth-field-status.is-success { color: var(--auth-success); }
.auth-field-status.is-error { color: var(--auth-danger); }


.auth-address-control {
    grid-template-columns: minmax(0, 1fr) auto;
}
.auth-address-search {
    min-width: 112px;
    white-space: nowrap;
}

.auth-agreement-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.auth-agreement-row > label {
    flex: 1;
    min-width: 0;
}
.auth-agreement-view {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--auth-control-border);
    border-radius: 8px;
    background: var(--auth-surface);
    color: var(--auth-link);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.auth-agreement-view:hover { background: var(--auth-selected-bg); border-color: var(--auth-primary); }
.auth-agreement-view:focus-visible { outline: 3px solid var(--auth-focus-ring); outline-offset: 2px; }

body.is-auth-modal-open { overflow: hidden; }
.auth-modal[hidden] { display: none; }
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}
.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 15, 24, 0.62);
    backdrop-filter: blur(2px);
}
.auth-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    max-height: min(82vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    background: var(--auth-surface);
    color: var(--auth-text);
    box-shadow: var(--auth-shadow);
}
.auth-modal-head,
.auth-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-color: var(--auth-border-soft);
    background: var(--auth-surface);
}
.auth-modal-head { border-bottom: 1px solid var(--auth-border-soft); }
.auth-modal-foot { justify-content: flex-end; border-top: 1px solid var(--auth-border-soft); }
.auth-modal-head h2 { margin: 0; font-size: 18px; }
.auth-modal-close {
    min-width: 34px;
    min-height: 34px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    background: var(--auth-surface-sub);
    color: var(--auth-text);
    font: inherit;
    font-size: 18px;
    cursor: pointer;
}
.auth-modal-close:hover { border-color: var(--auth-primary); background: var(--auth-selected-bg); }
.auth-modal-close:focus-visible { outline: 3px solid var(--auth-focus-ring); outline-offset: 2px; }
.auth-modal-body {
    overflow: auto;
    padding: 20px;
    overscroll-behavior: contain;
}
.auth-legal-copy { color: var(--auth-text); font-size: 13px; line-height: 1.7; }
.auth-legal-copy h3 { margin: 22px 0 7px; color: var(--auth-text-strong); font-size: 14px; }
.auth-legal-copy h3:first-child { margin-top: 0; }
.auth-legal-copy p,
.auth-legal-copy ul { margin: 0 0 12px; }
.auth-legal-copy ul { padding-left: 20px; }
.auth-legal-copy .auth-legal-note {
    padding: 11px 12px;
    border: 1px solid var(--auth-border-soft);
    border-radius: 9px;
    background: var(--auth-surface-sub);
    color: var(--auth-muted);
}

@media (max-width: 520px) {
    .auth-modal { padding: 10px; }
    .auth-modal-dialog { max-height: 90vh; border-radius: 12px; }
    .auth-modal-head,
    .auth-modal-foot { padding: 13px 14px; }
    .auth-modal-body { padding: 16px 14px; }
    .auth-agreement-row { align-items: center; }
    .auth-address-control { grid-template-columns: 1fr; }
    .auth-address-search { width: 100%; }
}
