.andpro-delivery {
    --ad-ink: #2c3a47;
    --ad-muted: #5a6b7a;
    --ad-soft: #7a8a99;
    --ad-primary: #575fcf;
    --ad-primary-soft: #f0f1ff;
    --ad-border: #dfe4ee;
    --ad-surface: #f7f8fb;
    --ad-success: #198754;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding: 16px;
    color: var(--ad-ink);
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: 12px;
    font-family: inherit;
}

.andpro-delivery *,
.andpro-delivery *::before,
.andpro-delivery *::after {
    box-sizing: border-box;
}

.andpro-delivery [hidden] {
    display: none !important;
}

.andpro-delivery__head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.andpro-delivery__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--ad-primary);
    background: var(--ad-primary-soft);
    border-radius: 10px;
}

.andpro-delivery__heading {
    min-width: 0;
}

.andpro-delivery__title,
.andpro-delivery__lead,
.andpro-delivery__hint,
.andpro-delivery__note,
.andpro-delivery__quote-name,
.andpro-delivery__quote-meta,
.andpro-delivery__fallback-title,
.andpro-delivery__fallback-text {
    margin: 0;
}

.andpro-delivery__title {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ad-ink);
}

.andpro-delivery__lead {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ad-muted);
}

.andpro-delivery__city-button {
    display: inline-flex;
    min-width: 0;
    min-height: 46px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ad-primary);
    background: #fff;
    border: 1px solid #cfd4ff;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

.andpro-delivery__city-button:hover {
    background: var(--ad-primary-soft);
}

.andpro-delivery__city-button:focus-visible,
.andpro-delivery__input:focus-visible,
.andpro-delivery__option:focus-visible {
    outline: 3px solid rgba(87, 95, 207, .22);
    outline-offset: 2px;
}

.andpro-delivery__city-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf0f5;
}

.andpro-delivery__label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--ad-ink);
}

.andpro-delivery__combobox {
    position: relative;
}

.andpro-delivery__input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--ad-ink);
    background: #fff;
    border: 1px solid #cbd3df;
    border-radius: 9px;
    font: inherit;
    font-size: 16px;
    line-height: 1.25;
    -webkit-appearance: none;
    appearance: none;
}

.andpro-delivery__input::placeholder {
    color: var(--ad-soft);
}

.andpro-delivery__options {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 238px;
    overflow-y: auto;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(44, 58, 71, .12);
}

.andpro-delivery__option {
    display: flex;
    width: 100%;
    min-height: 46px;
    padding: 9px 10px;
    align-items: center;
    color: var(--ad-ink);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.andpro-delivery__option:hover,
.andpro-delivery__option[aria-selected="true"] {
    color: var(--ad-primary);
    background: var(--ad-primary-soft);
}

.andpro-delivery__hint,
.andpro-delivery__note {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ad-soft);
}

.andpro-delivery__status {
    display: flex;
    min-height: 44px;
    margin-top: 14px;
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
    color: var(--ad-muted);
    background: var(--ad-surface);
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.35;
}

.andpro-delivery__loader {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #d8dcf7;
    border-top-color: var(--ad-primary);
    border-radius: 50%;
    animation: andpro-delivery-spin .75s linear infinite;
}

.andpro-delivery__quotes {
    display: grid;
    margin-top: 14px;
    gap: 8px;
}

.andpro-delivery__quote {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    min-width: 0;
    padding: 12px;
    background: var(--ad-surface);
    border: 1px solid #ebedf3;
    border-radius: 10px;
}

.andpro-delivery__quote-main {
    min-width: 0;
}

.andpro-delivery__quote-name {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ad-ink);
}

.andpro-delivery__quote-meta {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ad-muted);
}

.andpro-delivery__quote-price {
    align-self: center;
    white-space: nowrap;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 750;
    color: var(--ad-ink);
}

.andpro-delivery__badge {
    display: inline-flex;
    min-height: 22px;
    margin-top: 8px;
    padding: 3px 8px;
    align-items: center;
    color: var(--ad-success);
    background: #eaf7f0;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.andpro-delivery__badge--estimate {
    color: #7a5500;
    background: #fff4d6;
}

.andpro-delivery__fallback {
    padding: 12px;
    background: #fff8e7;
    border: 1px solid #f3dfab;
    border-radius: 10px;
}

.andpro-delivery__fallback-title {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ad-ink);
}

.andpro-delivery__fallback-text {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ad-muted);
}

@keyframes andpro-delivery-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .andpro-delivery__loader { animation: none; }
}

@media (max-width: 560px) {
    .andpro-delivery {
        padding: 14px;
        border-radius: 10px;
    }

    .andpro-delivery__head {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .andpro-delivery__city-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .andpro-delivery__quote {
        grid-template-columns: minmax(0, 1fr);
    }

    .andpro-delivery__quote-price {
        align-self: auto;
    }
}
