/* Auth Modals — Login and Create Account */

/* ==================== MODAL BASE ==================== */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9997;
}

.auth-modal.active {
    display: block;
}

.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.auth-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    background: #0a0a0a;
    border: 2px solid #33ff33;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.15);
}

/* ==================== HEADER ==================== */
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(51, 255, 51, 0.3);
    flex-shrink: 0;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #33ff33;
    letter-spacing: 0.12em;
    font-family: 'Roboto Mono', monospace;
}

.auth-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #e622c5;
    border-radius: 50%;
    background: transparent;
    color: #e622c5;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(230, 34, 197, 0.2);
    box-shadow: 0 0 10px rgba(230, 34, 197, 0.4);
}

/* ==================== BODY ==================== */
.auth-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.auth-modal-body::-webkit-scrollbar { width: 6px; }
.auth-modal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.auth-modal-body::-webkit-scrollbar-thumb { background: #33ff33; border-radius: 3px; }

/* ==================== MESSAGES ==================== */
.auth-modal-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #ff6b7a;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.auth-modal-success {
    background: rgba(51, 255, 51, 0.08);
    border: 1px solid #33ff33;
    color: #33ff33;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

/* ==================== FORM ==================== */
.auth-modal-field {
    margin-bottom: 0.9rem;
}

.auth-modal-form input[type="text"],
.auth-modal-form input[type="email"],
.auth-modal-form input[type="password"],
.auth-modal-form input[type="tel"] {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.auth-modal-form input:focus {
    outline: none;
    border-color: #33ff33;
    box-shadow: 0 0 0 2px rgba(51, 255, 51, 0.15);
}

.auth-modal-form input.field-error {
    border-color: #dc3545;
}

.auth-modal-form input::placeholder {
    color: #555;
}

.auth-modal-field-error {
    color: #ff6b7a;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    display: none;
}

.auth-modal-submit {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid #33ff33;
    border-radius: 6px;
    color: #33ff33;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.auth-modal-submit:hover:not(:disabled) {
    background: rgba(51, 255, 51, 0.1);
    box-shadow: 0 0 12px rgba(51, 255, 51, 0.3);
}

.auth-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== FOOTER LINKS ==================== */
.auth-modal-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: 'Roboto Mono', monospace;
}

.auth-modal-links a,
.auth-modal-links button[type="button"] {
    color: #e622c5;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Roboto Mono', monospace;
    text-decoration: none;
    transition: text-shadow 0.15s;
    padding: 0;
}

.auth-modal-links a:hover,
.auth-modal-links button[type="button"]:hover {
    text-shadow: 0 0 8px #e622c5;
}

/* ==================== SMS CONSENT ==================== */
.auth-modal-consent {
    background: rgba(51, 255, 51, 0.05);
    border: 1px solid rgba(51, 255, 51, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.9rem;
    display: none;
}

.auth-modal-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: rgba(51, 255, 51, 0.85);
    font-size: 0.78rem;
    line-height: 1.5;
    cursor: pointer;
}

.auth-modal-consent input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 0 !important;
    accent-color: #33ff33;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
}

/* ==================== DROPDOWN BUTTON COMPAT ==================== */
button.auth-dropdown-item {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}
