/* AEM Labs Limited - CSS Module: Authentication Modal */
/* =================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    display: flex;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.modal-close i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.modal-content {
    display: flex;
    width: 100%;
    min-height: 75vh;
}

.modal-form-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    max-height: 90vh;
}

.modal-image-section {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #6907c5, #a71c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.auth-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('/static/img/futuristic-mouse.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(105, 7, 197, 0.35), rgba(167, 28, 28, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-image-content {
    text-align: center;
    color: white;
}

.auth-image-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.auth-image-content p {
    font-size: 14px;
    margin: 0 0 30px 0;
    opacity: 0.9;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.auth-feature i {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.auth-logo-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.auth-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.auth-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease;
    pointer-events: none;
    overflow-y: auto;
    padding: 22px 30px;
    box-sizing: border-box;
}

.auth-form::-webkit-scrollbar {
    width: 5px;
}

.auth-form::-webkit-scrollbar-thumb {
    background: var(--accent-color);
}

.auth-form::-webkit-scrollbar-thumb:hover {
    background: #6907c5;
}

.auth-form.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.auth-form.slide-out-left {
    transform: translateX(-100%);
}

.auth-form.slide-out-right {
    transform: translateX(100%);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px 0;
}

.auth-header p {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.form-container {
    width: 100%;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 11px;
}

.input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #f9f9f9;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color, #6907c5);
    background: white;
    box-shadow: 0 0 0 3px rgba(105, 7, 197, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

#login-form .checkbox-container {
    padding-left: 24px;
}

#login-form .checkbox-container,
#signup-form .checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: #555;
    position: relative;
    gap: 2px;
}

#login-form .checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#login-form .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0;
}

#login-form .checkbox-container:hover .checkmark {
    border-color: var(--accent-color, #6907c5);
}

#login-form .checkbox-container input:checked~.checkmark {
    background-color: var(--accent-color, #6907c5);
    border-color: var(--accent-color, #6907c5);
}

#login-form .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#login-form .checkbox-container input:checked~.checkmark:after {
    display: block;
}

.forgot-password {
    color: var(--accent-color, #6907c5);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #a71c1c;
    text-decoration: underline;
}

.terms-link {
    color: var(--accent-color, #6907c5);
    text-decoration: none;
    font-weight: 500;
    font-size: 11px;
}

.terms-link:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(270deg, #a71c1c, #6907c5, #a71c1c, #6907c5);
    background-size: 300% 100%;
    background-position: 0% 0%;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease, background-position 0.6s ease;
    box-shadow: 0 4px 15px rgba(105, 7, 197, 0.3);
}

.auth-submit-btn:hover {
    background-position: 100% 0%;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(105, 7, 197, 0.4);
}

.auth-divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    background: white;
    color: #999;
    padding: 0 15px;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.google-auth {
    text-decoration: none;
}

.google-auth-btn {
    width: 100%;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #333;
}

.google-auth-btn:hover {
    border-color: #ccc;
    background: #f9f9f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-auth-btn i {
    color: #4285f4;
    font-size: 18px;
}

.auth-switch {
    text-align: center;
    padding-top: 12px;
}

.auth-switch p {
    color: #666;
    font-size: 12px;
    margin: 0;
}

.auth-switch a {
    color: var(--accent-color, #6907c5);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: #a71c1c;
    text-decoration: underline;
}

#forgot-password-form .auth-switch a {
    margin-top: 16px;
}


body.modal-open {
    overflow: hidden;
}

@media (max-width: 1440px) {
    .modal-container {
        max-width: 900px;
        width: 85%;
    }

    .modal-content {
        min-height: 85vh;
    }
}

@media (max-width: 992px) {
    .modal-container {
        max-width: 800px;
        width: 90%;
        max-height: 60vh;
    }

    .modal-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 60vh;
        max-height: 80vh;
    }

    .modal-image-section {
        min-height: auto;
        max-height: 80vh;
    }

    .auth-image-content h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .auth-image-content p {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .auth-features {
        gap: 16px;
    }

    .auth-feature {
        font-size: 14px;
        gap: 12px;
        text-align: left;
    }

    .auth-feature i {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .auth-submit-btn {
        padding: 10px;
        font-size: 15px;
    }

    .google-auth-btn {
        padding: 10px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
        flex-direction: column;
        max-width: 500px;
        display: flex;
    }

    .modal-content {
        flex-direction: column;
        min-height: auto;
        display: flex;
        grid-template-columns: none;
        flex: 1;
    }

    .modal-form-section {
        overflow: hidden;
        position: relative;
        flex: 1;
        min-height: 75vh;
    }

    .auth-form {
        padding: 25px 20px;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        opacity: 0;
        transform: translateX(100%);
        transition: all 0.3s ease;
        pointer-events: none;
        box-sizing: border-box;
        background: white;
    }

    .auth-form.active {
        opacity: 1;
        transform: translateX(0);
        pointer-events: all;
    }

    .auth-form.slide-out-left {
        transform: translateX(-100%);
    }

    .auth-form.slide-out-right {
        transform: translateX(100%);
    }

    .modal-image-section {
        display: none;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        max-width: 420px;
        margin: 10px;
        border-radius: 12px;
    }

    .modal-form-section {
        min-height: 80vh;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        width: 26px;
        height: 26px;
    }

    .modal-close i {
        font-size: 14px;
    }

    .auth-form {
        padding: 25px 20px;
    }

    .auth-header h2 {
        font-size: 18px;
    }

    .auth-header p {
        font-size: 11px;
    }

    .form-options {
        margin-bottom: 20px;
        gap: 12px;
    }

    .input-group input {
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 11px;
    }

    #login-form .checkbox-container {
        font-size: 11px;
        padding-left: 20px;
    }

    #signup-form .checkbox-container,
    #signup-form .terms-link {
        font-size: 11px !important;
    }

    .forgot-password {
        font-size: 11px;
    }

    .auth-submit-btn,
    .google-auth-btn {
        padding: 10px;
        font-size: 12px;
        border-radius: 10px;
    }

    .auth-divider {
        margin: 12px 0;
    }

    .terms-link {
        font-size: 11px;
    }

    #login-form .checkmark {
        height: 14px;
        width: 14px;
    }

    #login-form .checkmark:after {
        left: 3px;
        top: 0px;
        width: 4px;
        height: 7px;
    }
}