.fivepost-box {
    margin: 0 0 1.5em;
    padding: 1em 1.2em;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}
.fivepost-box h3 { margin: 0 0 .7em; font-size: 1.1em; }
.fivepost-field { position: relative; margin: 0 0 .9em; }
.fivepost-field label { display: block; margin-bottom: .35em; font-weight: 600; font-size: 1.05em; }
#fivepost-city-input, .fivepost-city-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    height: auto !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 8px !important;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
#fivepost-city-input:focus, .fivepost-city-input:focus {
    border-color: #1f9d55 !important;
    box-shadow: 0 0 0 3px rgba(31, 157, 85, .15) !important;
    outline: none;
}

.fivepost-suggest {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    position: absolute;
    z-index: 30;
    left: 0; right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    display: none;
}
.fivepost-suggest li { padding: .5em .7em; cursor: pointer; }
.fivepost-suggest li:hover { background: #f0f0f0; }

.fivepost-msg { display: block; margin-top: .3em; color: #b40000; font-size: .9em; }

/* pick-point button */
.fivepost-map-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    padding: 13px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #1f9d55 !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(31, 157, 85, .35);
    cursor: pointer;
    line-height: 1.2 !important;
    text-decoration: none !important;
    transition: background .15s, transform .05s, box-shadow .15s;
}
.fivepost-map-btn:hover {
    background: #18863f !important;
    box-shadow: 0 4px 14px rgba(31, 157, 85, .45);
}
.fivepost-map-btn:active { transform: translateY(1px); }
.fivepost-map-btn__ico { flex: 0 0 auto; }

.fivepost-chosen { margin-top: .6em; font-size: .95em; }
.fivepost-chosen__label { font-weight: 600; }
.fivepost-chosen__price { color: #1f9d55; font-weight: 600; }
.fivepost-chosen__term { color: #555; }
.fivepost-pop__price { color: #1f9d55; }
.fivepost-pop__term { color: #444; font-size: .95em; }

/* кастомный чекбокс, появляющийся после выбора пункта */
.fivepost-option-wrap { margin-top: .9em; }
.fivepost-option {
    /* display:flex через !important — WooCommerce Blocks принудительно делает
       label { display:block }, из-за чего слетал flex (нет отступа/выравнивания). */
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: .9em;
    padding: 11px 13px;
    border: 1px solid #cfe6d8;
    border-radius: 8px;
    background: #f1faf4;
    cursor: pointer;
    line-height: 1.4;
}
/* Размер и насыщенность шрифта — с повышенной специфичностью и !important,
   иначе правила чекаута WooCommerce (жирный ~17.6px) перебивают. */
.fivepost-box .fivepost-option,
.fivepost-box .fivepost-option span {
    font-size: 13.6px !important;
    font-weight: 400 !important;
}
.fivepost-option-wrap .fivepost-option { margin-top: 0; }
.fivepost-option input[type="checkbox"] {
    margin: 1px 0 0;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #1f9d55;
    cursor: pointer;
}

/* map modal */
.fivepost-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(17, 22, 26, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.fivepost-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vh 3vw;
    box-sizing: border-box;
}
.fivepost-modal__inner {
    width: 100%;
    max-width: 1180px;
    height: 92vh;
    max-height: 940px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
    animation: fivepost-pop-in .18s ease-out;
}
@keyframes fivepost-pop-in {
    from { opacity: 0; transform: translateY(12px) scale(.99); }
    to   { opacity: 1; transform: none; }
}
.fivepost-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid #eee;
    background: #fff;
}
.fivepost-modal__title {
    font-size: 1.15em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}
.fivepost-modal__title::before {
    content: "";
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #1f9d55;
    box-shadow: 0 0 0 4px rgba(31, 157, 85, .18);
    flex: 0 0 auto;
}
.fivepost-modal__close {
    border: 0;
    background: #f1f2f3;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 1.4em;
    line-height: 1;
    color: #444;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex: 0 0 auto;
}
.fivepost-modal__close:hover { background: #e4e6e8; color: #111; }

/* street/address search */
.fivepost-search { position: relative; padding: 12px 18px; border-bottom: 1px solid #eee; }
.fivepost-search-suggest {
    position: absolute;
    left: 18px; right: 18px;
    top: calc(100% - 2px);
    z-index: 20;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.fivepost-search-suggest__item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f2f2f2;
}
.fivepost-search-suggest__item:last-child { border-bottom: 0; }
.fivepost-search-suggest__item:hover { background: #f1faf4; }
.fivepost-search-suggest__empty { padding: 10px 14px; color: #888; font-size: .92em; }
.fivepost-search__input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 15px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}
.fivepost-search__input:focus {
    border-color: #1f9d55;
    box-shadow: 0 0 0 3px rgba(31, 157, 85, .15);
    outline: none;
}
.fivepost-search__status {
    margin-top: 6px;
    font-size: .88em;
    color: #666;
    min-height: 1.2em;
}
.fivepost-list__dist { color: #1f9d55; }

/* geocoded search-result marker — visually distinct from the green pickup-point dots */
.fivepost-search-marker {
    width: 18px; height: 18px;
    border-radius: 50% 50% 50% 0;
    background: #e0393e;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
    transform: rotate(-45deg);
}

/* body: point list + map */
.fivepost-modal__body { flex: 1 1 auto; display: flex; min-height: 0; }
.fivepost-list { flex: 0 0 340px; width: 340px; overflow-y: auto; border-right: 1px solid #eee; }
.fivepost-list__item {
    padding: 11px 16px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background .1s;
}
.fivepost-list__item:hover { background: #f1faf4; }
.fivepost-list__addr { font-weight: 600; }
.fivepost-list__meta { color: #555; font-size: .9em; margin-top: 2px; }
.fivepost-list__empty, .fivepost-list__more { padding: 14px 16px; color: #888; font-size: .92em; }

.fivepost-map { flex: 1 1 auto; min-height: 0; }
.fivepost-map .maplibregl-map { height: 100%; }

@media (max-width: 760px) {
    .fivepost-modal__body { flex-direction: column; }
    .fivepost-list { flex: 0 0 42%; width: auto; border-right: 0; border-bottom: 1px solid #eee; }
}

/* point popup on the map — enlarged */
.maplibregl-popup-content {
    padding: 16px 18px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .24) !important;
}
.maplibregl-popup-close-button {
    font-size: 22px !important;
    width: 28px; height: 28px;
    padding: 0 !important;
    color: #888;
}
.maplibregl-popup-close-button:hover { color: #222; background: none !important; }
.fivepost-pop { font-size: 15px; line-height: 1.5; padding-right: 6px; }
.fivepost-pop > b { font-size: 1.15em; display: inline-block; margin-bottom: 2px; }
.fivepost-pop__type { color: #444; font-size: 1.05em; font-weight: 500; }
.fivepost-pop__price { color: #1f9d55; font-size: 1.1em; display: inline-block; margin-top: 4px; }
.fivepost-pick {
    display: block;
    width: 100%;
    margin-top: 12px !important;
    padding: 11px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #1f9d55 !important;
    border: 0 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background .15s;
}
.fivepost-pick:hover { background: #18863f !important; }

@media (max-width: 640px) {
    .fivepost-modal.is-open { padding: 0; }
    .fivepost-modal__inner { height: 100%; max-height: none; border-radius: 0; }
}

/* Пояснение вместо «Бесплатно» у ставки-заглушки (город/пункт ещё не выбраны).
   Колонка цены узкая, поэтому текст мельче и с переносом. */
.wc-block-components-totals-item__value.fivepost-pending-rate {
    font-weight: 400;
    font-size: .85em;
    color: #555;
    text-align: right;
    white-space: normal;
}
