/* STM Auth Modal v2.0.0 — Small Traders */

/* ── Reset ──────────────────────────────────────────── */
.stm-auth-modal *,
.stm-auth-modal *::before,
.stm-auth-modal *::after { box-sizing: border-box; }

/* ── Backdrop ───────────────────────────────────────── */
.stm-auth-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 99998;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.stm-auth-backdrop.open { display: block; }
body.stm-modal-open { overflow: hidden; }

/* ── Modal ──────────────────────────────────────────── */
.stm-auth-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    width: 100%; max-width: 460px;
    max-height: 90vh; overflow-y: auto;
    background: #0f1923;
    border: 1px solid rgba(201,168,76,.18);
    border-radius: 16px;
    padding: 40px 36px 36px;
    color: #fafaf8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 24px 64px rgba(0,0,0,.7);
}
.stm-auth-modal.open { display: block; }

@media (max-width: 520px) {
    .stm-auth-modal {
        max-width: 100%;
        width: calc(100% - 24px);
        padding: 32px 20px 28px;
        border-radius: 14px;
    }
}

/* ── Botón cerrar ───────────────────────────────────── */
.stm-auth-close {
    position: absolute; top: 14px; right: 16px;
    background: rgba(255,255,255,.08);
    border: none; border-radius: 50%;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(250,250,248,.6);
    font-size: 14px; cursor: pointer;
    transition: background .2s, color .2s;
    padding: 0;
}
.stm-auth-close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Logo ───────────────────────────────────────────── */
.stm-auth-logo-wrap {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: .5px solid rgba(255,255,255,.07);
}
.stm-auth-logo-img { display: block; margin: 0 auto 10px; }

.stm-auth-logo-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(201,168,76,.3);
}
.stm-auth-logo-full {
    max-width: 200px; max-height: 64px;
    width: auto; height: auto;
    object-fit: contain;
}
.stm-auth-logo-fallback {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(201,168,76,.1);
    border: 2px solid rgba(201,168,76,.25);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 30px; color: #c9a84c; margin-bottom: 10px;
}
.stm-auth-site-name {
    font-size: 11px; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: rgba(250,250,248,.35);
}

/* ── Pantallas ──────────────────────────────────────── */
.stm-auth-screen { display: none; }
.stm-auth-screen.active { display: block; }

/* ── Tipografía ─────────────────────────────────────── */
.stm-auth-title {
    font-size: 22px; font-weight: 700;
    text-align: center; margin: 0 0 6px;
    color: #fafaf8;
    font-variant: small-caps; letter-spacing: .03em;
}
.stm-auth-subtitle {
    font-size: 13.5px; color: rgba(250,250,248,.5);
    text-align: center; margin: 0 0 24px; line-height: 1.5;
}

/* ── Labels e Inputs ────────────────────────────────── */
.stm-auth-label {
    display: block;
    font-size: 11px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase;
    color: rgba(250,250,248,.45);
    margin-bottom: 6px; margin-top: 16px;
}
.stm-auth-input {
    width: 100%; padding: 11px 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: #fafaf8; font-size: 15px;
    outline: none; transition: border-color .2s, background .2s;
    -webkit-appearance: none;
}
.stm-auth-input::placeholder { color: rgba(250,250,248,.25); }
.stm-auth-input:focus {
    border-color: rgba(201,168,76,.6);
    background: rgba(255,255,255,.09);
}
.stm-input-center { text-align: center; letter-spacing: .3em; font-size: 20px; }

.stm-auth-input-wrap { position: relative; }
.stm-auth-input-wrap .stm-auth-input { padding-right: 42px; }
.stm-auth-eye {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: rgba(250,250,248,.35); padding: 0;
    display: flex; align-items: center;
    transition: color .2s;
}
.stm-auth-eye:hover { color: rgba(250,250,248,.7); }

/* ── Fortaleza de contraseña ────────────────────────── */
.stm-auth-strength {
    display: flex; align-items: center; gap: 10px; margin-top: 6px;
}
.stm-strength-bar {
    flex: 1; height: 4px;
    background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden;
}
.stm-strength-fill {
    height: 100%; width: 0; border-radius: 2px;
    transition: width .3s, background .3s;
    background: rgba(255,255,255,.2);
}
.stm-strength-fill.weak   { background: #e05252; }
.stm-strength-fill.fair   { background: #e09a2a; }
.stm-strength-fill.good   { background: #4db87a; }
.stm-strength-fill.strong { background: #c9a84c; }
.stm-strength-label {
    font-size: 11px; color: rgba(250,250,248,.45);
    white-space: nowrap; min-width: 70px; text-align: right;
}

/* ── Botón primario ─────────────────────────────────── */
.stm-auth-btn-primary {
    display: block; width: 100%;
    margin-top: 22px; padding: 13px;
    background: linear-gradient(135deg, #c9a84c 0%, #a8833a 100%);
    border: none; border-radius: 9px;
    color: #0f1923; font-size: 16px; font-weight: 700;
    cursor: pointer; letter-spacing: .03em;
    transition: opacity .2s, transform .1s;
}
.stm-auth-btn-primary:hover:not(:disabled) { opacity: .9; }
.stm-auth-btn-primary:active:not(:disabled) { transform: scale(.98); }
.stm-auth-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* ── Links ──────────────────────────────────────────── */
.stm-auth-link {
    display: block; width: 100%; margin-top: 14px;
    background: none; border: none;
    color: rgba(250,250,248,.4); font-size: 13px;
    text-align: center; cursor: pointer;
    transition: color .2s; padding: 4px 0;
}
.stm-auth-link:hover { color: rgba(250,250,248,.75); }
.stm-auth-link-accent { color: #c9a84c !important; font-weight: 600; }
.stm-auth-link-accent:hover { color: #e0c070 !important; }

.stm-auth-switch {
    text-align: center; font-size: 13px;
    color: rgba(250,250,248,.4); margin-top: 14px; margin-bottom: 0;
}

/* ── Mensajes ───────────────────────────────────────── */
.stm-auth-msg {
    padding: 10px 14px; border-radius: 7px;
    font-size: 13.5px; margin-top: 14px; line-height: 1.45;
}
.stm-msg-err  { background: rgba(224,82,82,.15); color: #f08080; border: 1px solid rgba(224,82,82,.3); }
.stm-msg-ok   { background: rgba(77,184,122,.12); color: #6ddb9a; border: 1px solid rgba(77,184,122,.25); }
.stm-msg-info { background: rgba(201,168,76,.1);  color: #c9a84c; border: 1px solid rgba(201,168,76,.25); }

/* ── Pantalla de éxito ──────────────────────────────── */
.stm-auth-success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(201,168,76,.15);
    border: 2px solid rgba(201,168,76,.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #c9a84c;
    margin: 0 auto 18px;
}

/* ── Shortcode buttons ──────────────────────────────── */
.stm-auth-sc-wrap { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.stm-auth-sc-btn {
    padding: 9px 18px; border-radius: 7px;
    background: linear-gradient(135deg, #c9a84c, #a8833a);
    border: none; color: #0f1923; font-weight: 700;
    cursor: pointer; font-size: 14px;
    transition: opacity .2s;
}
.stm-auth-sc-btn:hover { opacity: .88; }
.stm-auth-sc-account {
    background: rgba(255,255,255,.08);
    color: #fafaf8;
    text-decoration: none; display: inline-block;
}
.stm-auth-sc-register {
    background: transparent;
    border: 1px solid rgba(201,168,76,.5) !important;
    color: #c9a84c;
}
