/* Карта и форма */
.taxi-page {
    position: relative;
    width: 100%;
    height: 100vh;
    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 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-terms {
    font-size: 13px;
    color: #444;
}

/* Модалка */
.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: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#center-choice button {
    padding: 5px 10px;
    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: 8px; /* расстояние между стрелкой и кнопкой */
}

.toggle-panel-btn-btn {

    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.hamburger-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
}

.hamburger-icon {
    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;
}
#hamburger-icon:active {
    background-color: #e0e0e0; /* немного серый при нажатии */
}
.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.hamburger-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    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;
}


@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;
    }

    .phone-section {
        margin-right: 10px;
    }
    .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 {
        height: 48px; /* высота заголовка */
        overflow: hidden;
        padding: 12px 24px; /* чуть меньше */
    }

    .taxi-panel.collapsed .taxi-form,
    .taxi-panel.collapsed .taxi-instruction,
    .taxi-panel.collapsed .taxi-price,
    .taxi-panel.collapsed .taxi-terms {
        display: none;
    }

    #toggle-panel-btn {
        display: block;       /* чтобы можно было центрировать через margin */
        margin: 0 auto;       /* автоматические отступы слева и справа */
        font-size: 12px;      /* можно задать нужный размер текста */
        cursor: pointer;
        background: none;
        border: none;  /* удобные внутренние отступы */
    }
    .toggle-panel-btn-btn {
        cursor:pointer;
        font-size:18px;
        background:none;
        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; /* changed from auto */
        transition: max-height 0.5s ease, padding 0.5s ease;
    }

    /* Контейнер содержимого для плавного скрытия */
    .taxi-panel-content {
        max-height: 1000px; /* достаточно большой для развернутого состояния */
        opacity: 1;
        transition: max-height 0.5s ease, opacity 0.5s ease;
        overflow: hidden;
    }


    .taxi-panel.collapsed {
        max-height: 48px !important;
        padding: 12px 24px !important;
    }

    .taxi-panel.collapsed .taxi-panel-content {
        max-height: 0 !important;
        opacity: 0 !important;
    }

    .taxi-form-section label {
        display:none;
    }
}


@media screen and (min-width: 769px) {
    .toggle-panel-btn-btn {
        display: none;
    }

    .hamburger-menu {
        display: none;
    }

}