/* Authentication Styles */
@import './common.css';

:root {
    --text-light: #6c757d;
}

/* Auth Container */
.auth-container {
    max-width: 450px;
    margin: 20px auto;
    /* min-height: calc(100vh - 80px); */
    min-height: auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    animation: slideIn 0.5s ease-out;
}

.auth-container.signup-active {
    max-width: 80%;
    min-width: 80%;
    min-height: auto;
    transform: scale(1);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideIn {
    0% { transform: translateY(320px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(90px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;  /* Fixed the typo from 00% to 200% */
    height: 200%;
    background: radial-gradient(circle at center, rgba(76, 201, 240, 0.03) 0%, transparent 70%);
    animation: rotate-gradient 30s linear infinite;
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.auth-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 60%;
    color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    margin-top: 1rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.terms-checkbox input {
    margin-top: 0.3rem;
    margin-right: 0.8rem;
}

.terms-checkbox label {
    font-size: 0.95rem;
    color: var(--text-light);
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.terms-checkbox a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
/* OTP Verification Styles */
.otp-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.otp-container .form-group {
    flex: 1;
    margin-bottom: 0;
}

.btn-send-otp {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
    height: 45px;
    white-space: nowrap;
}

.btn-send-otp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.btn-send-otp:active {
    transform: translateY(-1px);
}

.btn-send-otp:disabled {
    background: linear-gradient(45deg, #d1d1d1, #c3c3c3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.otp-timer {
    font-size: 0.85rem;
    color: var(--text-light);
    /* margin-top: 0.5rem; */
    display: none;
}

.otp-timer.show {
    display: block;
}

/* Error/Success Message */
.error-message {
    color: var(--danger-color);
    background-color: rgba(230, 57, 70, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.error-message.success {
    color: var(--success-color, #28a745);
    background-color: rgba(40, 167, 69, 0.1);
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease-in forwards;
}

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

/* Forgot Password */
.forgot-password {
    text-align: right;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.forgot-password a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Auth Form Animation */
.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Button Styles */
.btn-primary {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: linear-gradient(45deg, #d1d1d1, #c3c3c3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .auth-container.signup-active{
        max-width: 100%;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-container {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    /* Mobile responsive OTP container */
    .otp-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .otp-container .form-group {
        margin-bottom: 0.5rem;
    }
    
    .btn-send-otp {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
}

/* Add this to your existing CSS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
}

#forgotPasswordForm .form-group {
    margin-bottom: 20px;
}

/* Add these styles to your existing auth.css file */

.form-group {
    position: relative;
}

.password-toggle {
    right: 10px;
    left: 90% !important;
    cursor: pointer;
    color: #666 !important;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

/* Adjust the password input padding to accommodate the eye icon */
.form-group input[type="password"] {
    padding-right: 35px;
}

/* Small mobile devices */
@media (max-width: 480px) {
    .auth-container {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }
    
    .otp-container .form-group input {
        font-size: 0.9rem;
    }
    
    .btn-send-otp {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .otp-timer {
        font-size: 0.75rem;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .auth-container.signup-active{
        max-width: 100%;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-container {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
}

/* Add these styles at the end of your existing auth.css file */

/* Login separator with OR text */
.login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.login-separator::before,
.login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.login-separator span {
    padding: 0 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Secondary button for Adventus login */
.btn-secondary {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    /* background-color: rgba(67, 97, 238, 0.05) !important; */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

/* Toggle container for CanID/Email selection */
.toggle-container {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    color: var(--text-light);
}

.toggle-option.active {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.2);
}

/* Animation for the modal */
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out forwards;
}

/* Add a subtle hover effect to the close button */
.close-modal:hover {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}