/* ============================================================
   MVMP Vendor Auth — Login & Registration (tabbed: Login /
   Become a Vendor / Join as Shopper / Contributor)

   Rewritten to consume the theme's design-token system
   (--mvmp-* custom properties defined in the theme's style.css)
   instead of hardcoded hex colors, so this form now looks like
   a native part of the site — including automatic dark-mode
   support — rather than a visually separate, older component.

   Falls back to sensible hex defaults via var(--x, fallback) so
   this still renders reasonably even if the theme's tokens
   aren't present for any reason (e.g. a different theme active).
   ============================================================ */

.mvmp-auth-wrap {
    max-width: 520px;
    margin: 40px auto;
    padding: 28px;
    font-family: inherit;
    background: var(--mvmp-card-bg, #fff);
    border: 1.5px solid var(--mvmp-border, #e2e8f0);
    border-radius: var(--mvmp-radius-xl, 14px);
}

/* Tabs */
.mvmp-auth-tabs {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1.5px solid var(--mvmp-border, #e2e8f0);
    margin-bottom: 24px;
}
.mvmp-auth-tabs::-webkit-scrollbar { display: none; }

.mvmp-auth-tab {
    flex: 1; min-width: 110px;
    padding: 11px 10px;
    background: none; border: none; border-bottom: 3px solid transparent;
    margin-bottom: -1.5px;
    font-size: 13px; font-weight: 700;
    color: var(--mvmp-muted, #64748b);
    cursor: pointer;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}
.mvmp-auth-tab:hover  { color: var(--mvmp-primary, #c31f6f); }
.mvmp-auth-tab.active,
.mvmp-auth-tab[aria-selected="true"] {
    color: var(--mvmp-primary, #c31f6f);
    border-bottom-color: var(--mvmp-primary, #c31f6f);
}

/* ── Mobile: stack the tabs vertically ──────────────────────────────
   Three tabs squeezed into a phone-width row forced tiny text and
   caused the labels to collide. Below 600px they become full-width
   stacked buttons instead — each one a comfortable touch target, and
   the active panel renders in full beneath them rather than competing
   for horizontal space. */
@media (max-width: 600px) {
    .mvmp-auth-wrap {
        margin: 20px auto;
        padding: 20px 18px;
        border-radius: var(--mvmp-radius-lg, 12px);
    }
    .mvmp-auth-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 6px;
        margin-bottom: 20px;
        overflow-x: visible;
    }
    .mvmp-auth-tab {
        min-width: 0;
        width: 100%;
        font-size: 14px;
        padding: 13px 14px;
        text-align: left;
        margin-bottom: 0;
        border: 1.5px solid var(--mvmp-border, #e2e8f0);
        border-radius: var(--mvmp-radius-sm, 8px);
        background: var(--mvmp-bg, #fff);
    }
    .mvmp-auth-tab.active,
    .mvmp-auth-tab[aria-selected="true"] {
        border-color: var(--mvmp-primary, #c31f6f);
        background: var(--mvmp-tint-primary-bg, #fdf2f8);
    }
    /* Stack the two-up name fields so they never squeeze on a phone. */
    .mvmp-auth-row { grid-template-columns: 1fr; }
}

/* Notices */
.mvmp-auth-notices { margin-bottom: 16px; min-height: 0; }
.mvmp-auth-notice {
    padding: 12px 16px; border-radius: var(--mvmp-radius-sm, 8px);
    font-size: 13.5px; font-weight: 500; line-height: 1.5;
    display: flex; align-items: flex-start; gap: 8px;
    border-left: 4px solid transparent;
}
.mvmp-auth-notice a { font-weight: 700; text-decoration: underline; }
.mvmp-auth-notice--success { background: #f0fdf4; color: #166534; border-left-color: #16a34a; }
.mvmp-auth-notice--error   { background: #fef2f2; color: #991b1b; border-left-color: #dc2626; }
.mvmp-auth-notice--info    { background: #eff6ff; color: #1e40af; border-left-color: #3b82f6; }
.mvmp-auth-notice--warn    { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }
[data-theme="dark"] .mvmp-auth-notice--success { background: oklch(28% 0.08 145); color: oklch(88% 0.05 145); }
[data-theme="dark"] .mvmp-auth-notice--error   { background: oklch(28% 0.08 25);  color: oklch(88% 0.05 25); }
[data-theme="dark"] .mvmp-auth-notice--info    { background: oklch(28% 0.08 250); color: oklch(88% 0.05 250); }
[data-theme="dark"] .mvmp-auth-notice--warn    { background: oklch(28% 0.08 85);  color: oklch(88% 0.05 85); }

/* Panels */
.mvmp-auth-panel { display: none; }
.mvmp-auth-panel.active,
.mvmp-auth-panel:not([hidden]) { display: block; }
.mvmp-auth-intro { color: var(--mvmp-muted, #64748b); font-size: 13.5px; margin: 0 0 20px; line-height: 1.5; }

/* Form */
.mvmp-auth-form { display: flex; flex-direction: column; gap: 16px; }

.mvmp-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .mvmp-auth-row { grid-template-columns: 1fr; } }

.mvmp-auth-field { display: flex; flex-direction: column; gap: 6px; }
.mvmp-auth-field label {
    font-size: 12.5px; font-weight: 700; color: var(--mvmp-ink, #374151);
    display: flex; justify-content: space-between; align-items: center;
}
.mvmp-auth-field label span { color: var(--mvmp-primary, #dc2626); }

.mvmp-auth-forgot {
    font-size: 12px; font-weight: 600; color: var(--mvmp-secondary, #2b7d82); text-decoration: none;
}
.mvmp-auth-forgot:hover { text-decoration: underline; }

.mvmp-auth-field input[type="text"],
.mvmp-auth-field input[type="email"],
.mvmp-auth-field input[type="tel"],
.mvmp-auth-field input[type="password"],
.mvmp-auth-field textarea,
.mvmp-auth-field select {
    padding: 11px 14px;
    border: 1.5px solid var(--mvmp-border, #e2e8f0);
    border-radius: var(--mvmp-radius-sm, 8px);
    font-size: 14px;
    color: var(--mvmp-ink, #1a202c);
    background: var(--mvmp-bg, #fff);
    transition: border-color .2s, box-shadow .2s;
    width: 100%; box-sizing: border-box; font-family: inherit;
}
.mvmp-auth-field input:focus,
.mvmp-auth-field textarea:focus,
.mvmp-auth-field select:focus {
    outline: none;
    border-color: var(--mvmp-primary, #c31f6f);
    box-shadow: 0 0 0 3px rgba(195, 31, 111, 0.15);
}
.mvmp-auth-field input.mvmp-error { border-color: #dc2626; }

/* Password input with eye toggle */
.mvmp-auth-pass-wrap { position: relative; display: flex; align-items: center; }
.mvmp-auth-pass-wrap input { padding-right: 42px; flex: 1; }
.mvmp-auth-eye {
    position: absolute; right: 10px;
    background: none; border: none; cursor: pointer;
    padding: 4px; font-size: 15px; opacity: .55; color: var(--mvmp-ink, inherit);
    transition: opacity .15s;
}
.mvmp-auth-eye:hover { opacity: 1; }

/* Password strength meter */
.mvmp-auth-strength {
    height: 4px; border-radius: 2px; background: var(--mvmp-border, #e2e8f0);
    overflow: hidden; margin-top: 6px; position: relative;
}
.mvmp-auth-strength::after {
    content: ''; display: block; height: 100%;
    width: var(--strength, 0%); background: var(--strength-color, var(--mvmp-muted, #94a3b8));
    transition: width .3s, background .3s; border-radius: 2px;
}
.mvmp-auth-strength-label {
    font-size: 11.5px; color: var(--strength-color, var(--mvmp-muted, #94a3b8)); margin-top: 3px; font-weight: 600;
}

/* Remember me / terms checkbox rows */
.mvmp-auth-remember {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; cursor: pointer; color: var(--mvmp-ink, #374151);
}

/* Submit button — reuses the theme's own primary button look */
.mvmp-auth-form .mvmp-btn--full,
.mvmp-btn--full {
    width: 100%; text-align: center; justify-content: center;
    background: var(--mvmp-primary-grad, linear-gradient(135deg,#c31f6f,#9d3fce));
    color: #fff; border: none; border-radius: var(--mvmp-radius-md, 10px);
    padding: 13px 20px; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.mvmp-btn--loading { opacity: .7; pointer-events: none; }
.mvmp-btn--loading::after {
    content: ' \\27F3'; animation: mvmp-auth-spin .6s linear infinite; display: inline-block;
}
@keyframes mvmp-auth-spin { from { transform: rotate(0) } to { transform: rotate(360deg) } }

/* Hint / note text */
.mvmp-auth-hint { font-size: 11.5px; color: var(--mvmp-muted, #94a3b8); margin: 4px 0 0; }
.mvmp-auth-note { font-size: 12px; color: var(--mvmp-muted, #64748b); text-align: center; margin-top: 8px; }
