/* surveys.css */
.survey-progress {
    background: var(--light);
    padding: 0 20px 12px;
    flex-shrink: 0;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 8.33%;
}

.survey-container {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.survey-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

/* Quick Survey specific styles */
#quick-survey .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

#quick-survey .survey-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.survey-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 32px 100px;
    z-index: 1;
    overflow-y: hidden;
    overflow-x: hidden;
}

.survey-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 10;
}

.question-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px 0;
    text-align: center;
}

.question-subtitle {
    font-size: 13px;
    color: var(--gray);
    text-align: center;
    margin-bottom: 20px;
}

.survey-input {
    width: calc(100% - 32px);
    padding: 14px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 16px;
    font-size: 16px;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
    box-sizing: border-box;
    margin: 24px 16px 0;
}

.survey-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 16px;
}

.choice-grid.vertical {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 16px;
}

.choice-card {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.choice-card.horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
}

.choice-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.choice-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    animation: cardSelect 0.3s ease-out;
}

.choice-card.selected::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 10px;
    background: var(--primary);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.choice-icon {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
}

.choice-icon svg {
    color: var(--primary);
}

.choice-card.horizontal .choice-icon {
    font-size: 22px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.choice-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}

.choice-card.compact .choice-text {
    font-size: 12px;
    padding: 2px;
    min-height: 32px;
}

.choice-card.compact {
    padding: 10px 8px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-content {
    flex: 1;
}

.number-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: var(--white);
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.number-display {
    text-align: center;
    min-width: 100px;
}

.number-display span:first-child {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.number-unit {
    font-size: 13px;
    color: var(--gray);
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 16px;
}

.day-card {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.day-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.day-card.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    animation: daySelect 0.4s ease-out;
}

.day-short {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.day-full {
    font-size: 9px;
    opacity: 0.8;
}

#target-weight-input {
    margin: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
    border: 2px dashed var(--gray-light);
    transition: var(--transition);
}

#target-weight-input.show {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Отступ для текста под кнопкой назад в анкетах */
#quick-survey .welcome-text {
    margin-top: 20px;
}

#quick-survey .subtitle {
    margin-top: 8px;
}

/* =============== СЛАЙДЕРЫ ДЛЯ БЫСТРОЙ АНКЕТЫ =============== */

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    width: 100%;
}

.age-slider, .height-slider, .weight-slider, .slider {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

.slider-wrapper {
    width: 100%;
    position: relative;
    padding: 0 20px;
}

.slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-top: 8px;
    padding: 0 10px;
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.slider-value-with-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    margin-bottom: 16px;
}

.slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.slider-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}

.slider-btn:active {
    transform: scale(0.95);
}

.age-slider::-webkit-slider-thumb,
.height-slider::-webkit-slider-thumb,
.weight-slider::-webkit-slider-thumb,
.slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.age-slider::-webkit-slider-thumb:hover,
.height-slider::-webkit-slider-thumb:hover,
.weight-slider::-webkit-slider-thumb:hover,
.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.age-slider::-moz-range-thumb,
.height-slider::-moz-range-thumb,
.weight-slider::-moz-range-thumb,
.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-value {
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    padding: 12px 20px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    min-width: 100px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* =============== НАВИГАЦИЯ В СЛАЙДАХ =============== */

/* Компактная навигация */
.slide-navigation-compact {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dashboard);
    border-top: 1px solid var(--gray-light);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.nav-btn-compact {
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    flex: 1;
    max-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-btn-compact.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.nav-btn-compact.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}

.nav-btn-compact.primary:disabled {
    background: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
    box-shadow: none;
}

.nav-btn-compact.secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn-compact.secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--gray-light);
}



/* Добавляем отступ снизу для основного контента быстрой анкеты */
#quick-survey .main-content {
    padding-bottom: 70px; /* Уменьшен отступ для лучшего использования пространства */
    flex: 1;
    overflow-y: auto; /* Включаем прокрутку для анкеты */
    max-height: calc(100vh - 120px); /* Оптимизированная высота */
    max-height: calc(100dvh - 120px);
    padding-top: 16px; /* Увеличен верхний отступ для баланса */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

#quick-survey .main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#quick-survey {
    background: var(--bg-dashboard) !important;
}

#health-restrictions-survey {
    background: var(--bg-dashboard) !important;
}

/* =============== ЭКРАН БЫСТРОЙ АНКЕТЫ =============== */

#quick-survey {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

#quick-survey .header {
    flex-shrink: 0;
    padding-bottom: 12px;
}

/* Компактная строка заголовка */
.quick-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quick-header-row .welcome-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.quick-header-row .subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Компактный прогресс-бар */
.progress-bar-compact {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 -20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
    border-radius: 2px;
    transition: width 0.3s ease;
}

#quick-survey .survey-container {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: none;
}

#quick-survey .survey-content {
    flex: 1;
}

#quick-survey .quick-slide {
    padding: 0;
    min-height: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#quick-survey .question-title {
    font-size: 26px;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.2;
}

#quick-survey .question-subtitle {
    font-size: 16px;
    color: var(--gray);
    margin-bottom: 32px;
    text-align: center;
}

/* =============== СТИЛИ ДЛЯ РАСШИРЕННОЙ АНКЕТЫ ТРЕНИРОВОК =============== */

/* Стили для слайдера целевого веса */
.number-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary);
    background: transparent;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background: var(--primary);
    color: white;
}

.number-display {
    text-align: center;
    gap: 8px;
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
}

.number-display .unit {
    font-size: 18px;
    color: var(--gray);
    font-weight: normal;
}

/* Стили для контейнера дней недели */
.days-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px auto;
    max-width: 320px;
    align-items: center;
}

.days-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.days-row-bottom {
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.day-card {
    aspect-ratio: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    border-radius: 16px;
    padding: 16px;
    min-height: 60px;
    width: 60px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Стили для описаний в карточках выбора */
.choice-desc {
    font-size: 12px;
    color: var(--dark);
    margin-top: 4px;
    line-height: 1.3;
}

.choice-card.selected .choice-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Вертикальное расположение карточек для некоторых вопросов */
.choice-grid.vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.choice-grid.vertical .choice-card {
    width: 100%;
    padding: 16px;
    text-align: left;
}

/* Компактные варианты в анкете по здоровью */
.health-slide .choice-card {
    padding: 12px 16px;
    min-height: auto;
}

.health-slide .choice-text {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
}

/* Сетка вариантов для анкеты по здоровью */
.health-choices-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.health-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.health-row-center {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.health-row-center .choice-card {
    max-width: 200px;
    width: 100%;
}

/* Сетка вариантов для анкеты по питанию */
.nutrition-choices-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nutrition-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nutrition-row-center {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.nutrition-row-center .choice-card {
    max-width: 200px;
    width: 100%;
}

/* Компактные варианты в анкете по питанию */
.nutrition-slide .choice-card {
    padding: 12px 16px;
    min-height: auto;
}

.nutrition-slide .choice-text {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
}

/* Сетка нелюбимых продуктов */
.disliked-foods-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.disliked-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.disliked-row .choice-card {
    padding: 10px 12px;
    min-height: auto;
    font-size: 14px;
}
