/* ═══════════════════════════════════════════════════════
   OBSERVER'S LOG — auth.css
   Sign In · Register · Auth form components
   ═══════════════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────────────── */
.axm-auth-wrap {
    min-height: calc(100vh - 10rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 5rem;
    /* bottom padding for mobile nav */
}

/* ── Card ─────────────────────────────────────────────── */
.axm-auth-card {
    width: 100%;
    max-width: 26rem;
    border-radius: var(--r-xl);
    padding: 2.25rem 1.75rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.axm-auth-card--wide {
    max-width: 44rem;
}

/* ── Brand header ─────────────────────────────────────── */
.axm-auth-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.axm-auth-logo img,
.axm-auth-logo svg,
.axm-auth-logo .custom-logo-link img {
    height: 3.5rem;
    /* increased from 2.5rem (approx 56px) */
    width: auto;
    max-width: 220px;
    /* increased from 160px */
    display: block;
    margin: 0 auto 0.375rem;
}

/* Strip WP's figure and link wrappers inside auth card */
.axm-auth-logo figure {
    margin: 0;
    padding: 0;
}

/* DARK MODE LOGO TREATMENT - removed to prevent distortion */
/*
html.dark .axm-auth-logo img {
    filter: brightness(0) invert(1);
}
*/

.axm-auth-tagline {
    font-size: 0.9375rem;
    color: var(--axm-on-surface-variant);
    margin: 0;
}

/* ── Alert ────────────────────────────────────────────── */
.axm-auth-alert {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: var(--r-lg);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.axm-auth-alert .material-symbols-outlined {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.axm-auth-alert--error {
    background: var(--axm-error-container);
    color: var(--axm-on-error-container);
    box-shadow: var(--neo-pressed);
}

.axm-auth-alert--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    box-shadow: var(--neo-pressed);
}

html.dark .axm-auth-alert--success {
    background: rgba(46, 125, 50, 0.2) !important;
    color: #a5d6a7 !important;
    border: 1px solid rgba(165, 214, 167, 0.3) !important;
    box-shadow: var(--neo-pressed);
}

/* ── Form ─────────────────────────────────────────────── */
.axm-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* ── Fields ───────────────────────────────────────────── */
.axm-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.axm-field__label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--axm-on-surface);
    letter-spacing: 0.01em;
}

.axm-field__label-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--axm-primary);
    text-decoration: none;
    transition: color var(--t-base);
}

.axm-field__label-link:hover {
    color: var(--axm-tertiary);
}

.axm-field__optional {
    font-weight: 400;
    color: var(--axm-outline);
    font-size: 0.75rem;
    font-style: italic;
}

.axm-field__input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.875rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
    transition: box-shadow var(--t-base);
}

.axm-field__input-wrap:focus-within {
    box-shadow: var(--neo-pressed), 0 0 0 2px var(--axm-primary);
}

.axm-field__icon {
    font-size: 1.125rem;
    color: var(--axm-outline);
    flex-shrink: 0;
    transition: color var(--t-base);
}

.axm-field__input-wrap:focus-within .axm-field__icon {
    color: var(--axm-primary);
}

.axm-field__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.8125rem 0;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--axm-on-surface);
}

.axm-field__input::placeholder {
    color: var(--axm-outline);
}

.axm-field__toggle-pw {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--axm-outline);
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color var(--t-base);
}

.axm-field__toggle-pw:hover {
    color: var(--axm-primary);
}

.axm-field__toggle-pw .material-symbols-outlined {
    font-size: 1.125rem;
}

/* ── Password strength ────────────────────────────────── */
.axm-pw-strength-bar {
    height: 3px;
    background: var(--axm-outline-variant);
    border-radius: var(--r-full);
    overflow: hidden;
    margin-top: 0.25rem;
}

.axm-pw-strength-bar__fill {
    height: 100%;
    width: 0;
    border-radius: var(--r-full);
    transition: width 0.3s ease, background 0.3s ease;
}

.axm-pw-strength {
    font-size: 0.75rem;
    font-weight: 700;
    min-height: 1rem;
}

.axm-pw-match {
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 1rem;
}

/* ── Remember me ──────────────────────────────────────── */
.axm-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    cursor: pointer;
    user-select: none;
}

.axm-remember input[type="checkbox"] {
    accent-color: var(--axm-primary);
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Submit button ────────────────────────────────────── */
.axm-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9375rem;
    border: none;
    border-radius: var(--r-lg);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    background: var(--axm-primary);
    color: var(--axm-on-primary);
    box-shadow: 0 4px 18px color-mix(in srgb, var(--axm-primary) 40%, transparent);
    transition: all var(--t-base);
    margin-top: 0.25rem;
}

.axm-auth-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--axm-primary) 45%, transparent);
}

.axm-auth-submit:active {
    transform: scale(0.98);
    opacity: 1;
}

.axm-auth-submit .material-symbols-outlined {
    font-size: 1.125rem;
}

/* ── Divider ──────────────────────────────────────────── */
.axm-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: var(--axm-outline);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.axm-auth-divider::before,
.axm-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--axm-outline-variant);
}

/* ── Switch buttons (Reader / Author) ────────────────── */
.axm-auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.axm-auth-switch__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    color: var(--axm-on-surface-variant);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--t-base);
}

.axm-auth-switch__btn:hover {
    color: var(--axm-primary);
    transform: translateY(-2px);
    box-shadow: var(--neo-float);
}

.axm-auth-switch__btn:active {
    box-shadow: var(--neo-pressed);
    transform: scale(0.97);
}

.axm-auth-switch__btn .material-symbols-outlined {
    font-size: 1rem;
}

.axm-auth-switch__link {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--axm-primary);
    text-decoration: none;
}

.axm-auth-switch__link:hover {
    color: var(--axm-tertiary);
}

/* ── Role toggle ──────────────────────────────────────── */
.axm-role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    border-radius: var(--r-lg);
    padding: 0.25rem;
    box-shadow: var(--neo-pressed);
}

.axm-role-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6875rem 0.5rem;
    border: none;
    border-radius: var(--r-md);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    background: transparent;
    transition: all var(--t-base);
}

.axm-role-toggle__btn .material-symbols-outlined {
    font-size: 1.125rem;
}

.axm-role-toggle__btn--active {
    background: var(--axm-surface);
    color: var(--axm-primary);
    box-shadow: var(--neo-raised);
}

/* ── Role info box ────────────────────────────────────── */
.axm-role-info {
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    background: var(--axm-surface-container);
    padding: 0.875rem 1rem;
    border-radius: var(--r-lg);
    box-shadow: var(--neo-pressed);
    line-height: 1.65;
}

.axm-role-info p {
    margin: 0;
    color: inherit;
}

/* ── Profile page enhancements ─────────────────────────── */
.axm-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.axm-profile-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface);
    color: var(--axm-on-surface);
    text-decoration: none;
    box-shadow: var(--neo-raised);
    transition: transform var(--t-base), background var(--t-base), box-shadow var(--t-base);
}

.axm-profile-tabs a:hover {
    transform: translateY(-1px);
    background: var(--axm-surface-container);
    box-shadow: var(--neo-float);
}

.axm-profile-tabs a.axm-profile-tab--active {
    box-shadow: var(--neo-pressed);
    background: var(--axm-surface-container);
    color: var(--axm-primary);
    font-weight: 700;
    transform: none;
}

.axm-tab-dirty-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--axm-tertiary);
    display: inline-block;
    box-shadow: 0 0 8px var(--axm-tertiary);
}

.axm-profile-section {
    display: none;
}

.axm-profile-section.axm-profile-section--active {
    display: block;
}

.axm-auth-submit:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    background: var(--axm-surface-container);
    color: var(--axm-outline);
    box-shadow: var(--neo-pressed);
}

.axm-profile-section__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--axm-on-surface);
}

.axm-profile-avatar-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.axm-profile-avatar-current__label {
    font-weight: 700;
    color: var(--axm-on-surface-variant);
}

.axm-profile-avatar-current__preview {
    border-radius: 999px;
    padding: 0.25rem;
    background: var(--axm-surface-container);
    box-shadow: var(--neo-pressed);
}

.axm-avatar-dropdown {
    border: 1px solid var(--axm-outline-variant);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
}

.axm-avatar-dropdown__summary {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.875rem 1rem;
    cursor: pointer;
    color: var(--axm-on-surface);
    list-style: none;
}

.axm-avatar-dropdown__summary::-webkit-details-marker {
    display: none;
}

.axm-avatar-dropdown__preview {
    width: 3.25rem;
    height: 3.25rem;
    min-width: 3.25rem;
    min-height: 3.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: var(--axm-primary);
    box-shadow: var(--neo-raised);
}

.axm-avatar-dropdown__meta {
    flex: 1;
    min-width: 0;
}

.axm-avatar-dropdown__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--axm-on-surface-variant);
}

.axm-avatar-dropdown__selected {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--axm-on-surface);
    margin-top: 0.25rem;
}

.axm-avatar-dropdown__hint {
    display: block;
    margin-top: 0.2rem;
    color: var(--axm-on-surface-variant);
    font-size: 0.8rem;
    line-height: 1.35;
}

.axm-avatar-dropdown__chevron {
    font-size: 1.5rem;
    color: var(--axm-on-surface-variant);
    transition: transform var(--t-base);
}

.axm-avatar-dropdown[open] .axm-avatar-dropdown__chevron {
    transform: rotate(180deg);
}

.axm-avatar-dropdown__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.5rem;
    max-height: 22rem;
    overflow: auto;
    padding: 0.75rem;
    border-top: 1px solid var(--axm-outline-variant);
    background: var(--axm-surface-container);
}

.axm-avatar-choice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.625rem;
    align-items: center;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    border-radius: var(--r-md);
    background: var(--axm-surface);
    border: 1px solid var(--axm-outline-variant);
    transition: border-color var(--t-base), transform var(--t-base), background var(--t-base);
    cursor: pointer;
}

.axm-avatar-choice:hover {
    background: var(--axm-surface-container-low);
    border-color: color-mix(in srgb, var(--axm-primary) 45%, var(--axm-outline-variant));
}

.axm-avatar-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.axm-avatar-choice__preview {
    width: 2.625rem;
    height: 2.625rem;
    min-width: 2.625rem;
    min-height: 2.625rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.axm-avatar-choice__label {
    font-weight: 700;
    color: var(--axm-on-surface);
    font-size: 0.875rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.axm-avatar-choice input:checked ~ .axm-avatar-choice__label {
    color: var(--axm-primary);
}

.axm-avatar-choice:has(input:checked) {
    border-color: var(--axm-primary);
    box-shadow: var(--neo-raised);
}

.axm-avatar-studio {
    border-radius: var(--r-xl);
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
    padding: 1rem;
}

.axm-avatar-studio__current {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface-container);
    margin-bottom: 1rem;
}

.axm-avatar-studio__hero {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--axm-primary);
    font-size: 2.2rem;
    font-weight: 800;
    box-shadow: var(--neo-raised);
}

.axm-avatar-studio__eyebrow,
.axm-avatar-studio__hint {
    display: block;
    color: var(--axm-on-surface-variant);
}

.axm-avatar-studio__eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.axm-avatar-studio__name {
    display: block;
    margin: 0.25rem 0;
    color: var(--axm-on-surface);
    font-size: 1.2rem;
}

.axm-avatar-studio__hint {
    font-size: 0.875rem;
    line-height: 1.5;
}

.axm-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.75rem;
}

.axm-avatar-tile {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.5rem;
    padding: 0.8rem;
    border: 1px solid var(--axm-outline-variant);
    border-radius: var(--r-lg);
    background: var(--axm-surface);
    cursor: pointer;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.axm-avatar-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--neo-raised);
}

.axm-avatar-tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.axm-avatar-tile__preview {
    width: 3.375rem;
    height: 3.375rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.axm-avatar-tile__label {
    color: var(--axm-on-surface);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25;
}

.axm-avatar-tile input:checked ~ .axm-avatar-tile__label {
    color: var(--axm-primary);
}

.axm-avatar-tile:has(input:checked) {
    border-color: var(--axm-primary);
    box-shadow: var(--neo-raised);
}

.axm-default-avatar .material-symbols-outlined,
.axm-avatar-tile__preview .material-symbols-outlined,
.axm-avatar-studio__hero .material-symbols-outlined {
    font-size: 1em;
    line-height: 1;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 400px) {
    .axm-auth-card {
        padding: 1.75rem 1.25rem;
    }

    .axm-auth-switch {
        grid-template-columns: 1fr;
    }
}
