/* ESC Login Modal - Pixel Perfect из Figma */
/* Основано на дизайне из Disign/login_form.tpl */

/* Google Fonts для Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* Скрываем мобильные элементы по умолчанию */
.login-modal__mobile-title,
.login-modal__close-mobile,
.login-modal__mobile-icon,
.login-modal__mobile-text,
.login-modal-mobile-register {
    display: none;
}

/* Overlay */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.login-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.login-modal {
    position: relative;
    width: 540px;
    height: 620px;
    background: #0FC998;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close button - x=484, y=24 */
.login-modal__close {
    position: absolute;
    top: 24px;
    right: 27px;
    width: 29px;
    height: 29px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
    transition: transform 0.2s;
}

.login-modal__close:hover {
    transform: scale(1.1);
}

.login-modal__close svg {
    display: block;
}

/* Logo - x=214, y=92, 112×137 */
.login-modal__logo {
    position: absolute;
    top: 92px;
    left: 214px;
    width: 112px;
    height: 137px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal__logo img {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
}

/* Form */
.login-modal__form {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Input fields */
.login-modal__input {
    position: absolute;
    width: 320px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 20px !important;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #0FC998;
    letter-spacing: -0.03em;
    box-sizing: border-box;
    transition: all 0.2s;
}

.login-modal__input::placeholder {
    color: #0FC998 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.login-modal__input::-webkit-input-placeholder {
    color: #0FC998 !important;
    font-weight: 600 !important;
}

.login-modal__input::-moz-placeholder {
    color: #0FC998 !important;
    font-weight: 600 !important;
}

.login-modal__input:focus {
    outline: none !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

/* Email - x=110, y=328 */
.login-modal__input[type="email"] {
    top: 328px;
    left: 110px;
}

/* Password - x=110, y=385 */
.login-modal__input[type="password"] {
    top: 385px;
    left: 110px;
}

/* Error message */
.login-modal__error {
    position: absolute;
    top: 430px;
    left: 110px;
    width: 320px;
    text-align: center;
}

.login-modal__error span {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter';
}

.login-modal__success {
    position: absolute;
    top: 430px;
    left: 110px;
    width: 320px;
    text-align: center;
}

.login-modal__success span {
    color: #0fc998;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter';
}

/* Links - x=134, y=427, 296×43 */
.login-modal__links {
    position: absolute;
    top: 427px;
    left: 134px;
    width: 296px;
    height: 43px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal__link {
    font-family: 'Inter';
    font-weight: 600;
    font-size: 11px;
    line-height: 36px;
    color: #FFFFFF !important;
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: opacity 0.2s;
}

.login-modal__link:last-child {
    font-weight: 400;
}

.login-modal__link:hover {
    opacity: 0.8;
}

/* Submit button - x=110, y=472, 320×40 */
.login-modal__submit {
    position: absolute;
    top: 472px;
    left: 110px;
    width: 320px;
    height: 40px;
    background: #5C6063;
    border: none;
    border-radius: 48px;
    font-family: 'Inter';
    font-weight: 600;
    font-size: 16px;
    line-height: 40px;
    color: #FFFFFF;
    cursor: pointer;
    letter-spacing: -0.03em;
    transition: background 0.2s;
}

.login-modal__submit:hover {
    background: #4a4d50;
}

.login-modal__submit:active {
    background: #3d4043;
}

/* Remember me - x=134, y=541, 212×16 */
.login-modal__remember {
    position: absolute;
    top: 541px;
    left: 134px;
    width: 212px;
    height: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-modal__checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #FFFFFF;
    border-radius: 3px;
    flex-shrink: 0;
    background: transparent;
    position: relative;
}

.login-modal__checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
}

.login-modal__remember-label {
    font-family: 'Inter';
    font-size: 11px;
    line-height: 36px;
    color: #FFFFFF;
    cursor: pointer;
    letter-spacing: -0.03em;
    user-select: none;
}

/* Responsive */
@media (max-width: 600px) {
    .login-modal {
        width: 90%;
        max-width: 540px;
        height: auto;
        min-height: 620px;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .login-modal__close {
        top: 10px;
        right: 10px;
    }
    
    .login-modal__logo {
        position: relative;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 40px;
    }
    
    .login-modal__input[type="email"],
    .login-modal__input[type="password"],
    .login-modal__submit {
        position: relative;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        margin: 10px 0;
        display: block;
    }
    
    .login-modal__input[type="email"] {
        margin-top: 20px;
    }
    
    .login-modal__links,
    .login-modal__remember,
    .login-modal__error {
        position: relative;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        margin: 10px 0;
    }
}



