/* Login Modal Styles */

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

.modal-header .modal-title {
    color: white;
    font-weight: 700;
}

.modal-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='m.235 1.027 1.027-.235 6.738 6.738 6.738-6.738 1.027.235-6.738 6.738 6.738 6.738-1.027.235L8 8.265l-6.738 6.738-1.027-.235L6.973 8 .235 1.262z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    opacity: 0.9;
    filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .btn-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='m.235 1.027 1.027-.235 6.738 6.738 6.738-6.738 1.027.235-6.738 6.738 6.738 6.738-1.027.235L8 8.265l-6.738 6.738-1.027-.235L6.973 8 .235 1.262z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.modal-body {
    padding: 2rem;
}

/* Login Tabs */
.nav-pills .nav-link {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--secondary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 0 2px;
}

.nav-pills .nav-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-pills .nav-link.active {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group-text {
    background: var(--light);
    border: 2px solid var(--border);
    border-right: none;
    color: var(--secondary);
    font-weight: 500;
}

.input-group .form-control {
    /* border-left: none; */
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.input-group:focus-within .form-control {
    border-color: var(--primary);
}

/* Button Styles */
.btn-gradient {
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: white;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-google {
    background: white;
    border: 2px solid #db4437;
    color: #db4437;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #db4437;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(219, 68, 55, 0.3);
}

/* Toggle Password Button */
.btn-outline-secondary {
    border-color: var(--border);
    color: var(--secondary);
    /* border-left: none; */
}

.btn-outline-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Form Check */
.form-check-input {
    border: 2px solid var(--border);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--dark);
    font-weight: 500;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider-text {
    background: white;
    padding: 0 1rem;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Country Code Select */
.form-select {
    border: 2px solid var(--border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    background: var(--light);
    color: var(--dark);
    font-weight: 500;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: none;
}

/* OTP Section */
#otpSection.show,
#emailOtpSection.show {
    animation: slideDown 0.3s ease;
}

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

/* OTP Input Boxes */
.otp-input-container {
    max-width: 300px;
    margin: 0 auto;
}

.otp-digit,
.mobile-otp-digit {
    width: 45px;
    height: 50px;
    font-size: 1.25rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.otp-digit:focus,
.mobile-otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
    background: rgba(99, 102, 241, 0.02);
}

.otp-digit.filled,
.mobile-otp-digit.filled {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
    color: var(--success);
}

.otp-digit.error,
.mobile-otp-digit.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* OTP Section Icons */
.fa-envelope-open,
.fa-mobile-alt {
    color: var(--primary);
    opacity: 0.8;
}

/* Hide/Show Sections */
.section-hidden {
    display: none !important;
}

.section-visible {
    display: block !important;
}

/* Links */
.btn-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success State */
.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.valid-feedback {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .nav-pills .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.65rem 1rem;
    }
}
