/* Карта и форма */
.taxi-page {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
}

#taxi-map {
    width: 100%;
    height: 100%;
    position: relative;
    top: 0; left: 0;
    z-index: 0;
}

/* Панель формы */
.taxi-panel {
    position: absolute;
    left: 20px;
    width: 340px;
    background-color: #ffffffee;
    border-radius: 16px;
    padding: 24px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.taxi-title {
    margin-top: 0;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #222;
}

.taxi-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.taxi-form-section label {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}
.taxi-form-section select,
.taxi-form-section input,
.taxi-form-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.2s;
}

.taxi-form-section input:focus,
.taxi-form-section textarea:focus {
    outline: none;
    border-color: #2a7ae2;
}

/* Кнопка */
.taxi-submit-btn {
    background: #2a7ae2;
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.taxi-submit-btn:hover {
    background: #1c5ccf;
}

/* Цена */
.taxi-price {
    font-weight: bold;
    color: #2a7ae2;
    font-size: 16px;
}


/* Модалка */
.taxi-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.taxi-modal-content {
    background: #fff;
    max-width: 600px;
    margin: 8% auto;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.taxi-modal-body {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.taxi-instruction {
    margin-bottom: 0.95 rem;
    padding: 0.3rem;
    background-color: #f5faff;
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
}

.instruction-main {
    font-weight: bold;
    font-size: 1.0rem;
    color: #0d47a1;
    margin: 0 0 0.3rem 0;
}

.instruction-sub {
    font-size: 0.9rem;
    color: #444;
    margin: 0;
}
.toggle-comment-btn {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

.toggle-comment-btn:hover {
    background-color: #0056b3;
}


.tt-suggestion-item {
    padding: 6px 12px;
    cursor: pointer;
}

.tt-suggestion-item strong {
    color: #e74c3c; /* красноватая подсветка */
}

.tt-suggestion-item:hover {
    background-color: #f0f0f0;
}
.tt-menu {
    background-color: #fff;      /* Белый фон */
    border: 1px solid #ccc;      /* Светлая рамка */
    border-radius: 4px;          /* Скруглённые углы */
    z-index: 1000;               /* Поверх карты */
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* Небольшая тень */
}

.tt-suggestion {
    padding: 8px 12px;
    cursor: pointer;
}

.tt-suggestion:hover {
    background-color: #f0f0f0;
}

.tt-suggestion strong {
    color: #d6336c; /* Подсветка совпадений */
}

.twitter-typeahead {
    width: 100% !important;
    display: block; /* или inline-block — но с шириной обязательно */
}

.tt-input {
    width: 100% !important;
}

.alert alert-danger {
color: red;
}
#center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    margin-top: -30px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/684/684908.png');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1000;
}

#center-choice {
    position: absolute;
    top: calc(50% + 20px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: row;
    gap: 10px;
    z-index: 1000;
    background: none;
    border-radius: 8px;
}

#center-choice button {
    min-width: 90px;
    font-size: 14px;
    cursor: pointer;
}
#detect-location-btn {
    font-size: 20px;   /* размер иконки */
    padding: 5px 7px; /* внутренние отступы */
    border-radius: 50%; /* кругленькая */
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: 0.2s;
}

#detect-location-btn:hover {
    background: #e0e0e0;
}
.toggle-panel-container {
    display: flex;
    align-items: center;   /* выравнивание по центру */
    justify-content: center; /* по центру всей строки */
    gap: 25%; /* расстояние между стрелкой и кнопкой */
}

.phone-and-payment {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.phone-and-payment .taxi-form-section {
    flex: 1;
}

#toggle-panel-btn {
    background-color: #007bff;
    margin-bottom: 5px;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 2px 50px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hamburger-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
}

.hamburger-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    padding: 8px;
    gap: 4px;
    transition: background-color 0.2s;
    font-size: 19px;
}
#hamburger-icon:active {
    background-color: #e0e0e0; /* немного серый при нажатии */
}
.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.hamburger-dropdown {
    position: absolute;
    top: 30px;
    left: 30px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    overflow: hidden;
    flex-direction: column;
}

.hamburger-dropdown a {
    padding: 15px 20px;
    display: block;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.hamburger-dropdown a:hover {
    background-color: #f0f0f0;
}

/* Для конкретного гамбургера */
#hamburger-icon {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-dropdown {
    /* базовое положение как у тебя */
    position: absolute;
    top: 30px;
    left: 30px;

    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    overflow: hidden;

    flex-direction: column;

    /* ВАЖНО: не display:none */
    display: flex;

    /* скрытое состояние */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* “появление из левого верхнего угла” */
    transform-origin: left top;
    transform: scale(0.85) translate(-8px, -8px);

    transition: transform 180ms ease, opacity 180ms ease, visibility 0s linear 180ms;
    will-change: transform, opacity;
}

/* открыто */
.hamburger-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: scale(1) translate(0, 0);

    /* visibility должна включаться сразу */
    transition: transform 90ms ease, opacity 90ms ease, visibility 0s;
}

/* (опционально) чуть “мягче” клики на мобилке */
.hamburger-icon, #hamburger-icon {
    -webkit-tap-highlight-color: transparent;
}


.disabled-option {
    color: gray;
}

.payment-note {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    margin-left: 4px;
}

.taxi-panel {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.my-rides-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-indicator {
    position: absolute;
    right: 0px;
    top: 0px;
    width: 12px;
    height: 12px;
    background-color: #2ecc71; /* зелёный */
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, .3);
    z-index: 1000;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    font-size: 14px;
    cursor: pointer;
}

.choice-icon {
    width: 22px;
    height: 22px;
}

.field-error {
  border: 2px solid #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229,57,53,0.15) !important;
  border-radius: 10px;
}

.taxi-price {
    font-weight: bold;
    color: #2a7ae2;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.35;
}

.taxi-price__route {
    display: block;
}

.taxi-price__amount {
    display: block;
}

.taxi-price__old {
    text-decoration: line-through;
    opacity: .7;
    margin-right: 6px;
}

.taxi-price__new {
    font-size: 18px;
}

@media screen and (max-width: 768px) {

    .phone-and-time {
        display: flex;
        gap: 10px;
        justify-content: space-between;
        align-items: flex-end;
    }

    .phone-section,
    .time-section {
        flex: 1;
    }


    .taxi-modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        background: #fff;
        padding: 24px;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 20px rgba(0,0,0,0.3);
        overflow-y: auto;
        animation: slideUp 0.3s ease-out;
    }

    .taxi-terms,
    .taxi-instruction,
    .taxi-title {
        display: none;
    }

    .taxi-panel.collapsed {
        transform: translateY(88%);
    }


    #toggle-panel-btn {
        display: block;       /* чтобы можно было центрировать через margin */
        margin: 10 auto;       /* автоматические отступы слева и справа */
        font-size: 12px;      /* можно задать нужный размер текста */
        cursor: pointer;
        border: none;  /* удобные внутренние отступы */
    }
    .toggle-panel-btn-btn {
        cursor:pointer;
        font-size:18px;

        border:none;
    }
    .taxi-panel {
        position: fixed;
        bottom: 40px;
        left: 0;
        width: 100%;
        max-height: 90vh;
        background-color: #ffffffee;
        border-radius: 16px 16px 0 0;
        padding: 15px;
        z-index: 10;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.15);
        backdrop-filter: blur(10px);
        overflow: hidden;
        transition: transform 0.3s ease;
        touch-action: none;
        will-change: transform;
    }

    .taxi-panel.from-appp {
        bottom: 0px !important;
    }



    /* Контейнер содержимого для плавного скрытия */
    .taxi-panel-content {
        max-height: 1000px; /* достаточно большой для развернутого состояния */
        opacity: 1;
        transition: max-height 0.5s ease, opacity 0.5s ease;
        overflow: hidden;
    }



    .taxi-form-section label {
        display:none;
    }
}


@media screen and (min-width: 769px) {
    .toggle-panel-btn-btn {
        display: none;
    }
}

.extras-trigger {
    width: 100%;
    border: 1px solid #d9e2f1;
    background: #f8fbff;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extras-trigger__title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2a37;
}

.extras-trigger__summary {
    font-size: 13px;
    color: #5f6b7a;
}

.selected-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.selected-extra-chip {
    background: #eef5ff;
    color: #2a7ae2;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
}

.extras-sheet {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
}

.extras-sheet.is-open {
    display: block;
}

.extras-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
}

.extras-sheet__dialog {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}

.extras-sheet__handle {
    width: 44px;
    height: 5px;
    background: #d7dce3;
    border-radius: 999px;
    margin: 10px auto 6px;
}

.extras-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 12px;
}

.extras-sheet__head h3 {
    margin: 0;
    font-size: 18px;
}

.extras-sheet__close {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.extras-sheet__body {
    overflow-y: auto;
    padding: 0 16px 12px;
}

.extras-group {
    margin-bottom: 18px;
}

.extras-group__title {
    font-size: 13px;
    font-weight: 700;
    color: #5f6b7a;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.extra-check,
.extra-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e7ebf2;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.extra-subgroup {
    padding-left: 10px;
    margin: 6px 0 10px;
}

#extras-comment {
    width: 100%;
    border: 1px solid #d6dbe3;
    border-radius: 12px;
    padding: 12px;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
}

.extras-sheet__footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef1f5;
    background: #fff;
}

.extras-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
}

.extras-btn--ghost {
    background: #f1f4f8;
    color: #1f2a37;
}

.extras-btn--primary {
    background: #2a7ae2;
    color: #fff;
}


.extras-sheet {
    position: fixed;
    inset: 0;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility 0s linear .22s;
}

.extras-sheet.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .22s ease, visibility 0s;
}

.extras-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    transition: opacity .22s ease;
}

.extras-sheet.is-open .extras-sheet__backdrop {
    opacity: 1;
}

.extras-sheet__dialog {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    transform: translateY(calc(100% + 24px));
    transition: transform .28s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
    overflow: hidden;
}

.extras-sheet.is-open .extras-sheet__dialog {
    transform: translateY(0);
}

.extras-sheet__dialog.is-dragging {
    transition: none;
}

.extras-sheet__handle {
    width: 44px;
    height: 5px;
    background: #d7dce3;
    border-radius: 999px;
    margin: 10px auto 6px;
    cursor: grab;
    touch-action: none;
}

.extras-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 12px;
}

.extras-sheet__head h3 {
    margin: 0;
    font-size: 18px;
}

.extras-sheet__close {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.extras-sheet__body {
    overflow-y: auto;
    padding: 0 16px 12px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.extras-group {
    margin-bottom: 18px;
}

.extras-group__title {
    font-size: 13px;
    font-weight: 700;
    color: #5f6b7a;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.extra-check,
.extra-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e7ebf2;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.extra-subgroup {
    padding-left: 10px;
    margin: 6px 0 10px;
}

#extras-comment {
    width: 100%;
    border: 1px solid #d6dbe3;
    border-radius: 12px;
    padding: 12px;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
}

.extras-sheet__footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef1f5;
    background: #fff;
}

.extras-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
}

.extras-btn--ghost {
    background: #f1f4f8;
    color: #1f2a37;
}

.extras-btn--primary {
    background: #2a7ae2;
    color: #fff;
}