/* User auth UI — standalone pages + map user menu (keep out of script.js). */

.lp-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-body, #0f1411);
    color: var(--text, #e8ece9);
}

.lp-auth-card {
    width: min(420px, 100%);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border, #2a3530);
    background: var(--bg-panel, #1a211c);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.lp-auth-brand {
    display: inline-block;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--text, #e8ece9);
    text-decoration: none;
}

.lp-auth-card h1 {
    margin: 0 0 8px;
    font-size: 22px;
}

.lp-auth-lead {
    margin: 0 0 20px;
    color: var(--text-muted, #a8b0ab);
    line-height: 1.45;
}

.lp-auth-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-muted, #a8b0ab);
}

/* Author display rules beat UA [hidden]; keep toggled fields actually hidden. */
.lp-auth-form label[hidden],
.lp-auth-form .lp-auth-hint[hidden],
.lp-auth-form .lp-auth-error[hidden],
.lp-auth-form .lp-auth-success[hidden] {
    display: none !important;
}

.lp-auth-form input[type="email"],
.lp-auth-form input[type="password"],
.lp-auth-form input[type="text"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border, #2a3530);
    background: var(--bg-input, #121814);
    color: var(--text, #e8ece9);
    font-size: 15px;
}

/* Keep fields dark when the browser paints autofill white (hides the eye icon). */
.lp-auth-form input:-webkit-autofill,
.lp-auth-form input:-webkit-autofill:hover,
.lp-auth-form input:-webkit-autofill:focus,
.lp-auth-form input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text, #e8ece9);
    caret-color: var(--text, #e8ece9);
    box-shadow: 0 0 0 1000px var(--bg-input, #121814) inset;
    transition: background-color 99999s ease-out;
}

.lp-auth-password-wrap {
    position: relative;
    display: block;
    margin-top: 6px;
}

.lp-auth-password-wrap input[type="password"],
.lp-auth-password-wrap input[type="text"] {
    margin-top: 0;
    padding-right: 44px;
}

.lp-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 6px;
    /* Opaque chip so the icon stays visible on light autofill backgrounds. */
    background: var(--bg-input, #121814);
    color: #c8d0cb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lp-auth-password-toggle:hover {
    color: #ffffff;
    background: #1c2420;
}

.lp-auth-password-toggle:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

.lp-auth-password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.lp-auth-hint {
    margin: -6px 0 14px;
    font-size: 12px;
    color: var(--text-muted, #a8b0ab);
}

.lp-auth-error {
    margin: 0 0 12px;
    color: #f87171;
    font-size: 13px;
}

.lp-auth-success {
    margin: 0 0 12px;
    color: #86efac;
    font-size: 13px;
}

.lp-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.lp-auth-primary:hover {
    background: #1d4ed8;
}

.lp-auth-primary--link {
    text-decoration: none;
}

.lp-auth-footer {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted, #a8b0ab);
}

.lp-auth-footer a {
    color: #93c5fd;
}

#lp-user-menu {
    position: relative;
    flex-shrink: 0;
}

.lp-user-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1d4ed8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
}

.lp-user-trigger--guest {
    background: #374151;
}

.lp-user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border-active, #3a4a3f);
    background: rgba(26, 33, 28, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.lp-user-dropdown[hidden] {
    display: none !important;
}

.lp-user-dropdown-meta {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--border, #2a3530);
    margin-bottom: 6px;
}

.lp-user-dropdown-name {
    font-weight: 600;
    font-size: 13px;
}

.lp-user-dropdown-email {
    font-size: 12px;
    color: var(--text-muted, #a8b0ab);
    word-break: break-all;
}

.lp-user-dropdown button,
.lp-user-dropdown a {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text, #e8ece9);
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.lp-user-dropdown button:hover,
.lp-user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.06);
}

#lp-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#lp-auth-modal[hidden] {
    display: none !important;
}

.lp-auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.lp-auth-modal-card {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-active, #3a4a3f);
    background: var(--bg-panel, #1a211c);
    color: var(--text, #e8ece9);
}

.lp-auth-modal-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.lp-auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #a8b0ab);
    font-size: 18px;
    cursor: pointer;
}

.lp-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-muted, #a8b0ab);
}
