/* ===== AUTH + VOICE CSS STYLES ===== */

/* General Modal & UI Styles */
.hidden {
    display: none !important;
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

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

.auth-modal .modal-content {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-2xl, 24px);
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.auth-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
    position: relative;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color, #8A57FF), var(--secondary-color, #FF3A95));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.modal-header h3 {
    flex: 1;
    margin: 0;
    color: var(--text-light, #ffffff);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-gray, #888);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light, #ffffff);
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-gray, #888);
    text-align: center;
    font-size: 0.9rem;
}

/* Auth View Switching Styles */
.auth-back-btn {
    position: absolute;
    top: 1.6rem;
    left: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray, #888);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Initial Choice View */
.auth-choice-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-choice-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}

.auth-choice-btn:hover {
    transform: translateY(-2px);
}

.auth-choice-btn.google {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
}
.auth-choice-btn.google:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-choice-btn:not(.google) {
    background: linear-gradient(135deg, var(--primary-color, #8A57FF), var(--secondary-color, #FF3A95));
    color: white;
}
.auth-choice-btn:not(.google):hover {
    box-shadow: 0 4px 15px rgba(138, 87, 255, 0.4);
}

.auth-choice-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.auth-choice-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* Email Form Styles */
.email-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-auth-form .form-group {
    margin-bottom: 0;
}

.email-auth-form input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.email-auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.email-auth-form input:focus {
    outline: none;
    border-color: var(--primary-color, #8A57FF);
    box-shadow: 0 0 0 3px rgba(138, 87, 255, 0.3);
}

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color, #8A57FF), var(--secondary-color, #FF3A95));
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.auth-submit-btn:hover {
    box-shadow: 0 4px 15px rgba(138, 87, 255, 0.4);
    transform: translateY(-2px);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-submit-btn .signin-loading {
    display: none;
    position: absolute;
    right: 24px;
    color: white;
}

/* Loading spinner for buttons */
.signin-loading {
    display: none;
    position: absolute;
    right: 24px;
    color: white;
}

.signin-loading.show {
    display: block;
}

/* Status Message */
.auth-voice-status {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(26, 26, 46, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90vw;
    text-align: center;
}

.auth-voice-status.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.auth-voice-status.error {
    border-color: rgba(255, 68, 68, 0.4);
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.auth-voice-status.warning {
    border-color: rgba(255, 193, 7, 0.4);
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Voice Button Styles */
.voice-auth-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-auth-btn.unauthenticated {
    background: linear-gradient(135deg, #8A57FF, #FF3A95);
}

.voice-auth-btn.authenticated {
    background: linear-gradient(135deg, #00ff88, #8A57FF);
}

.voice-auth-btn.connecting,
.voice-auth-btn.connected {
    background: linear-gradient(135deg, #00ff88, #00D4AA);
}

.auth-required-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ff4444;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

/* Unified Terms & Conditions Checkbox Styles */
.terms-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-gray, #888);
    cursor: pointer;
    padding: 0;
}

.terms-container input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px; /* Reduced from 20px */
    height: 16px; /* Reduced from 20px */
    border: 2px solid var(--card-border, rgba(255, 255, 255, 0.3));
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.terms-container input[type="checkbox"]:hover {
    border-color: var(--primary-color, #8A57FF);
}

.terms-container input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color, #8A57FF), var(--secondary-color, #FF3A95));
    border-color: transparent;
}

.terms-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;    /* Reduced from 14px to 10px */
    font-weight: bold;
    line-height: 1;
}

.terms-container label {
    flex: 1;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
}

.terms-container a {
    color: var(--primary-color, #8A57FF);
    text-decoration: none;
    transition: color 0.2s ease;
}

.terms-container a:hover {
    color: var(--secondary-color, #FF3A95);
    text-decoration: underline;
}

/* Form spacing adjustments */
.email-auth-form .form-group + .form-group {
    margin-top: 0;
}

.email-auth-form .terms-container {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Auth view specific spacing */
#authInitialView .terms-container {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

#authLoginView .email-auth-form,
#authSignUpView .email-auth-form {
    margin-top: 0.5rem;
}

/* Button loading state improvements */
.auth-choice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-choice-btn.google:disabled:hover {
    background: white;
    transform: none;
    box-shadow: none;
}

