.price-catalog-popup { --fancybox-zIndex: 100000000; }
.price-catalog-popup .fancybox__backdrop {
    background: rgba(16, 31, 59, .56);
    backdrop-filter: blur(3px);
}
.price-catalog-popup .fancybox__slide { padding: 16px; }

.price-modal.fancybox__content {
    --modal-ink: #101f3b;
    --modal-muted: #49617f;
    --modal-red: #df0032;
    --modal-line: #dce5ef;
    width: min(100%, 620px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(16, 31, 59, .23);
    background: #fff;
    color: var(--modal-ink);
    font: 15px/1.45 Manrope, "Nunito Sans", Arial, sans-serif;
}
.price-modal--record.fancybox__content { width: min(100%, 515px); }
.price-modal [hidden] { display: none !important; }
.price-modal :is(a, button, input, textarea):focus-visible {
    outline: 2px solid #366ddd;
    outline-offset: 2px;
}
.price-modal__close {
    position: absolute;
    z-index: 1;
    top: 15px;
    right: 15px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #efdae4;
    border-radius: 50%;
    background: #fff;
    color: var(--modal-ink);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}
.price-modal__close:hover { color: var(--modal-red); border-color: #eba5b6; }
.price-modal__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 58px 21px 22px;
    border-bottom: 1px solid #f2e4ed;
    background: linear-gradient(110deg, #fff4f7, #f9eff8 63%, #eef1fc);
}
.price-modal__header h2 {
    margin: 0 0 4px;
    font-size: clamp(23px, 4.8vw, 29px);
    line-height: 1.16;
    font-weight: 850;
    letter-spacing: -.035em;
}
.price-modal__header p { margin: 0; color: var(--modal-muted); }
.price-modal__icon {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #f4dce6;
    border-radius: 15px;
    background: #fff;
    color: var(--modal-red);
}
.price-modal__icon svg { width: 24px; height: 24px; }
.price-modal__cart-icon { fill: currentColor; }

.price-modal__body { padding: 19px 22px 22px; }
.price-modal__load-error p { margin: 0 0 12px; }
.price-modal__load-error a { display: inline-block; margin: 8px 0 0 10px; color: var(--modal-red); }

.price-modal__cart-items {
    display: grid;
    gap: 8px;
    max-height: min(42vh, 345px);
    margin: 0;
    padding: 1px 2px;
    overflow: auto;
    list-style: none;
}
.price-modal__cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 11px 10px 11px 13px;
    border: 1px solid var(--modal-line);
    border-radius: 12px;
    background: #fff;
}
.price-modal__cart-item--fee { grid-template-columns: minmax(0, 1fr) auto; background: #f4f8fd; }
.price-modal__cart-name { min-width: 0; }
.price-modal__cart-name :is(strong, small) { display: block; }
.price-modal__cart-name small, .price-modal__cart-price del { color: var(--modal-muted); font-size: 12px; }
.price-modal__cart-name strong { line-height: 1.27; overflow-wrap: anywhere; }
.price-modal__cart-warning {
    margin: 5px 0 0;
    color: #8b4e14;
    font-size: 12px;
    line-height: 1.3;
}
.price-modal__cart-price { text-align: right; white-space: nowrap; color: var(--modal-red); }
.price-modal__cart-price del { display: block; }
.price-modal__remove {
    width: 32px;
    height: 34px;
    border: 1px solid #f1d5df;
    border-radius: 9px;
    color: var(--modal-red);
    background: #fff5f7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.price-modal__remove:disabled { opacity: .5; cursor: progress; }
.price-modal__breakdown { display: grid; gap: 5px; margin: 14px 2px 0; color: var(--modal-muted); font-size: 13px; }
.price-modal__breakdown > div { display: flex; justify-content: space-between; gap: 12px; }
.price-modal__breakdown strong { color: var(--modal-ink); white-space: nowrap; }
.price-modal__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    padding: 11px 14px;
    border-radius: 12px;
    background: #fff2f5;
    font-weight: 750;
}
.price-modal__total strong { color: var(--modal-red); font-size: 23px; }
.price-modal__actions { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px; }
.price-modal__primary, .price-modal__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
}
.price-modal .price-modal__primary {
    color: #fff;
    background: linear-gradient(180deg, #f7244a, #e30032);
    box-shadow: 0 4px 9px rgba(223, 0, 50, .14);
}
.price-modal .price-modal__primary:hover { background: #ca002c; }
.price-modal .price-modal__secondary {
    color: var(--modal-ink);
    border-color: var(--modal-line);
    background: #fff;
}
.price-modal .price-modal__secondary:hover { border-color: #e68ba1; }
.price-modal__continue {
    display: block;
    min-height: 36px;
    margin: 8px auto -4px;
    padding: 5px 12px;
    color: var(--modal-red);
    background: transparent;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.price-modal__empty { display: grid; gap: 13px; justify-items: center; padding: 12px 0; text-align: center; }
.price-modal__empty h3 { margin: 0; font-size: 18px; font-weight: 800; }

.price-modal__recommendations { margin-top: 14px; border: 1px solid var(--modal-line); border-radius: 12px; overflow: hidden; }
.price-modal__recommendations summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 13px; background: #fff3f6; font-weight: 800; cursor: pointer; list-style: none;
}
.price-modal__recommendations summary::-webkit-details-marker { display: none; }
.price-modal__recommendations summary svg { width: 18px; height: 18px; transition: transform .15s; }
.price-modal__recommendations[open] summary svg { transform: rotate(180deg); }
.price-modal__recommendation-list { display: grid; gap: 7px; padding: 8px; }
.price-modal__recommendation {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
    padding: 9px; border: 1px solid var(--modal-line); border-radius: 10px; background: #fff;
}
.price-modal__recommendation a:not(.price-modal__recommendation-action) { color: inherit; }
.price-modal__recommendation-action { min-height: 37px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.price-modal__recommendation-action svg { width: 18px; height: 18px; margin-right: 6px; }
.price-modal__recommendation-action:disabled { opacity: .6; cursor: progress; }

.price-modal__service {
    display: grid;
    gap: 2px;
    margin-bottom: 14px;
    padding: 10px 13px;
    border: 1px solid #ebdce7;
    border-radius: 11px;
    background: #fff5f8;
}
.price-modal__service strong { overflow-wrap: anywhere; }
.price-modal__service strong:empty { display: none; }
.price-modal__service small { color: var(--modal-muted); }
.price-modal__form { display: grid; gap: 12px; }
.price-modal__field label { display: grid; gap: 4px; font-weight: 750; }
.price-modal__field :is(input, textarea) {
    width: 100%;
    height: auto;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid #d6dfec;
    border-radius: 10px;
    background: #fff;
    color: var(--modal-ink);
    font: inherit;
    font-weight: 500;
}
.price-modal__field textarea { min-height: 76px; max-height: 180px; resize: vertical; }
.price-modal__submit { width: 100%; margin-top: 2px; }
.price-modal__error {
    margin: 0;
    padding: 9px 11px;
    border-radius: 9px;
    background: #fff0f3;
    color: #a5002a;
}

/* Booking forms keep their original fields and actions while sharing the catalog dialog. */
.price-modal--legacy > .f-button.is-close-btn { display: none; }
.price-modal--legacy::before, .price-modal--legacy::after { display: none; }
.price-modal--legacy .price-modal__header p { max-width: none; text-align: left; }
.price-modal--legacy > .price-modal__service { margin: 16px 22px 0; }
.fancybox__container:has(.price-modal--legacy) { --fancybox-zIndex: 100000000; }
.fancybox__container:has(.price-modal--legacy) .fancybox__backdrop { background: rgba(16, 31, 59, .56); backdrop-filter: blur(3px); }
.price-modal--legacy > form { display: grid; gap: 12px; margin: 0; padding: 19px 22px 22px; }
.price-modal--legacy .login__item { margin: 0; }
.price-modal--legacy .login__item > span { display: block; margin-bottom: 4px; font-weight: 750; }
.price-modal--legacy .login__item :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="file"]), textarea, select) {
    width: 100%; height: auto; min-height: 43px; margin: 0; padding: 9px 12px;
    border: 1px solid #d6dfec; border-radius: 10px; background: #fff; color: var(--modal-ink); font: inherit;
}
.price-modal--legacy .login__item textarea { min-height: 76px; max-height: 180px; resize: vertical; }
.price-modal--legacy .login__button {
    width: 100%; min-height: 45px; margin: 0; padding: 8px 14px; border: 0; border-radius: 10px;
    color: #fff; background: linear-gradient(180deg, #f7244a, #e30032); font: inherit; font-weight: 800;
}
.price-modal--legacy .login__button:hover { color: #fff; background: #ca002c; }

@media (max-width: 480px) {
    .price-catalog-popup .fancybox__slide { padding: 10px; }
    .price-modal.fancybox__content { max-height: calc(100dvh - 20px); border-radius: 15px; }
    .price-modal__header { gap: 9px; padding: 15px 46px 15px 14px; }
    .price-modal__close { top: 10px; right: 9px; width: 32px; height: 32px; }
    .price-modal__icon { flex-basis: 37px; width: 37px; height: 37px; border-radius: 12px; }
    .price-modal__icon svg { width: 20px; height: 20px; }
    .price-modal__body { padding: 13px 14px 14px; }
    .price-modal__cart-item { gap: 7px; padding: 8px; }
    .price-modal__cart-name strong { font-size: 13px; }
    .price-modal__cart-price { font-size: 13px; }
    .price-modal__actions { grid-template-columns: 1fr; }
    .price-modal__recommendation { grid-template-columns: minmax(0, 1fr) auto; }
    .price-modal__recommendation .price-modal__cart-name { grid-column: 1 / -1; }
    .price-modal__recommendation form, .price-modal__recommendation > .price-modal__recommendation-action { justify-self: end; }
    .price-modal__field :is(input, textarea) { font-size: 16px; }
    .price-modal--legacy > form { padding: 13px 14px 14px; }
    .price-modal--legacy .login__item :is(input, textarea, select) { font-size: 16px; }
}
@media (max-width: 380px) {
    .price-modal__form .g-recaptcha { height: 65px; transform: scale(.84); transform-origin: top left; }
}
