/* Custom Login Popup Styles */

.custom-login-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.custom-login-popup-overlay.active {
    display: flex;
}

.custom-login-popup-container {
    background: #000000;
    width: 90%;
    max-width: 440px;
    border-radius: 0;
    position: relative;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    border-color: #ffffff;
}

.google-login-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 16px 24px;
    width: 100%;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.3s;
    border-radius: 4px;
}

.google-login-btn:hover {
    background: #f5f5f5;
}

.google-icon {
    width: 20px;
    height: 20px;
}

.social-login-container {
    margin-top: 0;
}

/* Style Nextend Social Login buttons to match design */
.social-login-container .nsl-container {
    margin: 0 !important;
    padding: 0 !important;
}

.social-login-container .nsl-container-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.social-login-container .nsl-button {
    margin: 0 !important;
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.social-login-container .nsl-button-google {
    background: #ffffff !important;
    color: #000000 !important;
}

.social-login-container .nsl-button-google:hover {
    background: #f5f5f5 !important;
}

/* Style the notice message when Nextend is not installed */
.social-login-notice {
    color: #999;
    font-size: 14px;
    text-align: center;
    margin: 0;
    padding: 16px;
}

.social-login-notice a {
    color: #4285f4;
    text-decoration: none;
}

.social-login-notice a:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 24px 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #333;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.popup-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin: 32px 32px 0;
}

.popup-tab {
    flex: 1;
    padding: 16px 0;
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s;
}

.popup-tab.active {
    color: #ffffff;
}

.popup-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffffff;
}

.popup-content {
    padding: 32px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.form-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-method-label,
.registration-method-label {
    color: #999;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.method-options {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #666;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.method-option input[type="radio"]:checked {
    border-color: #4285f4;
}

.method-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #4285f4;
    border-radius: 50%;
}

.method-option label {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #555;
    font-size: 14px;
}

.form-input:focus {
    border-bottom-color: #666;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #e74c3c;
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 32px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
    border-radius: 2px;
}

.submit-btn:hover {
    background: #c0392b;
}

.submit-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: #2ecc71;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-login-popup-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .popup-content {
        padding: 24px;
    }
    
    .popup-tabs {
        margin: 24px 24px 0;
    }
}

/* Loading spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.submit-btn.loading .loading-spinner {
    display: block;
}

.submit-btn.loading .btn-text {
    display: none;
}

/* OTP specific styles */
.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: bold;
}

.otp-info {
    color: #999;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.otp-info strong {
    color: #ffffff;
}

.back-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #999;
    border: 1px solid #333;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s;
    border-radius: 2px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: #666;
}

/* OTP Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-otp {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-info {
    color: #999;
    font-size: 14px;
    margin-bottom: 24px;
    text-align: center;
}

.email-display {
    color: #ffffff;
    font-weight: 600;
}

.change-email {
    color: #4285f4;
    text-decoration: none;
    margin-left: 8px;
    font-size: 13px;
}

.change-email:hover {
    text-decoration: underline;
}

.button-link {
    background: transparent;
    border: none;
    color: #4285f4;
    cursor: pointer;
    font-size: 14px;
    margin-top: 16px;
    padding: 0;
    text-decoration: underline;
    width: 100%;
    text-align: center;
}

.button-link:hover {
    color: #5a95f5;
}

.button-link:disabled {
    color: #666;
    cursor: not-allowed;
}

/* Hide password field when OTP is selected */
.password-group.hidden {
    display: none;
}
