.bts-courier-map-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.bts-courier-map-modal .modal-header {
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.bts-courier-map-wrap {
    position: relative;
    height: min(52vh, 420px);
    background: #eef1f4;
    border-radius: 12px;
    overflow: hidden;
}

.bts-courier-map {
    width: 100%;
    height: 100%;
}

.bts-courier-map-center-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -100%);
    z-index: 5;
    pointer-events: none;
    color: #f56600;
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 5px 12px rgba(32, 36, 45, 0.28));
}

.bts-courier-map-search {
    position: absolute;
    left: 12px;
    right: 56px;
    top: 12px;
    z-index: 8;
}

.bts-courier-map-search > i {
    position: absolute;
    left: 14px;
    top: 14px;
    color: #656d76;
    pointer-events: none;
}

.bts-courier-map-search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: #24292f;
    font-size: 15px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.16);
}

.bts-courier-map-search-input:focus {
    outline: 2px solid #f56600;
    outline-offset: 0;
}

.bts-courier-map-suggest {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px 0;
    max-height: min(240px, 38vh);
    overflow-y: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.bts-courier-map-suggest[hidden] {
    display: none;
}

.bts-courier-map-suggest-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    color: #24292f;
    cursor: pointer;
}

.bts-courier-map-suggest-item:hover,
.bts-courier-map-suggest-item.is-active {
    background: #fff7f0;
}

.bts-courier-map-suggest-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.bts-courier-map-suggest-sub {
    display: block;
    margin-top: 2px;
    color: #656d76;
    font-size: 12px;
    line-height: 1.35;
}

.bts-courier-map-suggest-empty {
    padding: 12px 14px;
    color: #656d76;
    font-size: 13px;
}

.bts-courier-map-zoom {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bts-courier-map-zoom button,
.bts-courier-map-locate {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #fff;
    color: #24292f;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.bts-courier-map-locate {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #f56600;
}

.bts-courier-map-locate:disabled {
    opacity: 0.65;
}

.bts-courier-map-locate.is-busy i {
    animation: fa-spin 1s linear infinite;
}

.bts-courier-map-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    z-index: 7;
    color: #f56600;
}

.bts-courier-map-loader.is-visible {
    display: flex;
}

.bts-courier-map-meta {
    min-height: 24px;
    margin: 12px 0 0;
    color: #57606a;
    font-size: 14px;
}

.bts-courier-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.bts-courier-map-actions .btn {
    border-radius: 12px;
    min-height: 48px;
    font-weight: 600;
}

.bts-courier-map-actions .btn-primary {
    background: #f56600;
    border-color: #f56600;
}

.bts-courier-map-actions .btn-primary:hover {
    background: #dc5c00;
    border-color: #dc5c00;
}

.bts-courier-location {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.bts-courier-location .form-control {
    flex: 1 1 auto;
}

.bts-courier-map-btn {
    flex: 0 0 48px;
    width: 48px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: #f56600;
    font-size: 18px;
}

.bts-courier-trucks-wrap {
    position: relative;
}

.bts-courier-trucks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bts-courier-truck {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid #eaeef2;
    border-radius: 16px;
    background: #f6f8fa;
    color: #24292f;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bts-courier-truck img {
    width: 88px;
    height: 60px;
    object-fit: contain;
}

.bts-courier-truck.is-active {
    border-color: #f56600;
    background: #fff7f0;
}

.bts-courier-truck-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.bts-courier-truck-skeleton {
    height: 118px;
    border-radius: 16px;
    background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 50%, #f1f3f5 75%);
    background-size: 200% 100%;
    animation: bts-courier-shimmer 1.2s linear infinite;
}

@keyframes bts-courier-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.bts-courier-success {
    text-align: center;
    padding: 12px 8px 4px;
}

.bts-courier-success__icon {
    color: #2da44e;
    font-size: 42px;
    margin-bottom: 12px;
}

.bts-courier-success__barcode {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: #f6f8fa;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #24292f;
    cursor: pointer;
    appearance: none;
}

.bts-courier-success__barcode:hover,
.bts-courier-success__barcode:focus-visible {
    background: #eef2f6;
}

.bts-courier-success__barcode:focus-visible {
    outline: 2px solid #0969da;
    outline-offset: 2px;
}

.bts-courier-success__barcode i {
    font-size: 16px;
    color: #656d76;
}

.bts-courier-success__barcode.is-copied i {
    color: #2da44e;
}

.bts-courier-success__hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #656d76;
}

.bts-courier-success__hint.is-copied {
    color: #2da44e;
}

#bts-courier-form .figma-field-label.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
    font-weight: 600;
}

#bts-courier-form .field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
}

#bts-courier-form .figma-field.has-field-error,
#bts-courier-form .bts-courier-trucks.has-field-error {
    box-shadow: 0 0 0 1px #dc3545;
}

#bts-courier-form .calc-captcha-image .row {
    align-items: stretch;
}

#bts-courier-form .calc-captcha-image .col-7 {
    display: flex;
}

#bts-courier-form .calc-captcha-image img {
    cursor: pointer;
    border-radius: 6px;
    height: 100%;
    object-fit: contain;
}

#bts-courier-form #bts-courier-verify-code {
    flex: 1;
    height: 48px;
    min-height: 48px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#bts-courier-form .calc-captcha-hint {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

#bts-courier-form .calc-submit-col {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

#bts-courier-alert {
    --bs-alert-bg: #fff5f5;
    --bs-alert-border-color: transparent;
    --bs-alert-color: #cf222e;
    margin-top: 20px;
    margin-bottom: 0;
    border: none;
    border-radius: 16px;
    background: #fff5f5;
    color: #cf222e;
    font-size: 15px;
    font-weight: 500;
}

#bts-courier-loading {
    margin-top: 12px;
    color: #777;
}

#bts-courier-loading .fa-spin {
    color: #f56600;
    margin-right: 0.35rem;
}

@media (max-width: 767px) {
    .bts-courier-trucks {
        display: flex;
        grid-template-columns: none;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 2px 20px 6px 2px;
        margin-inline: -2px;
    }

    .bts-courier-trucks::-webkit-scrollbar {
        display: none;
    }

    .bts-courier-trucks-wrap::after {
        content: '';
        position: absolute;
        top: 2px;
        right: 0;
        bottom: 6px;
        width: 28px;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
    }

    .bts-courier-truck,
    .bts-courier-truck-skeleton {
        flex: 0 0 44%;
        width: 44%;
        min-width: 128px;
        max-width: 168px;
        scroll-snap-align: start;
    }

    #bts-courier-form .bts-courier-trucks.has-field-error {
        box-shadow: none;
        outline: 1px solid #dc3545;
        outline-offset: 2px;
        border-radius: 16px;
    }

    .bts-courier-truck-skeleton {
        height: 112px;
    }

    .bts-courier-map-wrap {
        height: 48vh;
    }
}
