/* Основной layout */
.order-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1100px;
    margin: 30px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Левая часть с деталями */
.order-info-block {
    flex: 1 1 55%;
}

.order-info-block h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.order-info-block h4 {
    font-size: 1.3rem;
    color: #3498db;
    margin-bottom: 10px;
}

.order-info-block ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.order-info-block ul li {
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-info-block ul li strong {
    color: #2980b9;
    min-width: 180px;
    display: inline-block;
}

/* Специальные поля */
#status-text {
    font-weight: 700;
    color: #e67e22;
}

.chat-messages-taxi {
    border:1px solid #ccc;
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    margin-top: 10px;
}

.chat-modal-taxi {
    display:none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    z-index:11111;
}
.chat-modal-content-taxi {
    background: white;
    width: 500px;
    max-width: 90%;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: 90%;
}

.exit-label {
    margin-top:4px;
    font-size:12px;
    font-weight:600;
    color:#333;
}

/* Правая часть — карта */
.order-map-block {
    flex: 1 1 40%;
    min-width: 300px;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background-color: #eaeaea;
}

.carousel-wrapper {
    position: relative;
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    scroll-behavior: smooth;
    padding: 10px 40px;
}

.carousel-slide {
    min-width: 500px;
    flex-shrink: 0;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-arrow.left {
    left: 10px;
}
.carousel-arrow.right {
    right: 10px;
}
.carousel-arrow:hover {
    background: #217dbb;
}

.detail-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}
.detail-link:hover {
    text-decoration: underline;
}
.nav-arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.arrow-button {
    background: #3498db;
    color: white;
    text-decoration: none;
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.arrow-button:hover {
    background: #217dbb;
}

.arrow-info {
    font-size: 16px;
    color: #555;
    margin: 0 10px;
    white-space: nowrap;
}

.driver-car-info {
  display: flex;
  gap: 40px;
  align-items: flex-end; /* ⬅ добавь это */
  margin-top: 25px;
}


.driver-info, .car-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Фото водителя — круг */
.driver-photo {
  width: 100px !important;
  height: 100px !important;
  border-radius: 100%;
  object-fit: cover;
}

/* Имя водителя */
.driver-name {
  font-size: 1.1rem;
  color: black;
  word-break: break-word;
}

/* Фото авто — прямоугольник с закруглением */
.car-photo {
  width: 300px !important;
  height: 150px !important;
  border-radius: 10%;
  object-fit: cover;
}

.car-plate, .car-model {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}
.action-buttons .btn {
  padding: 12px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.action-buttons .btn-danger {
  background-color: #e74c3c;
  color: white;
}

.action-buttons .btn-danger:hover {
  background-color: #c0392b;
}

.action-buttons .btn-primary {
  background-color: #3498db;
  color: white;
}

.action-buttons .btn-primary:hover {
  background-color: #2980b9;
}

.call-modal-phone {
    display:none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.call-modal-phone-two {
    background:white;
    padding:20px;
    border-radius:12px;
    text-align:center;
    width:300px;
    box-shadow:0 2px 10px rgba(0,0,0,0.3);
}

.top-row {
    position: relative;
}

.driver-car-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}
.driver-photos {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.driver-photo-block,
.car-photo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circle-photo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.driver-name {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.trip-status-bar {
    display: none;
}

.cancel-warning-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
}

.search-ui{
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: .95;
}

.spinner{
  width: 28px;
  height: 28px;
  border: 2px solid rgba(0,0,0,.15);
  border-top-color: rgba(0,0,0,.55);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.search-dynamic-text{
  white-space: nowrap;
}

.search-timer{
  font-variant-numeric: tabular-nums;
  opacity: .8;
}

.panel-search-ui{
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}

.panel-spinner{
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: rgba(255,255,255,.95);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.taxi-car-wrap{
    width: 44px;
    height: 44px;
    transform: translate(-22px, -22px);
    pointer-events: none;
}
.taxi-car{
    width: 44px;
    height: 44px;
    background: url("/static/main/img/car.b75f00571ef1.png") center/contain no-repeat;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform 220ms linear;
    will-change: transform;
}

.taxi-driver-profile-link {
    text-decoration: none;
    color: #333;
    cursor: pointer;
}

.taxi-driver-profile-link:hover {
    text-decoration: underline;
}

.taxi-car-zoom-trigger {
    cursor: zoom-in;
}

.taxi-car-zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 50000;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.taxi-car-zoom-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taxi-car-zoom-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
}

.taxi-car-zoom-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.35);
    padding: 6px 10px;
    border-radius: 10px;
    z-index: 10;
}

.taxi-car-zoom-media-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taxi-car-zoom-track {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.taxi-car-zoom-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taxi-car-zoom-media {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    will-change: transform;
}

.taxi-driver-photo-link {
    display: inline-block;
    line-height: 0;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
}

.taxi-driver-photo-link img {
    display: block;
}

.taxi-driver-photo-link:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 3px;
}

.call-modal-phone {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    justify-content: center;
    align-items: center;
    z-index: 20000;
    padding: 16px;
}

.call-modal-phone-two {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 18px;
    padding: 22px 18px 18px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.call-modal-phone-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-modal-phone-close:hover {
    background: #e9ecef;
}

.call-modal-phone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff3f3;
    color: #e53935;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.call-modal-phone-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.call-modal-phone-number {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: #111;
    word-break: break-word;
}

.call-modal-phone-actions {
    display: flex;
    gap: 10px;
}

.call-modal-phone-btn {
    flex: 1 1 0;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    padding: 0 14px;
}

.call-modal-phone-btn--call {
    background: #22c55e;
    color: #fff;
}

.call-modal-phone-btn--call:hover {
    background: #16a34a;
}

.call-modal-phone-btn--copy {
    background: #007bff;
    color: #fff;
}

.call-modal-phone-btn--copy:hover {
    background: #0b5ed7;
}

.driver-rating-badge {
    position: absolute;
    bottom: 70px;
    left: 40px;
    background: #c2c2c2;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    backdrop-filter: blur(3px);
    transform: translate(20%, 20%);
}

.driver-rating-badge i {
    color: rgb(255, 212, 59);
    font-size: 10px;
}

.chat-modal-taxi {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 11111;
}

.chat-modal-content-taxi {
    background: #fff;
    width: 500px;
    max-width: 90%;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: 90%;
    overflow: hidden;
}

.chat-modal-header-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chat-modal-header-desktop h3 {
    margin: 0;
}

.chat-modal-header-desktop button {
    font-size: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.chat-modal-topbar {
    display: none;
}

.chat-messages-taxi {
    border: 1px solid #ccc;
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    margin-top: 10px;
    border-radius: 10px;
}

.chat-input-area-taxi {
    margin-top: 10px;
}

.chat-input-wrap-taxi {
    position: relative;
    width: 100%;
}

#chat-input {
    width: 100%;
    resize: none;
    border: 1px solid #dcdcdc;
    border-radius: 16px;
    padding: 12px 52px 12px 14px; /* справа место под кнопку */
    box-sizing: border-box;
    font: inherit;
    min-height: 48px;
    max-height: 120px;
    line-height: 1.4;
}

#chat-send {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

#chat-send:hover {
    background: #217dbb;
}

#chat-send:active {
    transform: scale(0.96);
}


.support-waiting-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.support-waiting-modal.is-open {
    display: flex !important;
}

.support-waiting-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
}

.support-waiting-modal__dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: #1b1b1b;
    color: #fff;
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0,0,0,.35);
}

.support-waiting-modal__icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    font-size: 26px;
}

.support-waiting-modal__dialog h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.support-waiting-modal__dialog p {
    margin: 0 0 14px;
    line-height: 1.45;
    color: rgba(255,255,255,.88);
}

.support-waiting-modal__status {
    font-size: 14px;
    color: #ffd76a;
    font-weight: 600;
}

.support-partial-price-wrap {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.support-partial-price-label {
    font-size: 13px;
    color: rgba(255,255,255,.8);
    margin-bottom: 6px;
}

.support-partial-price-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffd76a;
}

.support-early-finish-btn {
    margin-top: 16px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #ffd76a;
    color: #1a1a1a;
}

.support-early-finish-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.driver-stop-request-banner {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8db;
    border: 1px solid #f0d36b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.driver-stop-request-banner__title {
    font-size: 15px;
    font-weight: 700;
    color: #7a5a00;
    margin-bottom: 4px;
}

.driver-stop-request-banner__text {
    font-size: 14px;
    color: #6f6241;
}

.driver-stop-request-banner__btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: #f0ad4e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.driver-stop-request-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.driver-stop-request-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.driver-stop-request-modal__dialog {
    position: relative;
    width: min(92vw, 460px);
    margin: 7vh auto 0;
    background: #fff;
    border-radius: 22px;
    padding: 22px 18px 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
    z-index: 1;
}

.driver-stop-request-modal__close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #777;
}

.driver-stop-request-modal__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff4d0;
    color: #c68a00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.driver-stop-request-modal__text {
    text-align: center;
    color: #4a4a4a;
    line-height: 1.5;
    margin-bottom: 14px;
}

.driver-stop-request-modal__price-box {
    background: #f7f8fb;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    margin-bottom: 12px;
}

.driver-stop-request-modal__label {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

.driver-stop-request-modal__price {
    font-size: 26px;
    font-weight: 800;
    color: #222;
}

.driver-stop-request-modal__meta {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    color: #444;
}

.driver-stop-request-modal__comment-wrap {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

.driver-stop-request-modal__comment {
    color: #333;
    white-space: pre-wrap;
    line-height: 1.45;
}

.driver-stop-request-modal__hint {
    font-size: 13px;
    color: #777;
    line-height: 1.45;
    margin: 12px 0 16px;
    text-align: center;
}

.driver-stop-request-modal__actions {
    display: flex;
    gap: 10px;
}

.driver-stop-request-modal__btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 13px 12px;
    font-weight: 700;
    cursor: pointer;
}

.driver-stop-request-modal__btn--reject {
    background: #f1f1f1;
    color: #333;
}

.driver-stop-request-modal__btn--approve {
    background: #28a745;
    color: #fff;
}

@media screen and (max-width: 768px) {
    .chat-modal-taxi {
        align-items: stretch;
        justify-content: stretch;
        background: #fff;
    }

    .chat-modal-content-taxi {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        padding: 0;
    }

    .chat-modal-header-desktop {
        display: none;
    }

    .chat-modal-topbar {
        height: 56px;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        border-bottom: 1px solid #e9ecef;
        background: #fff;
        flex-shrink: 0;
    }

    .chat-modal-back-btn,
    .chat-modal-close-btn {
        position: absolute;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #111;
        cursor: pointer;
        border-radius: 50%;
    }

    .chat-modal-close-btn {
        display: none;
    }

    .chat-modal-back-btn:active,
    .chat-modal-close-btn:active {
        background: rgba(0,0,0,0.06);
    }

    .chat-modal-topbar-title {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 0 8px;
    }

    .chat-modal-topbar-name {
        font-size: 17px;
        font-weight: 700;
        color: #111;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-messages-taxi {
        flex: 1 1 auto;
        height: auto;
        margin-top: 0;
        border: none;
        border-radius: 0;
        padding: 12px;
        background: #f8f9fb;
    }



    .trip-status-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: white;
        border-bottom: 1px solid #ddd;
        padding: 8px 14px;
        font-size: 16px;
        font-weight: 500;
        color: #222;
        border-radius: 10px 10px 0 0;
        width: 100%;
        z-index: 1500;

    }

    .trip-status-left {
        color: #007bff;
    }

    .trip-status-right {
        color: #555;
        font-weight: 600;
    }

    .trip-car-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        font-family: "Inter", sans-serif;
    }

    .trip-car-info .car-model {
        font-size: 13px;
        color: #555;
        font-weight: 500;
        line-height: 1.2;
    }

    .trip-car-info .car-plate {
        font-size: 13px;
        font-weight: 700;
        color: #111;
        background: #f7f7f7;
        border: 1.5px solid #ccc;
        border-radius: 6px;
        padding: 2px 8px;
        margin-top: 2px;
        letter-spacing: 1px;
        text-transform: uppercase;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .order-layout {
        display: none;
    }

    #map {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
    }

    .driver-panel {
        position: fixed;
        bottom: 50px;
        width: 100%;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        transform: translateY(0);
        flex-direction: column;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        transition: transform 0.3s ease;
        touch-action: none;
    }

    .driver-panel .top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 10px;
    }



    .driver-panel.expanded {
        transform: translateY(0px); /* насколько поднимаем панель */
    }

    .driver-panel .extra-info {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: none;
        will-change: max-height, opacity;
    }

    .driver-panel.expanded .extra-info {
        transition: max-height 0.45s ease, opacity 0.45s ease;
    }

    .driver-rating-badge {
        position: absolute;
        bottom: 70px;
        left: 40px;
        background: #c2c2c2;
        color: #fff;
        font-size: 10px;
        font-weight: 600;
        border-radius: 10px;
        padding: 2px 5px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(3px);
        transform: translate(20%, 20%);
    }

    .driver-rating-badge::before {
        margin-right: 3px;
        color: #ffcc00;
    }

    .panel-handle {
        width: 40px;
        height: 5px;
        background: #ccc;
        border-radius: 3px;
        margin: 5px auto;
        cursor: pointer;
    }


    .driver-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .driver-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
    }

    .car-model {
        font-size: 14px;
        font-weight: 600;
    }

    .car-plate {
        font-size: 12px;
        color: #555;
    }


    .action-btn {
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        text-decoration: none;
    }

    .call-btn {
        background: #4CAF50;
        color: white;
    }

    .chat-btn {
        background: #2196F3;
        color: white;
    }
    .driver-name {
        font-size: 14px;
        margin-top: 4px;
    }

    .driver-car-center {
        flex: 1;
        text-align: center;
    }

    .driver-car-center .car-model {
        font-weight: bold;
        font-size: 16px;
    }

    .driver-car-center .car-plate {
        font-size: 14px;
        margin-top: 2px;
    }

    .driver-car-center .car-status {
        font-size: 18px;
        color: #667;
        margin-top: 2px;
    }

    .driver-actions {
        display: flex;
        gap: 8px;
    }
    .cancel-btn {
        background: #e74c3c; /* красный, как btn-danger */
        color: white;
        border: none;
        cursor: pointer;
        font-size: 18px;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
        padding: 0;
    }

    .cancel-btn:hover {
        background: #c0392b;
    }

    .status-pending {
        color: #e67e22;
        font-weight: 700;
    }

    .status-accepted {
        color: #e67e22;
        font-weight: 700;
    }
    .status-arrived {
        color: #e67e22;
        font-weight: 700;
    }
    .status-completed {
        color: #27ae60;
        font-weight: 700;
    }

    .status-canceled {
        color: #e74c3c;
        font-weight: 700;
    }

    .status-started {
        color: #27ae60;
        font-weight: 700;
    }

    .order-details-card {
        background: #f9fafb;
        border-radius: 16px;
        padding: 5px 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
        margin-bottom: 26px;
    }

    .details-title {
        font-size: 16px;
        font-weight: 700;
        color: #222;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 5px;
    }

    .order-details-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .order-details-list li {
        display: flex;
        align-items: center;
        font-size: 14px;
        padding: 6px 0;
        border-bottom: 1px dashed #ddd;
        color: #333;
    }

    .order-details-list li:last-child {
        border-bottom: none;
    }

    .order-details-list .icon {
        font-size: 16px;
        margin-right: 8px;
        opacity: 0.8;
    }

    .order-details-list strong {
        margin-right: 10px;
        min-width: 60px;
        color: #555;
        font-weight: 600;
    }

    .order-details-list .price {
        font-weight: 700;
        color: #007bff;
    }

    .driver-panel.expanded .order-details-card {
        transform: translateY(0);
        opacity: 1;
    }

    .order-details-card {
        transform: none;
        opacity: 1;
    }
    .driver-photos {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        gap: 14px;
    }

    .driver-photo-block,
    .car-photo-block {
        width: 62px;              /* одинаковая ширина обоих блоков */
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0 0 62px;           /* не даём растягиваться */
    }

    .circle-photo {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid #ddd;
        box-shadow: 0 0 6px rgba(0,0,0,0.2);
    }

    #driver-name-panel {
        width: 100%;
        margin-top: 10px;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 600;
        text-align: center;
        line-height: 1.1;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .call-modal-phone-two {
        max-width: 100%;
        border-radius: 16px;
        padding: 20px 16px 16px;
    }

    .call-modal-phone-number {
        font-size: 20px;
    }

}

/* ===== ЧАТ ТАКСИ: обновлённый вид сообщений ===== */

.chat-modal-content-taxi {
    background: #fff;
    width: 500px;
    max-width: 90%;
    padding: 0;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}

.chat-modal-header-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 0 18px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.chat-modal-header-desktop h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.chat-modal-header-desktop button {
    width: 34px;
    height: 34px;
    font-size: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
}

.chat-modal-header-desktop button:hover {
    background: rgba(0,0,0,0.05);
}

.chat-messages-taxi {
    flex: 1 1 auto;
    height: 380px;
    overflow-y: auto;
    padding: 14px 12px 16px;
    background: #f3f5f8;
    margin-top: 0;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.chat-messages-taxi::-webkit-scrollbar {
    width: 8px;
}

.chat-messages-taxi::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 999px;
}

.chat-messages-taxi::-webkit-scrollbar-track {
    background: transparent;
}

.chat-day-divider {
    align-self: center;
    font-size: 12px;
    color: #7b8794;
    background: rgba(255,255,255,0.9);
    border: 1px solid #e7ebf0;
    border-radius: 999px;
    padding: 5px 12px;
    margin: 6px 0 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chat-msg-row {
    display: flex;
    width: 100%;
}

.chat-msg-row.is-mine {
    justify-content: flex-end;
}

.chat-msg-row.is-other {
    justify-content: flex-start;
}

.chat-msg-card {
    max-width: min(82%, 360px);
    min-width: 120px;
    border-radius: 18px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    word-break: break-word;
    position: relative;
    animation: chatMsgAppear .18s ease;
}

.chat-msg-row.is-other .chat-msg-card {
    background: #ffffff;
    border-top-left-radius: 8px;
    border: 1px solid #eceff3;
}

.chat-msg-row.is-mine .chat-msg-card {
    background: #dff1c7;
    border-top-right-radius: 8px;
    border: 1px solid #cfe5b0;
}

@keyframes chatMsgAppear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg-inner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8dde6, #bfc8d6);
    color: #2f3a4a;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    overflow: hidden;
}

.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-msg-body {
    min-width: 0;
    flex: 1 1 auto;
}

.chat-msg-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.chat-msg-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.chat-msg-time {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
    margin-left: auto;
}

.chat-msg-text {
    font-size: 15px;
    line-height: 1.42;
    color: #1f2937;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-input-area-taxi {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #eef1f4;
    margin-top: 0;
}

.chat-input-wrap-taxi {
    position: relative;
    width: 100%;
}

#chat-input {
    width: 100%;
    resize: none;
    border: 1px solid #d9e0e7;
    border-radius: 18px;
    padding: 13px 54px 13px 14px;
    box-sizing: border-box;
    font: inherit;
    min-height: 50px;
    max-height: 120px;
    line-height: 1.4;
    background: #f8fafc;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#chat-input:focus {
    outline: none;
    background: #fff;
    border-color: #7bb6f0;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
}

#chat-send {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: #2f80ed;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background .2s ease, transform .2s ease, opacity .2s ease;
    padding: 0;
    box-shadow: 0 3px 10px rgba(47,128,237,0.28);
}

#chat-send:hover {
    background: #1d6fd8;
}

#chat-send:active {
    transform: scale(0.96);
}

#chat-send:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

@media screen and (max-width: 768px) {
    .chat-modal-content-taxi {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .chat-modal-topbar {
        height: 56px;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        border-bottom: 1px solid #e9ecef;
        background: #fff;
        flex-shrink: 0;
    }

    .chat-messages-taxi {
        padding: 12px 10px 14px;
        gap: 9px;
        background: #f3f5f8;
    }

    .chat-msg-card {
        max-width: 86%;
        padding: 9px 10px;
        border-radius: 16px;
    }

    .chat-msg-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 12px;
    }

    .chat-msg-name {
        font-size: 13px;
    }

    .chat-msg-time {
        font-size: 11px;
    }

    .chat-msg-text {
        font-size: 14px;
    }

    .chat-input-area-taxi {
        padding: 10px;
    }

    .chat-modal-header-desktop {
        display: none;
    }
}

/* ===== Swal / Taxi action menu ===== */

.swal-taxi-popup {
    width: min(92vw, 520px);
    border-radius: 22px !important;
    padding: 0 !important;
    overflow: hidden;
}

.swal-taxi-title {
    padding: 22px 22px 8px !important;
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: black;
    text-align: left !important;
}

.swal-taxi-html {
    padding: 0 22px 22px !important;
    margin: 0 !important;
    text-align: left !important;
}

.swal-taxi-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.taxi-action-card {
    width: 100%;
    border: 1px solid #e8edf3;
    border-radius: 18px;
    background: #fff;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: .18s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.taxi-action-card:hover {
    transform: translateY(-1px);
    border-color: #cfd8e3;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.taxi-action-card__icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.taxi-action-card--warning .taxi-action-card__icon {
    background: #fff4df;
    color: #d38a00;
}

.taxi-action-card--finish .taxi-action-card__icon {
    background: #eaf8ee;
    color: #1f9d55;
}

.taxi-action-card__body {
    min-width: 0;
    flex: 1 1 auto;
}

.taxi-action-card__title {
    font-size: 16px;
    font-weight: 800;
    color: #151515;
    margin-bottom: 4px;
}

.taxi-action-card__text {
    font-size: 14px;
    line-height: 1.45;
    color: #667085;
}

.taxi-action-card__arrow {
    align-self: center;
    color: #98a2b3;
    font-size: 16px;
}

/* ===== Trip issue modal ===== */

.taxi-issue-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.taxi-issue-note {
    border-radius: 14px;
    background: #f6f8fa;
    border: 1px solid #e7edf3;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #51606f;
}

.taxi-issue-note--danger {
    background: #fff4f4;
    border-color: #ffd2d2;
    color: #9f1c1c;
}

.taxi-issue-group-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.taxi-issue-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.taxi-issue-type {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    cursor: pointer;
    transition: .18s ease;
}

.taxi-issue-type:hover {
    border-color: #cfd8e3;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.taxi-issue-type.is-active {
    border-color: #2f80ed;
    background: #f3f8ff;
    box-shadow: 0 0 0 3px rgba(47,128,237,0.10);
}

.taxi-issue-type.is-danger.is-active {
    border-color: #d92d20;
    background: #fff5f4;
    box-shadow: 0 0 0 3px rgba(217,45,32,0.10);
}

.taxi-issue-type__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.taxi-issue-type__icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.taxi-issue-type[data-type="conflict"] .taxi-issue-type__icon {
    background: #fff5df;
    color: #d38a00;
}

.taxi-issue-type[data-type="stop_request"] .taxi-issue-type__icon {
    background: #eef7ff;
    color: #2f80ed;
}

.taxi-issue-type[data-type="emergency"] .taxi-issue-type__icon {
    background: #fff1f0;
    color: #d92d20;
}

.taxi-issue-type__title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.taxi-issue-type__desc {
    font-size: 13px;
    line-height: 1.45;
    color: #667085;
}

.taxi-issue-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.taxi-issue-reason {
    border: 1px solid #d8dee6;
    background: #fff;
    color: #344054;
    border-radius: 999px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .18s ease;
}

.taxi-issue-reason:hover {
    border-color: #b8c5d6;
    background: #f8fbff;
}

.taxi-issue-reason.is-active {
    border-color: #2f80ed;
    background: #2f80ed;
    color: #fff;
}

.taxi-issue-textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid #d9e0e7;
    border-radius: 16px;
    padding: 14px 15px;
    box-sizing: border-box;
    font: inherit;
    line-height: 1.45;
    background: #fbfcfe;
    transition: .18s ease;
    font-size: 14px;
}

.taxi-issue-textarea:focus {
    outline: none;
    border-color: #7bb6f0;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
}

.taxi-issue-footer {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.taxi-issue-btn {
    flex: 1 1 0;
    min-height: 48px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.taxi-issue-btn--ghost {
    background: #eef2f6;
    color: #344054;
}

.taxi-issue-btn--ghost:hover {
    background: #e3e9f0;
}

.taxi-issue-btn--submit {
    background: #111827;
    color: #fff;
}

.taxi-issue-btn--submit:hover {
    background: #0b1220;
}

.taxi-issue-btn--danger {
    background: #d92d20;
    color: #fff;
}

.taxi-issue-btn--danger:hover {
    background: #b42318;
}

@media (max-width: 768px) {
    .swal-taxi-title {
        padding: 20px 16px 8px !important;
        font-size: 21px !important;
    }

    .swal-taxi-html {
        padding: 0 16px 16px !important;
    }

    .taxi-action-card {
        padding: 14px;
        border-radius: 16px;
    }

    .taxi-issue-footer {
        flex-direction: column;
    }

    .taxi-issue-btn {
        width: 100%;
    }
}

.chat-empty-state {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 18px;
    color: #6b7280;
}

.chat-empty-state.is-hidden {
    display: none;
}

.chat-empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eaf2ff;
    color: #2f80ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
    box-shadow: 0 6px 18px rgba(47,128,237,0.10);
}

.chat-empty-state__title {
    font-size: 17px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
}

.chat-empty-state__text {
    font-size: 14px;
    line-height: 1.45;
    max-width: 280px;
}

@media screen and (max-width: 768px) {
    .chat-empty-state {
        padding: 24px 16px;
    }

    .chat-empty-state__icon {
        width: 58px;
        height: 58px;
        font-size: 24px;
        margin-bottom: 12px;
    }

    .chat-empty-state__title {
        font-size: 16px;
    }

    .chat-empty-state__text {
        font-size: 13px;
        max-width: 240px;
    }

      .order-details-card,
      .request-detail-card,
      .taxi-detail-card {
        max-height: calc(100vh - 90px - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
      }

      .order-details-list__extras {
        align-items: flex-start;
      }

      .order-extra-wrap {
        max-height: 180px;
        -webkit-overflow-scrolling: touch;
        padding-right: 6px;
        margin-top: 4px;
      }

      .taxi-extra-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .taxi-extra-comment {
        margin-top: 10px;
        word-break: break-word;
      }
    .order-details-card {
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }

    .order-extra-wrap {
        max-height: none;
        overflow: visible;
    }
}


.taxi-extra-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.taxi-extra-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef5ff;
    border: 1px solid #cfe0ff;
    color: #2a7ae2;
    font-size: 13px;
    line-height: 1.2;
}

.taxi-extra-comment {
    padding: 10px 12px;
    background: #f8f9fb;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    color: #333;
    line-height: 1.4;
}

.order-details-list__extras {
    align-items: flex-start;
}

.order-extra-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


@media screen and (max-width: 768px) {
    .driver-panel {
        max-height: calc(100dvh - 50px - env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .driver-panel .extra-info {
        width: 100%;
        overflow: hidden;
        min-height: 0;
    }

    .order-details-card {
        background: #f9fafb;
        border-radius: 16px;
        padding: 5px 5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        margin-bottom: 12px;

        max-height: var(--details-max-height, 320px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }

    .order-extra-wrap {
        max-height: none;
        overflow: visible;
    }
}