/* Auth Styles - Форма входа */
/* Стили для страницы входа в соответствии с дизайном */

/* Переменные */
:root {
    --auth-bg: #333963;
    --auth-panel-bg: #575E92;
    --auth-accent: var(--clr-accentOrange);
    --auth-text: #F8F9FE;
    --auth-text-muted: #F8F9FE;
    --auth-border: #e9ecef;
    --auth-shadow: 0 4px 20px rgba(0,0,0,0.1);
    --auth-tab: #050925;
}

/* Основной контейнер страницы */
.login-page {
    min-height: 100vh;
    background: var(--auth-bg);
    display: flex;
    flex-direction: column;
}

/* Основной контейнер с двумя панелями */
.login-container {
    flex: 1;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

/* Левая панель - бренды и изображение */
.login-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 40px 40px 40px;
    margin-top: 0;
    margin-bottom: auto;
}

.welcome-section {
    margin-bottom: 30px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--auth-text);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.3;
}

.main-logo {
    text-align: center;
    margin-bottom: 30px;
}

.ktng-logo {
    max-width: 200px;
    height: auto;
}

.brands-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.brand-row {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-width: 80px;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 1;
}

.brand-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

@media (max-width: 768px) {
    .brand-image {
        align-items: flex-start;
        margin-top: 0;
    }
}

.brand-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.desktop-image {
    display: block;
}

.mobile-image {
    display: none;
}

/* Правая панель - форма входа */
.login-right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    background: transparent;
    border-radius: 12px;
    padding: 40px 30px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-align: left;
}

/* Табы переключения */
.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--auth-border);
}

.login-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--auth-tab);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab.active {
    background: var(--auth-accent);
    color: white;
}

.login-tab:hover:not(.active) {
    background: rgba(0,0,0,0.05);
}

/* Контент табов */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.login-instruction {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Форма входа */
.login-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: none; /* Скрываем лейблы, так как они теперь внутри полей */
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--auth-panel-bg);
    color: var(--auth-text);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.form-control::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}

/* Контейнер с лейблом внутри поля */
.input-with-label {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--auth-panel-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.input-with-label .field-label {
    position: absolute;
    left: 16px;
    color: var(--auth-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.input-with-label .form-control {
    width: 100%;
    padding: 12px 16px 12px 80px; /* Отступ слева для лейбла */
    border: none;
    background: transparent;
    color: var(--auth-text);
    font-size: 1rem;
    box-shadow: none;
}

.input-with-label .form-control:focus {
    outline: none;
    box-shadow: none;
}

.input-with-label .form-control::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}

/* Специальные стили для поля пароля */
.input-with-label .password-input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-with-label .password-input-group .form-control {
    padding-right: 50px; /* Отступ справа для иконки глаза */
}

.input-with-label .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.input-with-label .password-toggle:hover {
    color: var(--auth-accent);
}

/* Дополнительные стили для password-toggle (если используется вне input-with-label) */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--auth-accent);
}

/* Кнопка входа */
.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--auth-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #e04a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 90, 34, 0.3);
}

/* Ссылки под формой */
.login-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.login-link {
    color: var(--auth-text);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: var(--auth-accent);
}

/* Заглушка для Telegram */
.telegram-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--auth-text-muted);
}

.telegram-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Уведомления */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Футер с предупреждениями */
.login-footer {
    background: var(--auth-panel-bg);
    padding: 30px 40px;
    text-align: center;
    border-top: 1px solid var(--auth-border);
}

.warning-section {
    margin-bottom: 20px;
}

.smoking-warning {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.age-restriction {
    margin-bottom: 20px;
}

.age-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--auth-text);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: 700;
    font-size: 0.9rem;
}

.legal-text {
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    line-height: 1.4;
}

.legal-text p {
    margin-bottom: 8px;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-link {
    color: var(--auth-text);
    text-decoration: underline;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: var(--auth-accent);
}

/* Стили для страницы регистрации */
.register-buttons {
    margin-bottom: 25px;
}

.register-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.telegram-btn {
    background: #f8f9fa;
    color: #212529;
    border: none;
}

.telegram-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.telegram-btn i {
    color: var(--auth-accent);
}

.email-btn {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

.email-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.email-btn i {
    color: var(--auth-accent);
}

.register-divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

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

.register-divider span {
    background: var(--auth-bg);
    color: #dee2e6;
    padding: 0 15px;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.email-register-form {
    margin-top: 20px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group .form-check-input {
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group .form-check-label {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.back-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 20px;
    border-radius: 16px;
    width: 100%;
    margin-top: 20px;
    display: block;
    text-align: center;
    font-weight: 500;
}

.back-btn:hover {
    background: #495057;
    color: white;
    border-color: white;
}

/* Стили для страницы agegate */
.agegate-container {
    width: 100%;
    max-width: 400px;
    background: transparent;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
}

.agegate-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.4;
}

.agegate-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agegate-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.confirm-btn {
    background: var(--auth-accent);
    color: white;
}

.confirm-btn:hover {
    background: #e04a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 90, 34, 0.3);
}

.deny-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.deny-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Мобильная версия agegate */
.mobile-agegate-section {
    display: none;
    background: #3C4060;
    min-height: 100vh;
    padding: 0;
}

/* Скрываем мобильную версию agegate на десктопе */
@media (min-width: 769px) {
    .mobile-agegate-section {
        display: none !important;
    }
}

.mobile-branding-container {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.mobile-badge-image {
    max-width: 100%;
    height: auto;
    width: 100%;
    margin-top: 0;
    align-self: flex-start;
    display: block;
}

.mobile-agegate-buttons {
    padding: 30px 20px;
    text-align: left;
}

.mobile-agegate-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: white;
    margin-bottom: 30px;
    text-align: left;
    line-height: 1.4;
}

.mobile-agegate-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-agegate-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.mobile-confirm-btn {
    background: #F26522;
    color: white;
}

.mobile-confirm-btn:hover {
    background: #e04a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 90, 34, 0.3);
}

.mobile-deny-btn {
    background: #E8E8E8;
    color: #333;
    border: none;
}

.mobile-deny-btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Предупреждение о курении */
.mobile-smoking-warning {
    padding: 30px 20px;
    text-align: center;
}

.mobile-warning-text {
    font-size: 2rem;
    font-weight: 300;
    color: white;
    letter-spacing: 2px;
    line-height: 1.2;
}

/* Футер с правовой информацией */
.mobile-legal-footer {
    background: white;
    padding: 30px 20px;
    text-align: center;
}

.mobile-age-icon {
    width: 50px;
    height: 50px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

.mobile-legal-text {
    margin-bottom: 20px;
}

.mobile-legal-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.mobile-legal-text p {
    font-size: 0.8rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
    text-align: left;
}

.mobile-legal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-legal-link {
    color: #333;
    text-decoration: underline;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.mobile-legal-link:hover {
    color: var(--auth-accent);
}

/* Адаптивность */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
        display: flex;
    }
    
    .login-left-panel {
        display: none;
    }
    
    .login-right-panel {
        flex: 1;
        border-left: none;
        padding: 30px 20px;
        display: flex;
    }
    
    .login-form-container {
        max-width: 90%;
    }
    
    .login-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .login-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .login-footer {
        padding: 20px;
    }
    
    .smoking-warning {
        font-size: 1.5rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .desktop-image {
        display: none;
    }
    
    .mobile-image {
        display: block;
    }
    
    /* Показываем мобильную версию agegate */
    .mobile-agegate-section {
        display: flex;
        flex-direction: column;
    }
    
    /* Скрываем десктопную версию agegate */
    .agegate-container {
        display: none;
    }

    .footer__copyright {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-right-panel {
        padding: 20px 15px;
    }
    
    .login-form-container {
        max-width: 100%;
    }
    
    .login-title {
        font-size: 1.6rem;
    }
    
    .brand-row {
        gap: 15px;
    }
    
    .brand-logo {
        max-width: 60px;
    }
}

/* Telegram авторизация */
.telegram-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.telegram-login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #0088cc, #006699);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    min-width: 250px;
    justify-content: center;
}

.telegram-login-btn:hover {
    background: linear-gradient(135deg, #006699, #004466);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.telegram-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.telegram-login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.telegram-login-btn i {
    font-size: 1.3rem;
}

.telegram-info {
    text-align: center;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.telegram-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.telegram-info i {
    color: var(--auth-accent);
    font-size: 1rem;
}

/* Адаптивность для Telegram кнопки */
@media (max-width: 768px) {
    .telegram-login-btn {
        min-width: 200px;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .telegram-info {
        font-size: 0.8rem;
    }
}