/* Context-preserving business information modal.
 * The reservation page remains visually present behind the overlay while the
 * modal owns a static header and an independently scrollable content region.
 */

body.pb-business-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.pb-business-modal {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    isolation: isolate;
}

.pb-business-modal[hidden] {
    display: none;
}

.pb-business-modal__backdrop {
    position: fixed;
    z-index: -1;
    inset: 0;
    background: rgba(28, 23, 31, 0.56);
    backdrop-filter: blur(9px) saturate(90%);
    -webkit-backdrop-filter: blur(9px) saturate(90%);
    animation: pb-business-modal-fade 180ms ease both;
}

.pb-business-modal__dialog {
    position: relative;
    display: grid;
    width: min(980px, 100%);
    height: min(88dvh, 820px);
    max-height: calc(100dvh - max(36px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 28px;
    outline: 0;
    overflow: hidden;
    color: var(--pb-text);
    background: #f7f3ee;
    box-shadow:
        0 38px 120px rgba(20, 14, 23, 0.38),
        0 0 0 1px rgba(61, 43, 67, 0.08);
    animation: pb-business-modal-enter 220ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.pb-business-modal__topbar {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding:
        max(14px, env(safe-area-inset-top))
        22px
        14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    background:
        linear-gradient(135deg, #3b2b40 0%, #2b222f 100%);
    box-shadow: 0 10px 28px rgba(34, 24, 38, 0.18);
}

.pb-business-modal__topbar::after {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% -40%, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035));
    content: "";
    pointer-events: none;
}

.pb-business-modal__topbar > * {
    position: relative;
    z-index: 1;
}

.pb-business-modal__topbar-title {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.pb-business-modal__topbar-title span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 750;
}

.pb-business-modal__topbar-title strong {
    overflow: hidden;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-business-modal__close {
    position: static;
    display: inline-flex;
    width: auto;
    min-width: 96px;
    height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 170ms ease,
        background-color 170ms ease,
        transform 170ms ease;
}

.pb-business-modal__close span:first-child {
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

.pb-business-modal__close:hover {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.17);
    transform: translateY(-1px);
}

.pb-business-modal__close:active {
    transform: translateY(0) scale(0.98);
}

.pb-business-modal__close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.48);
    outline-offset: 3px;
}

.pb-business-modal__scroll {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(86, 57, 97, 0.45) rgba(86, 57, 97, 0.06);
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.pb-business-modal__scroll::-webkit-scrollbar {
    width: 10px;
}

.pb-business-modal__scroll::-webkit-scrollbar-track {
    background: rgba(86, 57, 97, 0.05);
}

.pb-business-modal__scroll::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(86, 57, 97, 0.42);
    background-clip: padding-box;
}

.pb-business-modal__scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(86, 57, 97, 0.62);
    background-clip: padding-box;
}

.pb-business-modal__content {
    display: grid;
    grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
    gap: 18px;
    padding: 24px;
}

.pb-business-modal__identity {
    grid-column: 1 / -1;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 20px;
    padding: 4px 2px 22px;
    border: 0;
    border-bottom: 1px solid rgba(104, 87, 112, 0.14);
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.pb-business-modal__identity::after {
    display: none;
}

.pb-business-modal__identity > * {
    position: static;
}

.pb-business-modal__logo {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    padding: 7px;
    border: 1px solid rgba(104, 87, 112, 0.14);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(49, 35, 54, 0.1);
    object-fit: contain;
}

.pb-business-modal__identity h2 {
    margin: 5px 0 0;
    font-size: clamp(27px, 4vw, 39px);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.38;
}

.pb-business-modal__identity p {
    max-width: 730px;
    margin: 8px 0 0;
    color: var(--pb-muted-strong);
    font-size: 14px;
    line-height: 2;
}

.pb-business-modal__section,
.pb-business-modal__contact {
    position: relative;
    align-self: start;
    display: grid;
    gap: 15px;
    padding: 20px;
    border: 1px solid rgba(104, 87, 112, 0.12);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 34px rgba(49, 35, 54, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.pb-business-modal__section::after,
.pb-business-modal__contact::after {
    display: none;
}

.pb-business-modal__section > *,
.pb-business-modal__contact > * {
    position: static;
}

.pb-business-modal__section h3,
.pb-business-modal__contact h3 {
    margin: 0;
    color: var(--pb-text);
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.pb-business-modal__services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pb-business-modal__services li {
    position: relative;
    padding: 12px 36px 12px 13px;
    border: 1px solid rgba(104, 87, 112, 0.1);
    border-radius: 13px;
    background: #faf8f6;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
}

.pb-business-modal__services li::before {
    position: absolute;
    top: 18px;
    right: 15px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pb-accent);
    box-shadow: 0 0 0 4px rgba(114, 81, 125, 0.09);
    content: "";
}

.pb-business-modal__contact {
    max-width: none;
    justify-items: stretch;
    color: var(--pb-text);
    font-style: normal;
    text-align: right;
}

.pb-business-modal__contact-group {
    display: grid;
    gap: 7px;
    padding: 13px;
    border: 1px solid rgba(104, 87, 112, 0.1);
    border-radius: 14px;
    background: #faf8f6;
    box-shadow: none;
}

.pb-business-modal__contact-group > span {
    color: var(--pb-muted);
    font-size: 11px;
    font-weight: 750;
}

.pb-business-modal__contact-group > div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pb-business-modal__contact a {
    display: inline-flex;
    min-height: 38px;
    width: fit-content;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(114, 81, 125, 0.1);
    border-radius: 11px;
    color: var(--pb-accent-strong);
    background: rgba(114, 81, 125, 0.07);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.pb-business-modal__contact a:hover {
    border-color: rgba(114, 81, 125, 0.22);
    background: rgba(114, 81, 125, 0.12);
    transform: translateY(-1px);
}

.pb-business-modal__contact-group--phones a {
    display: grid;
    min-width: 150px;
    flex: 1 1 170px;
    gap: 2px;
    text-align: right;
}

.pb-business-modal__contact-group--phones small {
    color: var(--pb-muted);
    font-size: 10px;
    font-weight: 750;
}

.pb-business-modal__contact-group--phones strong {
    color: var(--pb-accent-strong);
    font-size: 12px;
    font-weight: 900;
}

.pb-business-modal__address dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.pb-business-modal__address dl > div {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid rgba(104, 87, 112, 0.09);
    border-radius: 11px;
    background: #fff;
}

.pb-business-modal__address dt,
.pb-business-modal__address dd {
    margin: 0;
}

.pb-business-modal__address dt {
    color: var(--pb-muted);
    font-size: 10px;
    font-weight: 750;
}

.pb-business-modal__address dd {
    color: var(--pb-muted-strong);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.pb-business-modal__contact p {
    margin: 0;
    color: var(--pb-muted-strong);
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.pb-business-modal__empty {
    padding: 14px;
    border: 1px dashed var(--pb-border-strong);
    border-radius: 13px;
    background: #faf8f6;
    text-align: center;
}

@keyframes pb-business-modal-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pb-business-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 760px) {
    .pb-business-modal {
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
    }

    .pb-business-modal__dialog {
        width: 100%;
        height: calc(100dvh - max(16px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
        max-height: none;
        border-radius: 22px;
    }

    .pb-business-modal__topbar {
        min-height: 66px;
        gap: 12px;
        padding:
            max(11px, env(safe-area-inset-top))
            14px
            11px;
    }

    .pb-business-modal__topbar-title strong {
        font-size: 15px;
    }

    .pb-business-modal__close {
        min-width: 88px;
        height: 42px;
        padding-inline: 13px;
    }

    .pb-business-modal__scroll {
        scrollbar-gutter: auto;
    }

    .pb-business-modal__content {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .pb-business-modal__identity,
    .pb-business-modal__section,
    .pb-business-modal__contact {
        grid-column: 1;
    }

    .pb-business-modal__identity {
        align-items: flex-start;
        gap: 14px;
        padding: 2px 0 17px;
    }

    .pb-business-modal__logo {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        border-radius: 20px;
    }

    .pb-business-modal__identity h2 {
        margin-top: 3px;
        font-size: clamp(23px, 7vw, 30px);
    }

    .pb-business-modal__identity p {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.9;
    }

    .pb-business-modal__section,
    .pb-business-modal__contact {
        gap: 13px;
        padding: 16px;
        border-radius: 17px;
    }

    .pb-business-modal__services,
    .pb-business-modal__address dl {
        grid-template-columns: 1fr;
    }

    .pb-business-modal__contact-group--phones a {
        min-width: 100%;
    }
}

@media (max-width: 430px) {
    .pb-business-modal__topbar-title span {
        display: none;
    }

    .pb-business-modal__topbar-title strong {
        font-size: 14px;
    }

    .pb-business-modal__close {
        min-width: 80px;
        height: 40px;
        gap: 6px;
        padding-inline: 11px;
        font-size: 12px;
    }

    .pb-business-modal__close span:first-child {
        font-size: 21px;
    }

    .pb-business-modal__content {
        padding: 13px;
    }

    .pb-business-modal__identity {
        display: grid;
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 11px;
    }

    .pb-business-modal__logo {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 18px;
    }

    .pb-business-modal__identity h2 {
        font-size: 21px;
    }

    .pb-business-modal__section,
    .pb-business-modal__contact {
        padding: 14px;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pb-business-modal__backdrop {
        background: rgba(28, 23, 31, 0.7);
    }

    .pb-business-modal__close {
        background: rgba(255, 255, 255, 0.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pb-business-modal__backdrop,
    .pb-business-modal__dialog {
        animation: none;
    }

    .pb-business-modal__scroll {
        scroll-behavior: auto;
    }

    .pb-business-modal__close:hover,
    .pb-business-modal__contact a:hover {
        transform: none;
    }
}
