/**
 * AI-GURU Login Modal Styles - Light Theme
 */

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: #ffffff;
    border-radius: 16px; padding: 32px;
    width: 100%; max-width: 480px; margin: 20px;
    position: relative; transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal-overlay.show .modal-content { transform: scale(1); }

.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: transparent; border: none; color: #999;
    cursor: pointer; padding: 8px; border-radius: 8px;
}
.modal-close:hover { color: #333; background: #f5f5f5; }
.modal-close i { width: 20px; height: 20px; }

.modal-title {
    font-size: 24px; font-weight: 600; color: #333;
    margin: 0 0 24px 0; text-align: center;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 14px; font-weight: 500;
    color: #666; margin-bottom: 8px;
}
.form-group input {
    width: 100%; padding: 12px 16px;
    background: #f8f8f8; border: 1px solid #e0e0e0;
    border-radius: 8px; color: #333; font-size: 16px;
    box-sizing: border-box;
}
.form-group input:focus { outline: none; border-color: #54a3e0; background: #fff; }
.form-group input::placeholder { color: #999; }

.phone-input-wrapper { display: flex; gap: 8px; }
.country-select { position: relative; min-width: 130px; }
.country-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 12px; background: #f8f8f8; border: 1px solid #e0e0e0;
    border-radius: 8px; color: #333; font-size: 15px;
    cursor: pointer; height: 100%;
}
.country-btn:hover { background: #f0f0f0; border-color: #54a3e0; }
.country-flag { font-size: 20px; }
.country-code { font-weight: 500; color: #333; }
.country-chevron { width: 14px; height: 14px; color: #999; margin-left: auto; }

.country-menu {
    position: absolute; top: 100%; left: 0; margin-top: 4px;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 4px; min-width: 220px; max-height: 300px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    z-index: 101; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.country-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.country-option {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; background: transparent; border: none;
    border-radius: 6px; color: #333; font-size: 14px; cursor: pointer;
}
.country-option:hover { background: #f5f5f5; }
.country-option.active { background: #e8f4fd; color: #54a3e0; }
.country-option .country-name { flex: 1; }
.country-option .country-dial { color: #999; font-size: 13px; }
.phone-number-input { flex: 1; }

.modal-info {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #666; margin-bottom: 24px;
    padding: 12px; background: #f0f7ff; border-radius: 8px;
}
.modal-info i { width: 16px; height: 16px; color: #54a3e0; flex-shrink: 0; }

.modal-success {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: #2d8a4e; margin-bottom: 24px;
    padding: 12px; background: #e8f5e9; border-radius: 8px;
}
.modal-success i { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    width: 100%; padding: 14px 24px; background: #54a3e0;
    border: none; border-radius: 8px; color: #fff;
    font-size: 16px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover:not(:disabled) {
    background: #4a93cc; transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(84, 163, 224, 0.3);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-text {
    background: transparent; border: none; color: #54a3e0;
    font-size: 14px; cursor: pointer; padding: 8px 16px;
}
.btn-text:hover { color: #4a93cc; }

.login-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: transparent;
    border: 1px solid var(--accent, #c9a962); border-radius: 8px;
    color: var(--accent, #c9a962); font-size: 14px; font-weight: 500; cursor: pointer;
}
.login-btn:hover { background: rgba(201, 169, 98, 0.1); }
.login-btn i { width: 16px; height: 16px; }

.otp-container { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.otp-input {
    width: 48px; height: 56px; text-align: center;
    font-size: 24px; font-weight: 600; background: #f8f8f8;
    border: 2px solid #e0e0e0; border-radius: 12px; color: #333;
}
.otp-input:focus { outline: none; border-color: #54a3e0; background: #fff; }

.otp-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.otp-actions .btn-primary { flex: 1; }

.error-message {
    color: #e53935; font-size: 14px; text-align: center;
    margin-top: 16px; padding: 10px; background: #ffebee; border-radius: 8px;
}
.error-message.hidden { display: none; }

.activate-section {
    margin-top: 24px; padding-top: 24px;
    border-top: 1px solid #e0e0e0; text-align: center;
}
.activate-section.hidden { display: none; }
.activate-title { font-size: 16px; font-weight: 600; color: #54a3e0; margin-bottom: 8px; }
.activate-instructions { font-size: 14px; color: #666; margin-bottom: 16px; }

.spinner {
    width: 20px; height: 20px; border: 2px solid transparent;
    border-top-color: currentColor; border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lang-dropdown { position: relative; display: inline-block; }
.lang-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; background: transparent;
    border: 1px solid var(--border, rgba(201, 169, 98, 0.15));
    border-radius: 8px; color: var(--text-primary, #f5f5f5);
    font-size: 13px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent, #c9a962); }
.lang-flag { font-size: 16px; }
.lang-code { font-weight: 500; }
.lang-chevron { width: 14px; height: 14px; color: var(--text-secondary, #a8a8a8); }

.lang-menu {
    position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 4px; min-width: 140px; opacity: 0; visibility: hidden;
    transform: translateY(-10px); z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.lang-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 12px; background: transparent; border: none;
    border-radius: 6px; color: #333; font-size: 13px; cursor: pointer;
}
.lang-option:hover { background: #f5f5f5; }
.lang-option.active { background: #e8f4fd; color: #54a3e0; }
.lang-name { flex: 1; }

@media (max-width: 480px) {
    .modal-content { padding: 24px; margin: 16px; }
    .otp-input { width: 40px; height: 48px; font-size: 20px; }
    .otp-container { gap: 6px; }
    .phone-input-wrapper { flex-direction: column; }
    .country-select { width: 100%; }
    .country-btn { width: 100%; justify-content: flex-start; }
}
