.hc-building-selector {
    --hc-primary: #ff5500;
    --hc-primary-active: #ff7835;
    --hc-background: #fefcf9;
    --hc-background-muted: #f3f0ec;
    --hc-background-border: #dad2c5;
    --hc-text: #1f1911;
    --hc-text-muted: #423a2e;
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 450px;
    height: calc(100vh - var(--hc-header-height, 88px));
    overflow: hidden;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    background: var(--hc-background);
    font-family: Onest, Arial, sans-serif;
}

@supports (height: 100dvh) {
    .hc-building-selector {
        height: calc(100dvh - var(--hc-header-height, 88px));
    }
}

.hc-building-selector--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    min-height: 360px;
    border-radius: 24px;
}

.hc-building-selector__empty {
    padding: 16px 20px;
    border-radius: 8px;
    background: #fff;
    color: var(--hc-text-muted);
    font-size: 16px;
}

.hc-building-selector__grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hc-building-selector__image {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    object-fit: cover;
    object-position: center center;
    transition: opacity 160ms ease, object-position 260ms ease;
}

.hc-building-selector__shade {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0));
}

.hc-building-selector__controls {
    position: absolute;
    z-index: 30;
    right: clamp(24px, 4.7vw, 96px);
    bottom: 24px;
    left: clamp(24px, 3.6vw, 80px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    pointer-events: none;
}

.hc-building-selector__bar {
    display: flex;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(136, 100, 82, 0.12);
    backdrop-filter: blur(16px);
    pointer-events: auto;
}

.hc-building-selector__stages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-building-selector__stage,
.hc-building-selector__dropdown-toggle,
.hc-building-selector__option {
    border: 0;
    font: inherit;
}

.hc-building-selector__stage {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 6px;
    background: transparent;
    color: var(--hc-text-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}

.hc-building-selector__stage.is-active {
    background: var(--hc-primary);
    color: #fff;
}

.hc-building-selector__stage:disabled,
.hc-building-selector__stage.is-disabled {
    cursor: default;
    opacity: 0.42;
}

.hc-building-selector__divider {
    display: block;
    width: 1px;
    height: 24px;
    background: var(--hc-background-border);
}

.hc-building-selector__dropdown {
    position: relative;
    min-width: 230px;
}

.hc-building-selector__dropdown-toggle {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--hc-background-border);
    border-radius: 6px;
    background: var(--hc-background-muted);
    color: var(--hc-text-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}

.hc-building-selector__dropdown-toggle [data-hc-dropdown-label] {
    min-width: 0;
    flex: 0 0 auto;
    text-align: center;
    white-space: nowrap;
}

.hc-building-selector__dropdown-toggle.is-text-overflowing {
    padding-right: 4px;
    padding-left: 4px;
}

.hc-building-selector__dropdown.is-open .hc-building-selector__dropdown-toggle {
    border-color: var(--hc-primary);
    background: var(--hc-background);
}

.hc-building-selector__chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease;
}

.hc-building-selector__dropdown.is-open .hc-building-selector__chevron {
    transform: rotate(225deg);
}

.hc-building-selector__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    display: none;
    max-height: min(420px, 58vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(110, 98, 81, 0.16);
    scrollbar-width: none;
}

.hc-building-selector__menu::-webkit-scrollbar {
    display: none;
}

.hc-building-selector__dropdown.is-open .hc-building-selector__menu {
    display: flex;
    flex-direction: column;
}

.hc-building-selector__view-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(136, 100, 82, 0.12);
    backdrop-filter: blur(16px);
    pointer-events: auto;
}

.hc-building-selector__view-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--hc-text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
}

.hc-building-selector__view-button i {
    font-size: 20px;
    line-height: 1;
}

.hc-building-selector__view-button.is-active {
    background: var(--hc-primary);
    color: #fff;
}

.hc-building-selector__view-button:disabled,
.hc-building-selector__view-button.is-disabled {
    cursor: default;
    opacity: 0.42;
}

.hc-building-selector__option {
    width: 100%;
    padding: 12px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--hc-text);
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.hc-building-selector__option.is-text-overflowing {
    padding-right: 0;
    padding-left: 0;
    text-align: center;
}

.hc-building-selector__option:hover,
.hc-building-selector__option.is-active {
    background: rgba(255, 85, 0, 0.1);
    color: var(--hc-primary);
}

.hc-building-selector__option:disabled {
    cursor: default;
    opacity: 0.42;
}

.hc-building-selector__hotspots,
.hc-building-selector__stage-hotspots {
    position: absolute;
    z-index: 20;
    inset: 0;
}

.hc-building-selector__hotspot,
.hc-building-selector__stage-hotspot {
    position: absolute;
    display: block;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    transition: left 260ms ease, top 260ms ease, width 260ms ease, height 260ms ease;
    -webkit-tap-highlight-color: transparent;
}

.hc-building-selector__stage-hotspot {
    cursor: pointer;
}

.hc-building-selector__hotspot:hover,
.hc-building-selector__hotspot.is-active,
.hc-building-selector__stage-hotspot:hover {
    outline: 0;
    background: transparent;
}

.hc-building-selector__hotspot[data-disabled="1"],
.hc-building-selector__stage-hotspot[data-disabled="1"],
.hc-building-selector__card[data-disabled="1"] {
    cursor: default;
}

.hc-building-selector__hotspot.is-hidden,
.hc-building-selector__stage-hotspot.is-hidden,
.hc-building-selector__option.is-hidden,
.hc-building-selector__card.is-hidden {
    display: none;
}

.hc-building-selector__grid {
    z-index: 2;
    display: grid;
    gap: 12px;
    padding: 12px;
    background: var(--hc-background-muted);
}

.hc-building-selector__grid[data-columns="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hc-building-selector__grid[data-columns="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hc-building-selector__card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    text-decoration: none;
    background: #d4cabb;
}

.hc-building-selector__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.hc-building-selector__card:hover img {
    transform: scale(1.035);
}

.hc-building-selector__card span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 2;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.hc-building-selector__card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
}

.hc-building-selector.is-grid .hc-building-selector__image,
.hc-building-selector.is-grid .hc-building-selector__hotspots,
.hc-building-selector.is-grid .hc-building-selector__stage-hotspots {
    display: none;
}

.hc-building-selector.is-grid .hc-building-selector__grid {
    display: grid;
}

.hc-building-selector:not(.is-grid) .hc-building-selector__grid {
    display: none;
}

.hc-building-selector.is-stage-view .hc-building-selector__hotspots {
    display: none;
}

.hc-building-selector:not(.is-stage-view) .hc-building-selector__stage-hotspots {
    display: none;
}

.hc-building-selector.is-stage-view .hc-building-selector__controls {
    justify-content: space-between;
}

.hc-building-selector.is-stage-view .hc-building-selector__divider,
.hc-building-selector.is-stage-view .hc-building-selector__dropdown {
    display: none;
}

@media (max-width: 800px) {
    .hc-building-selector {
        width: 100%;
        margin-left: 0;
        height: 450px;
        min-height: 450px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-right-radius: 20px;
        border-bottom-left-radius: 20px;
    }

    .hc-building-selector__image {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .hc-building-selector__shade {
        display: block;
        height: 100%;
        border-radius: 0 0 20px 20px;
    }

    .hc-building-selector__controls {
        right: 12px;
        bottom: 20px;
        left: 12px;
        gap: 12px;
    }

    .hc-building-selector__bar {
        width: 100%;
    }

    .hc-building-selector__stages {
        flex-shrink: 0;
    }

    .hc-building-selector__stage {
        padding-inline: 10px;
    }

    .hc-building-selector__dropdown {
        min-width: 0;
        flex: 1;
    }

    .hc-building-selector__menu {
        right: -4px;
    }

    .hc-building-selector__view-switch {
        display: none;
    }

    .hc-building-selector__hotspots {
        display: block;
    }

    .hc-building-selector__hotspot {
        pointer-events: none;
    }

    .hc-building-selector__hotspot.is-active:not(.is-hidden) {
        pointer-events: auto;
    }

    .hc-building-selector__stage-hotspots {
        display: none;
    }

    .hc-building-selector__grid {
        grid-template-columns: 1fr !important;
        overflow: auto;
        padding-bottom: 88px;
    }

    .hc-building-selector__card {
        min-height: 280px;
        border-radius: 16px;
    }
}
