/* ================================================
   MODERN AUTH MODALS - LOGIN, SIGNUP, FORGOT PASSWORD
   ================================================ */

/* Modal Base Styles */
#login-modal .modal-dialog,
#signup-modal .modal-dialog {
    max-width: 450px;
}

#login-modal .modal-content,
#signup-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* Modal Header */
#login-modal .modal-header,
#signup-modal .modal-header {
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color1));
    border: none;
    padding: 30px;
    position: relative;
}

#login-modal .modal-header .titleModal,
#signup-modal .modal-header .modal-title {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

#login-modal .modal-header .contentText,
#signup-modal .modal-header .text-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

#login-modal .modal-header .btn-close,
#signup-modal .modal-header .btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    opacity: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    font-size: 18px;
}

#login-modal .modal-header .btn-close:hover,
#signup-modal .modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#login-modal .modal-header .btn-close i,
#signup-modal .modal-header .btn-close i {
    color: #fff;
    font-size: 18px;
}

/* Modal Body */
#login-modal .modal-body,
#signup-modal .modal-body {
    padding: 40px 30px;
    background: #fff;
}

.log-in-section,
.log-in-box {
    padding: 0;
    margin: 0;
    background: transparent;
}

/* Form Inputs */
.theme-form-floating {
    position: relative;
    margin-bottom: 20px;
}

.theme-form-floating .form-control {
    height: 54px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 16px 20px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-form-floating .form-control:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.theme-form-floating .form-control:focus {
    border-color: var(--theme-color);
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(var(--theme-color-rgb, 0, 123, 255), 0.12);
    outline: none;
}

.theme-form-floating label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    padding: 0 20px;
    background: transparent;
    transition: all 0.3s;
}

.theme-form-floating .form-control:focus ~ label,
.theme-form-floating .form-control:not(:placeholder-shown) ~ label {
    color: var(--theme-color);
    font-size: 12px;
}

/* Password Toggle Icon */
.password-toggle-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 16px;
    transition: color 0.2s;
    z-index: 10;
}

.password-toggle-icon:hover {
    color: var(--theme-color);
}

/* Error Messages */
.text-danger {
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

.login_err,
.email_err,
.password_err,
.otp_err {
    display: block;
    padding: 12px 16px;
    background: #fff5f5;
    border-left: 3px solid #dc3545;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Submit Buttons */
.btn-animation {
    height: 54px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color1));
    border: none;
    color: #fff;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-animation:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--theme-color1), var(--theme-color));
}

.btn-animation:active {
    transform: translateY(0);
}

.loaderMargin {
    margin-left: 8px;
}

/* Forgot Password Link */
.forgot-box {
    text-align: right;
    margin-bottom: 8px;
}

.forgot-password {
    color: var(--theme-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--theme-color1);
    text-decoration: underline;
}

/* Sign Up Box */
.sign-up-box {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e8e8e8;
}

.sign-up-box h4 {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin-bottom: 12px;
}

.sign-up-box a {
    color: var(--theme-color);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.sign-up-box a:hover {
    color: var(--theme-color1);
    text-decoration: underline;
}

/* Input Box Spacing */
.input-box .row {
    margin: 0;
}

.input-box .col-12 {
    padding: 0;
}

/* Remove Default Bootstrap Margins */
.log-in-form {
    margin-bottom: 0;
}

/* Loader Styles */
.label_loader {
    display: none;
    margin-left: 10px;
}

/* OTP Input Specific */
#forgetOtpCode {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 4px;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    #login-modal .modal-dialog,
    #signup-modal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    #login-modal .modal-header,
    #signup-modal .modal-header {
        padding: 25px 20px;
    }

    #login-modal .modal-header .titleModal,
    #signup-modal .modal-header .modal-title {
        font-size: 22px;
    }

    #login-modal .modal-body,
    #signup-modal .modal-body {
        padding: 30px 20px;
    }

    .btn-animation {
        height: 50px;
        font-size: 15px;
    }

    .theme-form-floating .form-control {
        height: 50px;
        font-size: 14px;
    }
}

/* Animation for Modal */
#login-modal.fade .modal-dialog,
#signup-modal.fade .modal-dialog {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease-out;
}

#login-modal.show .modal-dialog,
#signup-modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Focus States */
.form-control:focus {
    box-shadow: none;
}

/* Custom Styling for Number Input (OTP) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}
