/* ============================================================
   Toss Ticket — общие стили (подключается на всех страницах)
   ============================================================ */

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* Стеклянные панели */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Градиентный фон страницы входа */
.bg-gradient-mesh {
    background:
        radial-gradient(at 0% 0%, #dae2ff 0%, transparent 50%),
        radial-gradient(at 100% 0%, #adecff 0%, transparent 50%),
        radial-gradient(at 100% 100%, #dae2ff 0%, transparent 50%),
        radial-gradient(at 0% 100%, #edeef0 0%, transparent 50%);
    background-color: #f8f9fb;
}

/* Перфорация билета */
.ticket-divider {
    background-image: linear-gradient(to right, #c3c6d6 50%, transparent 50%);
    background-size: 8px 1px;
    background-repeat: repeat-x;
    height: 1px;
}
.ticket-dashed {
    background-image: linear-gradient(to right, #c3c6d6 50%, transparent 50%);
    background-position: bottom;
    background-size: 10px 1px;
    background-repeat: repeat-x;
    height: 1px;
}

/* Секции SPA */
.page-section { display: none; }
.page-section.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Нижняя навигация (мобильная) */
.bottom-nav-item {
    color: #434654;
    opacity: 0.7;
}
.bottom-nav-item.active {
    color: #0052cc;
    opacity: 1;
}
.bottom-nav-item.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Подчёркивание активного таба */
.active-tab { position: relative; color: #0052cc !important; }
.active-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0052cc;
    border-radius: 2px 2px 0 0;
}

/* Вертикальная линия шагов */
.step-line::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: #e1e2e4;
}
.step-item:last-child .step-line::before { display: none; }

/* Обрезка текста */
.line-clamp-1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Скрытие скроллбара у горизонтальных лент */
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* Кастомный скроллбар */
.custom-scrollbar::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #c3c6d6; border-radius: 10px; }

/* Фокус с клавиатуры */
*:focus-visible {
    outline: 2px solid #0052cc;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Спиннер */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Всплывающие уведомления */
.toast {
    position: fixed;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%);
    background: #2e3132;
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: toastIn 0.3s ease forwards, toastOut 0.3s ease 2.6s forwards;
}
.toast.error   { background: #ba1a1a; }
.toast.success { background: #2e7d32; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Числовые поля без стрелок */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }

/* Ошибки валидации форм */
.input-error { border-color: #ba1a1a !important; }
.error-message { color: #ba1a1a; font-size: 12px; margin-top: 4px; display: none; }
.error-message.visible { display: block; }

/* Активная карточка способа оплаты */
.payment-card.active-payment-card {
    border-color: #0052cc;
    background-color: #f3f4f6;
}

/* ============================================================
   Прижатый к низу подвал
   ============================================================ */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1 0 auto;
}
footer {
    margin-top: auto;
}
/* На мобильных оставляем место под фиксированную нижнюю навигацию */
@media (max-width: 767px) {
    footer {
        padding-bottom: 88px;
    }
}
