:root {
    --primary-color: #d99a18;
    --primary-color-dark: #b97900;
}

/* Keep custom glass surfaces, but use the shared base surface on auth cards. */
.driver-auth-card.bg-base {
    background-color: #ffffffc2 !important;
    border-color: #ffffffd9 !important;
}

.driver-auth-shell {
    min-height: calc(100dvh - 1.5rem);
    display: flex;
    flex-direction: column;
    padding-bottom: .8rem;
}

.driver-auth-credit {
    margin-top: auto !important;
    padding: 1.25rem .25rem .35rem;
}

.driver-auth-credit a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: .35rem;
}

.driver-auth-credit .raayasun-mark {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 46, 80, .12);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(16, 46, 80, .08);
}

.driver-auth-credit .raayasun-mark img {
    position: absolute;
    inset: 3px;
    z-index: 2;
    width: 22px;
    height: 22px;
    object-fit: contain;
    background: #fff;
}

.driver-auth-credit .raayasun-mark-fallback {
    font-size: .72rem;
    font-weight: 800;
    color: #5f328c;
    background: #fff;
}

/* Text should not inherit the accent yellow where readability matters. */
.text-primary,
.btn-link.text-primary {
    color: var(--primary-color-dark) !important;
}

/* Entity photos on the map are real avatars: crop them as circles. */
.leaflet-marker-icon.tak30-entity-photo-marker {
    border-radius: 50% !important;
    object-fit: cover !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 8px rgba(16, 46, 80, .28) !important;
}

.leaflet-marker-icon[src*="/payk.png"] {
    border-radius: 50% !important;
    background: #fff !important;
    padding: 2px !important;
    box-shadow: 0 2px 8px rgba(16, 46, 80, .18) !important;
}

/* Ticket rows need a little more breathing room without changing the list component. */
.driver-ticket-item {
    margin-bottom: 1.15rem !important;
    padding-block: .22rem;
}

/* Delivery details: use the same floating bottom-sheet rhythm as the confirmed-order tabs. */
.order-details-sheet {
    left: 8px !important;
    right: 8px !important;
    bottom: 60px !important;
    max-height: calc(100dvh - 190px) !important;
    padding: .75rem .85rem .35rem !important;
    border-radius: 1.8rem 1.8rem 0 0 !important;
    background: #ffffffee !important;
    backdrop-filter: blur(10px);
    overflow-y: auto !important;
    overscroll-behavior: contain;
    box-shadow: 0 -10px 34px rgba(16, 46, 80, .08);
    transition: transform 300ms ease-in-out;
}

/* bottom_nav injects .card-larg { padding-bottom: 5rem !important; } after the stylesheets. */
.card-larg.order-details-sheet {
    padding-bottom: .35rem !important;
}

.order-details-sheet.close {
    transform: translateY(calc(100% - 6rem));
    overflow-y: hidden !important;
}

.order-details-sheet .card-body {
    padding-bottom: 0 !important;
}

.order-details-grabber {
    margin: -.15rem auto .35rem !important;
    padding-bottom: .2rem !important;
    cursor: pointer;
}

.order-details-hero {
    padding: .15rem 0 .55rem !important;
}

.order-details-eyebrow {
    font-size: .66rem;
    color: var(--text-color-light);
    margin-bottom: .05rem;
}

.order-details-destination-only {
    padding: .6rem .7rem !important;
    margin-bottom: .45rem;
}

.order-details-action {
    margin: .45rem 0 !important;
}

.order-details-section {
    padding-top: .55rem !important;
    margin-top: .55rem !important;
}

.order-details-progress-section {
    padding-bottom: 0;
}

/* Middle ground: tighter than the legacy timeline, but not cramped. */
.order-details-progress-section .d-flex.flex-column {
    gap: .5rem;
    margin-top: .55rem !important;
}

.order-details-progress-section .d-flex.flex-column > .d-flex {
    margin-bottom: 0 !important;
}

.order-details-progress-section .position-relative.me-2 > .position-absolute.top-100 {
    height: 39px !important;
}

.order-details-contacts-section {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.order-details-contact-row {
    width: 100%;
    min-width: 0;
    padding: .5rem .65rem;
    border-radius: 1.05rem;
    background: rgba(246, 248, 250, .92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.order-details-contact-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .55rem;
    flex: 1;
}

.order-details-contact-main {
    min-width: 0;
}

.order-details-avatar-sm {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
}

.order-details-contact-phone-action {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-inline-start: auto;
    flex: 0 0 auto;
}

.order-details-phone {
    margin: 0;
    font-size: .66rem;
    color: var(--text-color-light);
    white-space: nowrap;
    line-height: 1;
}

.order-details-contact-row .btn-circle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

.order-details-support-section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.order-details-support-row {
    min-height: 48px;
    padding: .25rem 0 0;
    margin: 0 !important;
}

.order-details-support-section .order-details-avatar-fallback {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 1rem;
}

@media (max-width: 390px) {
    .order-details-sheet {
        left: 5px !important;
        right: 5px !important;
        max-height: calc(100dvh - 180px) !important;
        padding-inline: .65rem !important;
    }

    .order-details-contact-phone-action {
        gap: .3rem;
    }

    .order-details-phone {
        font-size: .62rem;
    }
}

@media (max-width: 380px) {
    .driver-auth-shell { min-height: calc(100dvh - .75rem); }
    .driver-auth-credit { padding-top: .9rem; }
}
