/* ========== Блок «Пункт выдачи рядом с домом» (pvz-block.js, XSL 56) ========== */
.pvzb {
    margin: 16px 0 0;
    padding: 16px;
    border: 1.5px solid #5B4BB7;
    border-radius: 12px;
    background: #f7f5fd;
    text-align: left;
    font-size: 14px;
    line-height: 1.45;
    color: #222;
}
.pvzb__logos { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pvzb__logos img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.pvzb__title { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: #2b2266; }
/* Верх блока собирает pvz-block.js (renderHead) — без JS остаётся старый .pvzb__title */
.pvzb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
/* логотипы столбиком слева — так заголовок помещается справа даже в узкой колонке карточки (~300 px);
   если места совсем нет (min-width), заголовок переносится под логотипы */
.pvzb-head .pvzb__logos { margin-bottom: 0; flex-shrink: 0; flex-direction: column; gap: 6px; }
.pvzb-head .pvzb__logos img { width: 30px; height: 30px; }
.pvzb-head__title { flex: 1 1 160px; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: #2b2266; }
.pvzb-head__title span { display: block; }
.pvzb-lead { margin: 0 0 4px; font-size: 15px; color: #5B4BB7; line-height: 1.4; }
.pvzb-hint { margin: 0 0 12px; font-size: 13px; color: #888; line-height: 1.4; }

.pvzb-city { margin-bottom: 8px; font-size: 15px; border-radius: 8px; transition: box-shadow .3s; }
.pvzb-city--need { box-shadow: 0 0 0 3px rgba(91, 75, 183, .35); }
.pvzb-city__label { color: #555; }
.pvzb-city__name { color: #5B4BB7; font-size: 16px; }
.pvzb-city__change {
    background: none; border: 0; padding: 0 0 0 4px;
    color: #5B4BB7; text-decoration: underline; font-size: 14px; cursor: pointer;
}
.pvzb-city__ask { display: block; margin: 0 0 6px; font-weight: 600; color: #2b2266; }
.pvzb-city__form { display: flex; gap: 6px; }
.pvzb-city__input {
    flex: 1; min-width: 0; height: 42px; padding: 0 12px;
    border: 1px solid #c9c2ec; border-radius: 8px; font-size: 16px; background: #fff;
}
.pvzb-city__input:focus { outline: none; border-color: #5B4BB7; }
.pvzb-city__ok {
    height: 42px; padding: 0 16px; border: 0; border-radius: 8px;
    background: #5B4BB7; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
}

.pvzb__count { margin-bottom: 8px; color: #333; }
.pvzb__count:empty, .pvzb__prices:empty { display: none; }
.pvzb__count strong { color: #5B4BB7; }

.pvzb__prices { margin-bottom: 12px; background: #fff; border-radius: 8px; padding: 8px 12px; }
.pvzb-prices__title { font-size: 13px; color: #777; margin-bottom: 4px; }
.pvzb-price {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; align-items: center;
    column-gap: 10px; padding: 6px 0; border-top: 1px solid #f0eefa;
}
.pvzb-prices__title + .pvzb-price { border-top: 0; }
.pvzb-price__svc { font-weight: 600; min-width: 0; }
.pvzb-price__sub { font-weight: 400; color: #888; font-size: 13px; }
.pvzb-price__days { color: #777; white-space: nowrap; }
.pvzb-price__sum { font-weight: 700; color: #2b2266; white-space: nowrap; text-align: right; align-self: start; padding-top: 1px; }
.pvzb-price--best .pvzb-price__sum { color: #5B4BB7; }
.pvzb-badge {
    display: table; margin: 3px 0 0 auto; padding: 2px 7px; border-radius: 10px;
    background: #5B4BB7; color: #fff; font-size: 11px; font-weight: 600; line-height: 1.4;
}
.pvzb-price__wait { color: #7c6dd8; font-weight: 400; font-size: 13px; }
.pvzb--kit-row .pvzb__kit { display: none; }
.pvzb-kit-pick {
    grid-column: 1 / -1; height: 34px; margin-top: 4px; border: 1px solid #5B4BB7; border-radius: 8px;
    background: #fff; color: #5B4BB7; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* --- Количество --- */
.pvzb-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.pvzb-qty:empty { display: none; }
.pvzb-qty__label { color: #555; margin-right: 4px; }
.pvzb-qty__ctrl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } /* «− 5 +» переносится целиком */
.pvzb-qty__btn {
    width: 36px; height: 36px; border: 1px solid #c9c2ec; border-radius: 8px;
    background: #fff; color: #5B4BB7; font-size: 20px; line-height: 1; cursor: pointer;
}
.pvzb-qty__input {
    width: 52px; height: 36px; border: 1px solid #c9c2ec; border-radius: 8px;
    text-align: center; font-size: 16px; background: #fff; -moz-appearance: textfield;
}
.pvzb-qty__input::-webkit-outer-spin-button, .pvzb-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pvzb-loading { color: #7c6dd8; font-size: 13px; }

.pvzb__btn {
    display: block; width: 100%; min-height: 46px; padding: 10px 14px;
    border: 0; border-radius: 10px; background: #5B4BB7; color: #fff;
    font-size: 16px; font-weight: 600; cursor: pointer;
}
.pvzb__btn:hover { background: #4a3c9e; }
.pvzb__kit { margin: 10px 0 0; font-size: 13px; color: #666; }
.pvzb__nojs { margin: 8px 0 0; font-size: 13px; color: #666; }
.pvzb--js .pvzb__nojs { display: none; }

/* --- Окно с пунктами выдачи --- */
.pvzb-modal {
    display: none; position: fixed; inset: 0; z-index: 100000;
    background: rgba(0, 0, 0, .55); align-items: center; justify-content: center; padding: 20px;
}
.pvzb-modal.is-open { display: flex; }
.pvzb-modal [hidden] { display: none !important; } /* у .pvzb-cdek свой display:flex — без этого hidden не прячет */
.pvzb-modal__box {
    position: relative; display: flex; flex-direction: column; width: 100%; max-width: 760px;
    height: 85vh; max-height: 680px; background: #fff; border-radius: 12px; overflow: hidden;
}
.pvzb-modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.pvzb-modal__title { font-weight: 700; font-size: 16px; color: #2b2266; }
.pvzb-modal__close {
    background: none; border: 0; font-size: 30px; line-height: 1; color: #888; cursor: pointer; padding: 0 4px;
}
.pvzb-tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid #eee; }
.pvzb-tab {
    flex: 1; padding: 11px 8px; border: 0; border-bottom: 3px solid transparent;
    background: #fff; font-size: 15px; font-weight: 600; color: #777; cursor: pointer;
}
.pvzb-tab.is-active { color: #5B4BB7; border-bottom-color: #5B4BB7; }
.pvzb-pane { display: none; flex: 1; min-height: 0; position: relative; z-index: 0; } /* z-index виджета Яндекса — внутри панели */
.pvzb-pane.is-active { display: flex; flex-direction: column; }
.pvzb-yd { flex: 1; min-height: 0; }
.pvzb-yd-hint { flex-shrink: 0; padding: 8px 16px; background: #f7f5fd; color: #2b2266; font-size: 13px; border-bottom: 1px solid #eee; }
.pvzb-cdek { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pvzb-fallback-note {
    flex-shrink: 0; padding: 10px 16px; background: #fff7e6; border-bottom: 1px solid #f5d9a8;
    color: #7a4b00; font-size: 14px; line-height: 1.4;
}
.pvzb-cdek__search { padding: 10px 16px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.pvzb-cdek__search input {
    width: 100%; height: 40px; padding: 0 12px; box-sizing: border-box;
    border: 1px solid #ddd; border-radius: 8px; font-size: 16px;
}
.pvzb-cdek__items { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pvzb-cdek__item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.pvzb-cdek__info { flex: 1; min-width: 0; }
.pvzb-cdek__pick {
    flex-shrink: 0; height: 34px; padding: 0 12px; border: 1px solid #5B4BB7; border-radius: 8px;
    background: #fff; color: #5B4BB7; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pvzb-cdek__item.is-chosen { background: #f1eefc; box-shadow: inset 4px 0 0 #5B4BB7; }
.pvzb-cdek__item.is-chosen .pvzb-cdek__pick { background: #5B4BB7; color: #fff; }
.pvzb-cdek__item.is-chosen .pvzb-cdek__pick::before { content: "\2713\00a0"; }

/* --- Плашка выбранного пункта --- */
.pvzb-chosen {
    display: none; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 10px 16px 12px; border-top: 2px solid #5B4BB7; background: #f7f5fd;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
}
/* Плашка лежит поверх низа окна: в списке СДЭК оставляем под неё место */
.pvzb-modal.has-chosen .pvzb-cdek__items { padding-bottom: 140px; }
/* После выбора пункта Яндекса прячем «Продолжить» виджета — кнопка у человека одна, наша */
.pvzb-modal.is-yd-chosen #pvzbYdWidget .widget__list-button { display: none !important; }
.pvzb-chosen.is-shown { display: block; }
.pvzb-chosen__text { font-size: 14px; margin-bottom: 8px; line-height: 1.4; }
.pvzb-chosen__label { color: #5B4BB7; font-weight: 700; }
.pvzb-chosen__addr { font-weight: 600; }
.pvzb-chosen__meta { color: #555; white-space: nowrap; }
.pvzb-chosen__btn {
    display: block; width: 100%; min-height: 46px; border: 0; border-radius: 10px;
    background: #5B4BB7; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.pvzb-chosen__btn:disabled { opacity: .7; }
.pvzb-cdek__addr { font-weight: 600; font-size: 14px; }
.pvzb-cdek__note, .pvzb-cdek__time { font-size: 13px; color: #777; margin-top: 2px; }
.pvzb-empty { padding: 24px 16px; text-align: center; color: #777; }

@media (max-width: 600px) {
    .pvzb { padding: 14px 12px; }
    /* телефон: служба на всю строку, ниже срок слева и цена справа — колонка цен та же */
    .pvzb-price { grid-template-columns: minmax(0, 1fr) 84px; row-gap: 2px; }
    .pvzb-price__svc { grid-column: 1 / -1; }
    .pvzb-head__title { font-size: 15px; }
    .pvzb-chosen__meta { white-space: normal; }
    .pvzb-modal { padding: 0; }
    .pvzb-modal__box { max-width: none; height: 100%; max-height: none; border-radius: 0; }
    @supports (height: 100dvh) { .pvzb-modal__box { height: 100dvh; } }
}

/* --- Калькулятор на главной: тот же блок, компактнее --- */
.calc-wrapper .pvzb {
    margin: 0; padding: 16px 24px 24px;
    background: linear-gradient(135deg, #f0f8f3, #e0f0e6);
    border: 1px solid #b8d8c4; border-top: 0; border-radius: 0 0 18px 18px;
}
.calc-wrapper .pvzb-head { margin-bottom: 6px; }
.calc-wrapper .pvzb-calc-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: #2b2266; }
.calc-wrapper .pvzb-lead { font-size: 14px; margin-bottom: 8px; }
.calc-wrapper .pvzb-city { margin-bottom: 6px; font-size: 14px; }
.calc-wrapper .pvzb__count { margin-bottom: 6px; font-size: 13px; }
.calc-wrapper .pvzb-qty { margin-bottom: 8px; }
.calc-wrapper .pvzb__prices { margin-bottom: 10px; padding: 6px 10px; }
.calc-wrapper .pvzb-price { padding: 5px 0; }
.calc-wrapper .pvzb__btn { min-height: 42px; font-size: 15px; }
.calc-wrapper .pvzb__kit { margin-top: 8px; font-size: 12px; }
