/* Login Modal Styles */

/* Modal Dialog Width */
.modal-dialog.modal-login {
    max-width: 520px;
}

/* Modal Wrapper */
.modal-login .modal-wrapper {
    position: relative;
    width: 100%;
    padding-top: 40px;
    background: #ffffff;
    border-radius: 5px;
}

/* Modal Close Button - Match Edumall */
.modal-close {
    position: absolute;
    top: 0px;
    right: 0;
    padding: 0;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    font-size: 20px;
    color: #c1c1c1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #266DD3;
}

/* Modal Header - Match Edumall */
.modal-header {
    flex-direction: column;
    text-align: center;
    margin: 0 0 19px;
    padding: 0 40px;
    border-bottom: 0;
}

.modal-title {
    font-size: 32px;
    line-height: 1.5;
    margin: 0 0 8px;
    font-weight: 700;
    color: #252525;
}

.modal-description {
    color: #696969;
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Modal Body */
.modal-body {
    padding: 0 40px 40px;
}

/* Modal Content Wrapper */
.modal-content {
    padding: 21px 30px 30px;
    background: transparent;
    border: 0;
}

@media only screen and (max-width: 575px) {
    .modal-title {
        font-size: 24px;
    }

    .modal-content {
        padding: 21px 20px 20px;
    }

    .modal-header {
        padding: 0 20px;
    }

    .modal-body {
        padding: 0 20px 30px;
    }
}

/* Login Tabs */
.login-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.login-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    background: transparent;
    margin-bottom: -2px;
}

.login-tabs .nav-link:hover {
    color: #266DD3;
    border-bottom-color: rgba(38, 109, 211, 0.3);
}

.login-tabs .nav-link.active {
    color: #266DD3;
    border-bottom-color: #266DD3;
    background: transparent;
}

.login-tabs .nav-link i {
    margin-right: 5px;
}

/* Tab Content */
.login-tab-content {
    padding-top: 20px;
}

/* Modal Form - Match Edumall */
.modal-form + .modal-form {
    margin-top: 25px;
}

.modal-form {
    margin-bottom: 0;
}

.modal-form .form-label {
    font-weight: 500;
    color: #252525;
    margin-bottom: 10px;
    font-size: 15px;
    display: block;
}

.modal-form .form-control {
    padding: 0 20px;
    height: 50px;
    border: 1px solid #d9dee3;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    color: #252525;
    background-color: #f9f9fb;
}

.modal-form .form-control:focus {
    border-color: #266DD3;
    box-shadow: none;
    outline: none;
    background-color: #ffffff;
}

.modal-form .form-control.is-invalid {
    border-color: #dc3545;
}

.modal-form .invalid-feedback {
    font-size: 13px;
    margin-top: 8px;
    color: #dc3545;
}

/* Form Check */
.modal-form .form-check {
    padding-left: 25px;
}

.modal-form .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0.15em;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.modal-form .form-check-input:checked {
    background-color: #266DD3;
    border-color: #266DD3;
}

.modal-form .form-check-label {
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    margin-left: 5px;
}

/* Modal Form Link - Match Edumall */
.modal-form__link {
    position: relative;
    color: #252525;
    white-space: nowrap;
    font-size: 14px;
    text-decoration: none;
}

.modal-form__link::after,
.modal-form__link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e7e7e7;
    transform-origin: right;
    transform: scaleX(1) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
}

.modal-form__link::after {
    background-color: #266DD3;
    transform-origin: left;
    transform: scaleX(0) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-form__link:hover {
    color: #252525;
}

.modal-form__link:hover::before {
    transform: scaleX(0) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-form__link:hover::after {
    transform: scaleX(1) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
}

/* Buttons - Match Edumall */
.modal-form .btn {
    padding: 0 28px;
    height: 50px;
    line-height: 50px;
    font-weight: 700;
    font-size: 15px;
    border-radius: 5px;
    transition: all 0.3s;
    border: 0;
}

.modal-form .btn-primary {
    background-color: #266DD3;
    color: #FFFFFF;
}

.modal-form .btn-primary:focus,
.modal-form .btn-primary:active,
.modal-form .btn-primary:hover:not(:disabled) {
    background-color: #FF5500;
    color: #FFFFFF;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.modal-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Code Input Styling */
.code-input-wrapper {
    margin-bottom: 20px;
}

.code-inputs {
    gap: 8px;
    flex-wrap: wrap;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.code-input:focus {
    border-color: #266DD3;
    box-shadow: 0 0 0 0.2rem rgba(38, 109, 211, 0.15);
    outline: none;
}

.code-input.filled {
    border-color: #266DD3;
    background: #f0f5ff;
}

/* Social Login Buttons */
.modal-social-option {
    margin-top: 30px;
}

.modal-social-option > p {
    text-align: center;
    color: #696969;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
    line-height: 1.7;
}

.modal-social-option > p::before,
.modal-social-option > p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 36%;
    height: 1px;
    background: #d9dee3;
}

.modal-social-option > p::before {
    left: 0;
}

.modal-social-option > p::after {
    right: 0;
}

.modal-social-btn {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.modal-social-btn li {
    margin: 0;
    flex: 1;
}

.modal-social-btn .btn {
    padding: 0;
    height: 50px;
    line-height: 50px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s;
    border: 1px solid;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    width: 100%;
}

.modal-social-btn .btn i {
    margin-right: 8px;
    font-size: 16px;
}

.modal-social-btn .btn.google {
    background: #de5246;
    border-color: #de5246;
    color: #ffffff;
}

.modal-social-btn .btn.google i {
    color: #FF5500;
}

.modal-social-btn .btn.google:hover {
    background: #c4402f;
    border-color: #c4402f;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.modal-social-btn .btn.facebook {
    background: #4267b2;
    border-color: #4267b2;
    color: #ffffff;
}

.modal-social-btn .btn.facebook:hover {
    background: #365899;
    border-color: #365899;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

@media only screen and (max-width: 575px) {
    .modal-social-btn {
        flex-direction: column;
    }

    .modal-social-option > p::before,
    .modal-social-option > p::after {
        width: 30%;
    }
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Responsive Design */
@media only screen and (max-width: 767px) {
    .modal-dialog.modal-login {
        max-width: 95%;
        margin: 1rem auto;
    }

    .login-tabs .nav-link {
        padding: 10px 12px;
        font-size: 12px;
    }

    .login-tabs .nav-link i {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .code-input {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }
}

@media only screen and (max-width: 575px) {
    .login-tabs .nav-link {
        padding: 8px 6px;
        font-size: 11px;
    }

    .code-inputs {
        gap: 6px;
    }

    .code-input {
        width: 40px;
        height: 50px;
        font-size: 18px;
    }
}

/* Header User Button Styling - Match Edumall */
.header-user__login {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    position: relative;
    border: 0;
    padding: 0;
    background: none;
    white-space: nowrap;
    cursor: pointer;
}

.header-user__login::before {
    content: "";
    position: absolute;
    right: 0;
    height: 1px;
    background: #ddd;
    bottom: 0;
    width: 0;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.header-user__login:hover {
    color: #266DD3;
}

.header-user__login:hover::before {
    width: 100%;
    left: 0;
    right: auto;
    background: #266DD3;
}

.offcanvas-user__login {
    width: 100%;
}

/* Bootstrap Modal Backdrop */
.modal-backdrop.show {
    opacity: 0.5;
}

/* Ensure proper modal alignment */
.modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
}
