/* Стили для модального окна авторизации/регистрации */

.template-modal-auth .module-component-widget-auth .box {
    background-color: var(--white);
    border-radius: var(--radius-20);
    padding: calc(60 * var(--rpx)) calc(72 * var(--rpx));
    max-width: 600px;
    width: 100%;
}

.template-modal-auth .module-component-widget-auth .box .top {
    position: relative;
}

.template-modal-auth .module-component-widget-auth .box .close {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-modal-auth .module-component-widget-auth .box .close svg {
    width: 24px;
    height: 24px;
}

/* Заголовок с переключением */
.template-modal-auth .module-component-widget-auth .box .auth-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.template-modal-auth .module-component-widget-auth .box .register-text {
    color: #0056FB;
}

.template-modal-auth .module-component-widget-auth .box .separator {
    color: #999;
    margin: 0 8px;
}

.template-modal-auth .module-component-widget-auth .box .login-text {
    color: #999;
    transition: color 0.3s ease;
}

.template-modal-auth .module-component-widget-auth .box .login-text.active {
    color: #0056FB;
}

.template-modal-auth .module-component-widget-auth .box .register-text.active {
    color: #0056FB;
}

.template-modal-auth .module-component-widget-auth .box .register-text:not(.active) {
    color: #999;
}

/* Формы */
.template-modal-auth .module-component-widget-auth .box .forms {
    position: relative;
}

.template-modal-auth .module-component-widget-auth .box [type="register"],
.template-modal-auth .module-component-widget-auth .box [type="login"],
.template-modal-auth .module-component-widget-auth .box [type="register"]:not([active]),
.template-modal-widget-auth .module-component-widget-auth .box [type="login"]:not([active]) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-120%);
    transition: var(--transition-medium);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.template-modal-auth .module-component-widget-auth .box [type="register"][active],
.template-modal-auth .module-component-widget-auth .box [type="login"][active] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    position: relative;
}

/* Поля формы */
.template-modal-auth .module-component-widget-auth .box input[type="text"],
.template-modal-auth .module-component-widget-auth .box input[type="email"],
.template-modal-auth .module-component-widget-auth .box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.template-modal-auth .module-component-widget-auth .box input[type="text"]:focus,
.template-modal-auth .module-component-widget-auth .box input[type="email"]:focus,
.template-modal-auth .module-component-widget-auth .box input[type="password"]:focus {
    outline: none;
    border-color: #0056FB;
}

.template-modal-auth .module-component-widget-auth .box label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Кнопка загрузки файла */
.template-modal-auth .module-component-widget-auth .box .btn.file {
    background-color: #0056FB;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.template-modal-auth .module-component-widget-auth .box .btn.file:hover {
    background-color: #0041CC;
}

/* Кнопка отправки */
.template-modal-auth .module-component-widget-auth .box .btn.fill.red {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.template-modal-auth .module-component-widget-auth .box .btn.fill.red:hover {
    background: linear-gradient(135deg, #FF5252, #FF7979);
    transform: translateY(-2px);
}

/* Чекбокс */
.template-modal-auth .module-component-widget-auth .box .checkbox {
    cursor: pointer;
    font-weight: normal;
}

.template-modal-auth .module-component-widget-auth .box .checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

/* Переключатель форм */
.template-modal-auth .module-component-widget-auth .box .auth-switcher {
    text-align: center;
    margin-top: 20px;
}

.template-modal-auth .module-component-widget-auth .box .auth-switcher button {
    background: none;
    border: none;
    color: #0056FB;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.template-modal-auth .module-component-widget-auth .box .auth-switcher button:hover {
    color: #0041CC;
}

/* Адаптивность */
@media (max-width: 1023px) {
    .template-modal-auth .module-component-widget-auth .box {
        padding: 40px 20px;
        margin: 20px;
        max-width: none;
    }
    
    .template-modal-auth .module-component-widget-auth .box .auth-title {
        font-size: 24px;
    }
    
    .template-modal-auth .module-component-widget-auth .box .grid {
        grid-template-columns: 1fr !important;
    }
    
    .template-modal-auth .module-component-widget-auth .box .col-span-2 {
        grid-column: 1 !important;
    }
}

@media (max-width: 768px) {
    .template-modal-auth .module-component-widget-auth .box {
        padding: 30px 15px;
        margin: 10px;
    }
    
    .template-modal-auth .module-component-widget-auth .box .auth-title {
        font-size: 20px;
    }
    
    .template-modal-auth .module-component-widget-auth .box input[type="text"],
    .template-modal-auth .module-component-widget-auth .box input[type="email"],
    .template-modal-auth .module-component-widget-auth .box input[type="password"] {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}
