/* ============================================================
   WP LOGIN CUSTOMIZER – Public Styles
   ============================================================ */

/* Uses CSS vars injected via WLC_Frontend::build_css_vars() */

/* ── Wrapper ─────────────────────────────────────────────── */
.wlc-form-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
}

/* ── Card ──────────────────────────────────────────────────── */
.wlc-form-card {
    background: var(--wlc-form-bg, #fff);
    color: var(--wlc-text, #1a1a2e);
    border-radius: var(--wlc-radius, 12px);
    box-shadow: var(--wlc-shadow, 0 20px 60px rgba(0,0,0,.12));
    width: 100%;
    max-width: var(--wlc-width, 420px);
    padding: 40px 36px;
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Logo ──────────────────────────────────────────────────── */
.wlc-logo-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.wlc-logo-wrap img {
    max-height: 70px;
    object-fit: contain;
}

/* ── Title ──────────────────────────────────────────────────── */
.wlc-form-title {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -.3px;
}

/* ── Messages ────────────────────────────────────────────────── */
.wlc-messages {
    margin-bottom: 12px;
}

.wlc-messages .wlc-msg {
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 8px;
}

.wlc-msg-error { background: #fff1f2; color: #be123c; border-left: 3px solid #be123c; }
.wlc-msg-success { background: #f0fdf4; color: #166534; border-left: 3px solid #166534; }

/* ── Fields ──────────────────────────────────────────────────── */
.wlc-field {
    margin-bottom: 16px;
}

.wlc-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    opacity: .8;
}

.wlc-field input[type=text],
.wlc-field input[type=password],
.wlc-field input[type=email] {
    width: 100%;
    padding: 10px 14px;
    background: var(--wlc-input-bg, #f8f9ff);
    border: 1.5px solid var(--wlc-input-border, #d1d5e8);
    border-radius: 7px;
    color: var(--wlc-text, #1a1a2e);
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.wlc-field input:focus {
    border-color: var(--wlc-input-focus, #4f46e5);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wlc-input-focus, #4f46e5) 15%, transparent);
}

/* ── Password toggle ──────────────────────────────────────── */
.wlc-pass-wrap {
    position: relative;
}

.wlc-pass-wrap input {
    padding-right: 40px;
}

.wlc-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--wlc-text, #1a1a2e);
    opacity: .45;
    display: flex;
    align-items: center;
    transition: opacity .15s;
}

.wlc-toggle-pass:hover { opacity: .8; }

/* ── Remember + forgot row ───────────────────────────────── */
.wlc-row { display: flex; align-items: center; }
.wlc-row-between { justify-content: space-between; }

.wlc-check-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
}

.wlc-link {
    color: var(--wlc-accent, #4f46e5);
    text-decoration: none;
    font-size: 13px;
    transition: opacity .15s;
}

.wlc-link:hover { opacity: .75; }
.wlc-forgot { font-size: 12px; }

/* ── Submit button ───────────────────────────────────────── */
.wlc-submit {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: var(--wlc-btn-bg, #4f46e5);
    color: var(--wlc-btn-text, #fff);
    border: none;
    border-radius: var(--wlc-btn-radius, 8px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .15s;
    letter-spacing: .2px;
}

.wlc-submit:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--wlc-btn-bg, #4f46e5) 30%, transparent);
}

.wlc-submit:active { transform: translateY(0); }
.wlc-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Register link ────────────────────────────────────────── */
.wlc-register {
    text-align: center;
    font-size: 13px;
    margin: 16px 0 0;
    opacity: .75;
}

.wlc-register .wlc-link { font-size: 13px; font-weight: 600; }

/* ── Logged-in state ──────────────────────────────────────── */
.wlc-logged-in {
    padding: 20px 24px;
    background: var(--wlc-form-bg, #fff);
    border-radius: var(--wlc-radius, 12px);
    display: inline-flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--wlc-shadow, 0 4px 16px rgba(0,0,0,.08));
    font-size: 14px;
}

.wlc-logged-in p { margin: 0; }

.wlc-btn-logout {
    display: inline-block;
    padding: 8px 16px;
    background: var(--wlc-btn-bg, #4f46e5);
    color: var(--wlc-btn-text, #fff) !important;
    border-radius: var(--wlc-btn-radius, 8px);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}

.wlc-btn-logout:hover { opacity: .85; }

/* ── Login button (shown when logged out via [wlc_logout]) ── */
.wlc-btn-login {
    display: inline-block;
    padding: 8px 16px;
    background: var(--wlc-btn-bg, #4f46e5);
    color: var(--wlc-btn-text, #fff) !important;
    border-radius: var(--wlc-btn-radius, 8px);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}

.wlc-btn-login:hover { opacity: .85; }

/* ── Shake animation on failed login ────────────────────── */
@keyframes wlc-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}
.wlc-shake { animation: wlc-shake 0.5s ease; }

/* ── Lost password description ───────────────────────────── */
.wlc-lp-description {
    font-size: 13px;
    opacity: .7;
    margin: 0 0 20px;
    line-height: 1.6;
    text-align: center;
}

/* ── Register link (full width, centred) ────────────────── */
.wlc-register {
    text-align: center;
    margin: 16px 0 0;
    padding: 0;
}
.wlc-register-link {
    font-size: 13px;
    font-weight: 500;
}
