:root {
    --zt-main: #007AFF; /* Синий для пассажира */
    --zt-drv: #34C759;  /* Зеленый для водителя */
    --zt-dark: #1C1C1E;
    --zt-bg: rgba(255, 255, 255, 0.96);
}

/* ОСНОВНОЙ КОНТЕЙНЕР */
.zt-app-container {
    position: relative;
    width: 100%;
    height: 750px; /* Высота для десктопа, на мобилках можно 100vh */
    background: #e5e3db;
    border-radius: 24px;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
}

/* КАРТА НА ЗАДНЕМ ПЛАНЕ */
#zt-map {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

/* ШАПКА (ВЕРХНЯЯ КАРТОЧКА) */
.zt-floating-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    z-index: 10;
    background: var(--zt-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.4);
}

.zt-header-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 10px; 
}

.zt-logo-text { font-weight: 800; font-size: 16px; color: var(--zt-dark); letter-spacing: -0.5px; }
.zt-city-badge { background: var(--zt-main); color: white; padding: 2px 7px; border-radius: 6px; font-size: 10px; margin-left: 4px; }
#online-count { font-size: 12px; color: #8e8e93; font-weight: 600; }

/* ПЕРЕКЛЮЧАТЕЛЬ ПЕШКОМ/ЗА РУЛЕМ */
.zt-role-selector { 
    display: flex; 
    gap: 4px; 
    background: rgba(120, 120, 128, 0.12); 
    padding: 3px; 
    border-radius: 12px; 
}

.zt-selector-btn { 
    flex: 1; border: none; padding: 10px; border-radius: 9px; 
    font-weight: 600; font-size: 13px; cursor: pointer; 
    background: transparent; color: #666; transition: 0.2s ease; 
}

.zt-selector-btn.active { 
    background: white; 
    color: var(--zt-dark); 
    box-shadow: 0 3px 10px rgba(0,0,0,0.1); 
}

/* ФУТЕР (НИЖНЯЯ КАРТОЧКА) */
.zt-floating-footer {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    z-index: 10;
    background: white;
    padding: 18px;
    border-radius: 24px;
    box-shadow: 0 -5px 35px rgba(0,0,0,0.15);
}

/* Ряд с инпутами */
.zt-input-row {
    display: flex;
    flex-wrap: wrap; /* Позволяет полям переноситься на новую строку */
    gap: 10px;       /* Расстояние между полями */
    margin-bottom: 12px;
    width: 100%;
}

/* Сами поля ввода */
.zt-input-field {
    flex: 1 1 140px; /* Растягиваться, но не быть уже 140px */
    min-width: 0;    /* Чтобы flex не раздувал поле шире экрана */
    height: 48px;    /* Удобная высота для пальца */
    padding: 0 15px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    font-size: 16px; /* 16px предотвращает авто-зум в Safari на iPhone */
    background: #f9f9f9;
}

/* Специфичное поле для цены (делаем его поменьше) */
#psng-price, #in-price {
    flex: 0 0 80px; /* Фиксированная ширина 80px, не растягивается */
}

/* Чтобы на совсем маленьких экранах телефон и авто встали друг под друга */
@media (max-width: 360px) {
    .zt-input-field {
        flex: 1 1 100%; /* Каждое поле на всю строку */
    }
}

.zt-input-field:focus { 
    background: white; 
    border-color: var(--zt-main); 
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); 
}

.price-input { max-width: 85px; font-weight: 700; text-align: center; color: var(--zt-drv); }

/* КНОПКИ ДЕЙСТВИЯ */
.zt-main-action-btn { 
    width: 100%; padding: 18px; border: none; border-radius: 16px; 
    color: white; font-weight: 800; font-size: 16px; cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.zt-main-action-btn:active { transform: scale(0.97); filter: brightness(0.9); }

.btn-psng { background: var(--zt-main); box-shadow: 0 5px 20px rgba(0, 122, 255, 0.3); }
.btn-drvr { background: var(--zt-drv); box-shadow: 0 5px 20px rgba(52, 199, 89, 0.3); }

/* ДЛЯ МОБИЛОК */
@media (max-width: 600px) {
    .zt-app-container { height: 100vh; margin: 0; border-radius: 0; }
    .zt-floating-footer { bottom: 60px; width: 100%; }
    .zt-floating-header { top: 0px; width: 100%; }
}
/* СКРЫВАЕМ СТАНДАРТНЫЕ ЭЛЕМЕНТЫ САЙТА */
footer, 
.footer, 
.site-footer, 
#footer,
.promo-banner, 
.promo-app, 
.download-app-block,
#promo {
    display: none !important; /* Полностью удаляем из видимости */
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* УБИРАЕМ ЛИШНИЕ ОТСТУПЫ У ГЛАВНОГО КОНТЕЙНЕРА САЙТА */
main, 
.main-content, 
#content, 
.wrapper {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    max-width: 100% !important; /* Растягиваем на всю ширину */
}

/* РАСТЯГИВАЕМ ПРИЛОЖЕНИЕ НА ВЕСЬ ЭКРАН */
.zt-app-container {
    position: fixed; /* Фиксируем поверх всего */
    top: 60px;       /* Оставляем место под шапку сайта (если нужно) */
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 60px); /* Высота на весь экран минус шапка */
    width: 100%;
    margin: 0 !important;
    border-radius: 0 !important; /* Убираем скругления на весь экран */
    z-index: 999;
}

/* КАРТА НА ВЕСЬ ЭКРАН */
#zt-map {
    width: 100%;
    height: 100%;
}
/* Стили модального окна */
.zt-modal-overlay {
    display: none !important; /* Прячем намертво при загрузке */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0; /* Для плавной анимации */
    transition: opacity 0.3s ease;
}

.zt-modal-content {
    background: white; width: 100%; max-width: 450px;
    border-radius: 28px; padding: 25px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.zt-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.zt-modal-logo { font-weight: 900; color: #007AFF; font-size: 20px; }
.zt-modal-close { border: none; background: #eee; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }

.zt-modal-body h3 { font-size: 18px; margin-bottom: 10px; color: #1c1c1e; }
.zt-modal-body p { color: #666; font-size: 14px; line-height: 1.5; }

.zt-step { display: flex; gap: 15px; margin: 20px 0; align-items: flex-start; }
.zt-step-icon { font-size: 28px; }
.zt-step div strong { display: block; font-size: 16px; color: #1c1c1e; }
.zt-step div span { font-size: 13px; color: #666; }

.zt-modal-note { font-style: italic; border-left: 3px solid #34C759; padding-left: 10px; margin: 15px 0; }

.zt-modal-btn {
    width: 100%; background: #007AFF; color: white; border: none;
    padding: 16px; border-radius: 16px; font-weight: 800; font-size: 16px;
    cursor: pointer; transition: transform 0.1s;
}
.zt-modal-btn:active { transform: scale(0.97); }

/* Анимация появления */
.animate-slide-up { animation: slideUp 0.4s ease-out; }
@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* Анимация исчезновения */
.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none; /* Чтобы нельзя было кликнуть во время исчезновения */
}
.zt-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.zt-quick-tags span {
    background: #f1f1f2;
    color: #007AFF;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid rgba(0, 122, 255, 0.1);
}

.zt-quick-tags span:active {
    background: #007AFF;
    color: white;
}
/* СЧЕТЧИК ОНЛАЙН */
#online-count {
    font-size: 12px;
    font-weight: bold;
    color: #34C759;
    display: flex;
    align-items: center;
}
#online-count::before {
    content: '';
    width: 8px; height: 8px;
    background: #34C759;
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 1.5s infinite;
}
@keyframes blink { 0%, 100% {opacity: 1} 50% {opacity: 0.3} }
/* Анимация пульсации для метки пользователя */
[class*="islands#blueCircleDotIcon"] {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.zt-status-active {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px;
    border-radius: 8px;
    font-size: 11px;
    text-align: center;
    margin-bottom: 10px;
    border: 1px solid #c8e6c9;
}
/* КНОПКА ОТМЕНЫ (Удалить с карты) */
.zt-cancel-btn {
    width: 100%;
    background: #f2f2f7; /* Светло-серый фон */
    color: #8e8e93;      /* Серый текст */
    border: none;
    padding: 12px;
    border-radius: 12px; /* Закругляем как основные поля */
    font-weight: 600;
    font-size: 13px;
    margin-top: 8px;     /* Отступ от основной кнопки */
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
}

/* Эффект при наведении или нажатии */
.zt-cancel-btn:active {
    background: #e5e5ea;
    color: #ff3b30;      /* При нажатии текст становится красным */
    transform: scale(0.98); /* Легкое нажатие */
}

/* Если хочешь сделать её совсем минималистичной (просто текст с иконкой) */
.zt-cancel-btn-alt {
    background: none;
    color: #ff3b30;
    font-size: 12px;
    text-decoration: underline;
    margin-top: 10px;
}
/* Сама точка */
.zt-pulsar {
    width: 14px;
    height: 14px;
    background: #007AFF;
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Кольцо пульсации */
.zt-pulsar::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; bottom: -2px; right: -2px;
    border-radius: 50%;
    border: 4px solid #007AFF;
    animation: zt-ring-pulse 2s ease-out infinite;
}

@keyframes zt-ring-pulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.8); opacity: 0; }
}
/* ПОЛНОСТЬЮ СКРЫВАЕМ ШТАТНЫЙ ХЕДЕР САЙТА НА СТРАНИЦЕ ПОПУТЧИКА */
.header-wow-top {
    display: none !important;
}

/* Растягиваем контейнер приложения на освободившееся место */
.zt-app-container {
    height: 100vh;
    margin-top: 0 !important;
    top: 0 !important;
}

/* Если на сайте есть отступ под хедер (body padding), убираем его */
body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* Кнопка в селекторе */
.zt-selector-btn#btn-parcel.active {
    background: #f59e0b !important;
    color: #fff !important;
}

/* Главная кнопка действия для посылки */
.btn-parcel {
    background: #f59e0b !important;
    color: #fff !important;
    border: none;
}

/* Быстрые теги для посылки */
.zt-tag-parcel {
    cursor: pointer;
    background: #fffbeb;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #fef3c7;
    color: #b45309;
}

/* Общие правки для мини-тегов */
.zt-tag-mini, .zt-tag-drvr {
    cursor: pointer;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
}

.zt-tag-drvr {
    background: #e3f2fd;
    color: #1976d2;
}
.zt-bottom-sheet {
    position: fixed;
    bottom: 20px; /* Отступ от нижнего края, чтобы "парила" */
    left: 50%;
    /* Центрируем и задаем ширину */
    width: 94%;
    max-width: 500px; 
    
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Скругления со всех сторон для эффекта карточки */
    border-radius: 28px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 2000;
    
    /* Плавность и состояние "свернуто" */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* ВАЖНО: сохраняем центровку по X при анимации Y */
    transform: translateX(-50%) translateY(calc(100% - 70px)); 
}

/* Состояние "открыто" */
.zt-bottom-sheet.active {
    transform: translateX(-50%) translateY(0);
}

/* Чтобы на мобилках в открытом виде не прилипала к самому низу */
@media (max-width: 768px) {
    .zt-bottom-sheet.active {
        bottom: 15px;
    }
}

/* Шапка шторки с полоской-ручкой */
.zt-sheet-header {
    width: 100%;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

.zt-sheet-handle {
    width: 36px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
}

/* Контент внутри шторки */
.zt-sheet-content {
    padding: 0 20px 25px;
    max-height: 75vh;
    overflow-y: auto;
}

/* Плавное переключение между панелями внутри */
.role-panel {
    animation: sheetFadeIn 0.3s ease;
}

@keyframes sheetFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для кнопок и тегов внутри шторки (для красоты) */
.zt-tag-mini, .zt-tag-parcel, .zt-tag-drvr {
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.zt-tag-mini:active, .zt-tag-parcel:active {
    transform: scale(0.95);
}

/* Адаптация кнопок под шторку */
.zt-main-action-btn {
    border-radius: 16px;
    margin-top: 15px;
    height: 54px;
    font-size: 16px;
    font-weight: 800;
}
.zt-main-action-btn, .zt-selector-btn, .zt-tag-mini, .zt-tag-parcel {
    transition: transform 0.1s ease, filter 0.2s ease;
    cursor: pointer;
}

.zt-main-action-btn:active, .zt-selector-btn:active, .zt-tag-mini:active {
    transform: scale(0.96); /* Кнопка слегка сжимается при нажатии */
    filter: brightness(0.9); /* Чуть темнеет */
}
.zt-bottom-sheet i {
    min-width: 24px;
    text-align: center;
}
/* Чтобы кнопки не «прыгали» при загрузке */
.zt-main-action-btn {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
