/**
 * VIG1FM Auth Popup – Login / Register / Forgot-password
 */

/* ── Overlay ─────────────────────────────────────────────────────────── */
#vig1-auth-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10300;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* ── Container ───────────────────────────────────────────────────────── */
.vig1-auth-popup-container {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
    width: 420px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #1f2937;
    padding: 32px 28px 28px;
    box-sizing: border-box;
}

body.vig1-auth-popup-open {
    overflow: hidden;
}

/* ── Close button ────────────────────────────────────────────────────── */
.vig1-auth-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.vig1-auth-popup-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Title ───────────────────────────────────────────────────────────── */
.vig1-auth-popup-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

/* ── Form groups ─────────────────────────────────────────────────────── */
.vig1-auth-form-group {
    margin-bottom: 14px;
}
.vig1-auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.vig1-auth-form-group input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1f2937;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.vig1-auth-form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

/* ── Submit button ───────────────────────────────────────────────────── */
.vig1-auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    padding: 10px 18px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    box-sizing: border-box;
}
.vig1-auth-submit-btn:hover:not(:disabled) {
    background: #4f46e5;
}
.vig1-auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.vig1-auth-submit-btn--outline {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}
.vig1-auth-submit-btn--outline:hover:not(:disabled) {
    background: #eef2ff;
}

/* ── Spinner ─────────────────────────────────────────────────────────── */
.vig1-auth-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vig1-spin 0.7s linear infinite;
}
.vig1-auth-submit-btn--outline .vig1-auth-btn-spinner {
    border-color: rgba(99, 102, 241, 0.3);
    border-top-color: #6366f1;
}
@keyframes vig1-spin {
    to { transform: rotate(360deg); }
}

/* ── Error box ───────────────────────────────────────────────────────── */
.vig1-auth-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.4;
}

/* ── Not-activated notice ────────────────────────────────────────────── */
.vig1-auth-not-activated {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    margin-top: 10px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* ── Link buttons ────────────────────────────────────────────────────── */
.vig1-auth-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #6366f1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.vig1-auth-link-btn:hover {
    color: #4f46e5;
}

/* ── Bottom links row ────────────────────────────────────────────────── */
.vig1-auth-popup-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
    justify-content: center;
}

/* ── Forgot password info text ───────────────────────────────────────── */
.vig1-auth-forgot-info {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

/* ── Success message ─────────────────────────────────────────────────── */
.vig1-auth-success-msg {
    text-align: center;
    padding: 16px 0 4px;
}
.vig1-auth-success-msg p {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 460px) {
    .vig1-auth-popup-container {
        padding: 24px 18px 20px;
    }
    .vig1-auth-popup-title {
        font-size: 18px;
    }
}
