/* public/css/values-priorities-style.css */

/* ФИКС СКРОЛЛА - БЛОКИРОВКА СТРАНИЦЫ */
html, body {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'SF Pro', sans-serif;
    background-color: #f7f3ff;
    color: var(--tg-theme-text-color, #333333);
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
    touch-action: pan-y !important;
}

.values-page-container {
    /* ФИКС СКРОЛЛА - ВКЛЮЧАЕМ СКРОЛЛ КОНТЕЙНЕРА */
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    
    /* СКРЫВАЕМ ПОЛОСУ ПРОКРУТКИ */
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    max-width: 390px;
    margin: 0 auto;
    padding: var(--top-offset) 20px 95px; /* Добавил 95px для footer */
    box-sizing: border-box;
    background-color: inherit;
    padding-bottom: 110px;
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
    touch-action: pan-y !important;
}

/* СКРЫВАЕМ СКРОЛЛБАР В WEBKIT */
.values-page-container::-webkit-scrollbar {
    display: none;
}

.values-header {
    text-align: center;
    margin-bottom: 25px;
}

.values-header h1 {
    font-family: 'Soyuz Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: rgb(86, 76, 126);
    margin: 0;
}

.values-main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.values-list {
    background-image: linear-gradient(to bottom right, #ffffff, #8c52ff3d);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
}

.values-item {
    padding: 12px 0;
    border-bottom: 1px dashed rgba(86, 76, 126, 0.92);
    color: var(--tg-theme-text-color, #333333);
    text-align: center;
}

.values-item:last-child {
    border-bottom: none;
}

.value-blue {
    color: #4a90e2;
}

.value-pink {
    color: #e94e77;
}

.value-purple {
    color: #8c52ff;
}

.value-yellow {
    color: #f39c12;
}

/* Секция для авторизации */
.auth-required-container {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--tg-theme-secondary-bg-color, #FFFFFF);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 20px;
}

.auth-required-image {
    max-width: 180px;
    margin-bottom: 20px;
}

.auth-required-title {
    font-family: 'Soyuz Grotesk', sans-serif;
    font-size: 24px;
    color: rgb(86, 76, 126);
    margin-bottom: 10px;
}

.auth-required-text {
    font-family: 'SF Pro', sans-serif;
    font-size: 16px;
    color: var(--tg-theme-hint-color, #666666);
    line-height: 1.4;
}

/* Анимации */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

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

body {
    padding-bottom: 95px !important;
}

/* Масштабирование на длинных экранах */
@media (min-width: 430px) and (max-width: 500px) {
    .values-page-container {
        transform: scale(1.13) !important;
        transform-origin: top center !important; /* Масштабируем от верха */
        padding-top: calc(var(--top-offset) / 1.13) !important; /* Уменьшаем верхний отступ пропорционально */
        padding-bottom: calc(200px * 1.13) !important; /* Увеличиваем padding пропорционально */
    }
    body {
        padding-bottom: calc((95px * 1.13) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Переопределяем calc() из footer-style.css */
    html body {
        padding-bottom: calc((95px * 1.13) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Дополнительная специфичность */
    body.has-footer {
        padding-bottom: calc((95px * 1.13) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (min-width: 500px) and (max-width: 600px) {
    .values-page-container {
        transform: scale(1.2) !important;
        transform-origin: top center !important; /* Масштабируем от верха */
        padding-top: calc(var(--top-offset) / 1.2) !important; /* Уменьшаем верхний отступ пропорционально */
        padding-bottom: calc(200px * 1.2) !important; /* Увеличиваем padding пропорционально */
    }
    body {
        padding-bottom: calc((95px * 1.2) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Переопределяем calc() из footer-style.css */
    html body {
        padding-bottom: calc((95px * 1.2) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Дополнительная специфичность */
    body.has-footer {
        padding-bottom: calc((95px * 1.2) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (min-width: 600px) {
    .values-page-container {
        transform: scale(1.3) !important;
        transform-origin: top center !important; /* Масштабируем от верха */
        padding-top: calc(var(--top-offset) / 1.3) !important; /* Уменьшаем верхний отступ пропорционально */
        padding-bottom: calc(200px * 1.3) !important; /* Увеличиваем padding пропорционально */
    }
    body {
        padding-bottom: calc((95px * 1.3) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Переопределяем calc() из footer-style.css */
    html body {
        padding-bottom: calc((95px * 1.3) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Дополнительная специфичность */
    body.has-footer {
        padding-bottom: calc((95px * 1.3) + env(safe-area-inset-bottom, 0px)) !important;
    }
}