 * {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    background: #f2f6f8;
}


/* CITY BACKGROUND */

.city-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(
            rgba(248, 250, 252, 0.18),
            rgba(238, 243, 246, 0.40)
        ),
        url("./images/city-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* COLLAPSIBLE PANEL HEADERS*/

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-title-row h2 {
    margin-top: 0;
}


/* MINIMIZE BUTTON */

.panel-minimize {
    flex:0 0 40px;
    width:40px;
    height:40px;
    padding:0;
    margin:0;
    position:relative;
    display:block;
    border:2px solid #f4bd24;
    border-radius:50%;
    background:#ffffff;
    color:#0067b9;
    cursor:pointer;
    box-sizing:border-box;
}
.panel-toggle-symbol {
    position:absolute;
    top:50%;
    left:50%;
    width:auto;
    height:auto;
    padding:0;
    margin:0;
    display:block;
    font-family:Arial,Helvetica,sans-serif;
    font-size:22px;
    font-weight:600;
    line-height:1;
    text-align:center;
    transform:translate(-50%,-50%);
}
.panel-minimize:hover {
    background:#005EA8;
    border-color:#005EA8;
    color:#ffffff;
}
.panel-minimize:focus-visible {
    outline:3px solid #FFD54F;
    outline-offset:3px;
}

/*COLLAPSED PERMIT KEY */

.permit-key.is-collapsed {
    width:190px;
    height:auto;
    min-height:0;
}

.permit-key.is-collapsed
#permitKeyContent,
.permit-key.is-collapsed
#permitKeyList,
.permit-key.is-collapsed
#permitNoResults {
    display:none !important;
}

.permit-key.is-collapsed
.permit-key-header {
    padding:12px 14px;
}

.permit-key.is-collapsed
.permit-key-header h2 {
    margin: 0;
}

/* EXPLORE PROPERTY - COLLAPSED TOOLBAR*/

.viewer-legend.is-collapsed {
    width:auto;
    height:auto;
    padding:8px 10px;
    border-radius:16px;
    background:rgba(255,255,255,.96);
    box-shadow:0 8px 24px rgba(31,41,51,.16);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.viewer-legend.is-collapsed .panel-title-row {
    display:none;
}

.viewer-legend.is-collapsed #viewerLegendContent {
    display:block;
}

.viewer-legend.is-collapsed #viewerLegendContent ul {
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    padding:0;
}

.viewer-legend.is-collapsed #viewerLegendContent li {
    position:relative;
    margin:0;
    padding:0;
    display:block;
}

.viewer-legend.is-collapsed #viewerLegendContent li > span:last-child {
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    display:inline-block;
    width:max-content;
    min-width:0;
    max-width:none;
    padding:6px 9px;
    margin:0;
    border-radius:7px;
    background:#152238;
    color:#ffffff;
    font-size:11px;
    font-weight:600;
    line-height:1.2;
    text-align:center;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    box-sizing:border-box;
    transform:translateX(-50%) translateY(4px);
    box-shadow:0 4px 12px rgba(0,0,0,.22);
    transition:opacity .15s ease,visibility .15s ease,transform .15s ease;
    z-index:9999;
    margin-left:80%;
}

.viewer-legend.is-collapsed #viewerLegendContent li:hover > span:last-child,
.viewer-legend.is-collapsed #viewerLegendContent li:focus-within > span:last-child {
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

.viewer-legend.is-collapsed .legend-symbol {
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:10px;
    cursor:help;
}

.viewer-legend.is-collapsed .legend-symbol img {
    width:21px;
    height:21px;
}

/* MAXIMIZE BUTTON - SAME STYLE AS TOOLBAR ICONS */
.legend-expand-item {
    position:relative;
}

.legend-expand {
    position:relative;
    border:0;
    cursor:pointer;
}

.maximize-icon {
    position:relative;
    display:block;
    width:17px;
    height:17px;
}

/* TOP LEFT */
.maximize-icon::before {
    content:"";
    position:absolute;
    top:1px;
    left:1px;
    width:6px;
    height:6px;
    border-top:2px solid #1f5ca8;
    border-left:2px solid #1f5ca8;
}

/* BOTTOM RIGHT */
.maximize-icon::after {
    content:"";
    position:absolute;
    right:1px;
    bottom:1px;
    width:6px;
    height:6px;
    border-right:2px solid #1f5ca8;
    border-bottom:2px solid #1f5ca8;
}
.viewer-legend:not(.is-collapsed)
.legend-expand-item {
    display:none;
}
/* KEEP BUTTON COMPACT ON SMALL SCREENS */

@media (max-width: 800px) {

    .panel-minimize {
        width: 28px;
        height:28px;
        flex-basis:  28px;
        font-size:19px;
    }

    .permit-key.is-collapsed {
        width: 100%;
        height: auto;
    }
}

/* 3D VIEWER */

#viewer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: transparent;
}

#viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent !important;
}


/* LOADING OVERLAY */

.model-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(242, 247, 250, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.model-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.model-loading-card {
    width: min( 360px, calc(100% - 40px));
    padding: 32px 34px;
    text-align: center;
    background: rgba(255, 255, 255, 0.97);
    border:1px solid rgba(0, 94, 168, 0.12);
    border-radius: 20px;
    box-shadow:0 20px 55px rgba(16, 36, 62, 0.18);
}

.model-loading-spinner {
    width: 46px;
    height: 46px;
    margin:0 auto 18px;
    border:4px solid #dcebf5;
    border-top-color: #005EA8;
    border-radius: 50%;
    animation:modelLoadingSpin 0.8s linearinfinite;
}

.model-loading-title {
    margin: 0 0 7px;
    color: #152238;
    font-size: 19px;
    font-weight:700;
    line-height: 1.25;
}

.model-loading-text {
    margin: 0;
    color: #607485;
    font-size:13px;
    line-height: 1.5;
}

@keyframes modelLoadingSpin {
    to {
        transform:rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .model-loading-spinner {
        animation: none;
    }

    .model-loading {
        transition: none;
    }
}


/*TITLE CARD */

.topbar {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 60;
    width: 520px;
    max-width: calc(100% - 56px);
    padding:24px 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter:blur(18px);
    box-shadow:0 18px 50px rgba(31, 41, 51, 0.14), 0 3px 10px rgba(31, 41, 51, 0.06);
}

.topbar h1 {
    margin: 0 0 8px;
    color: #152238;
    font-size: 29px;
    font-weight:700;
    line-height:1.2;
    letter-spacing: -0.5px;
}

.topbar p {
    margin: 0;
    color:#53657a;
    font-size: 14px;
    line-height: 1.5;
}


/* HOTSPOTS*/

.hotspot {
    position: absolute;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background:#005EA8;
    color: #ffffff;
    font-size:23px;
    font-weight: 400;
    line-height:1;
    cursor: pointer;
    transform:translate(-50%, -50%);
    z-index: 100;
    overflow: visible;
    isolation: isolate;
    box-shadow:
        0 3px 10px
        rgba(0, 0, 0, 0.30),
        0 0 0 2px
        rgba(0, 94, 168, 0.14);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.hotspot:hover {
    background:#004B87;
}
.hotspot:hover,
.hotspot:focus-visible {
    z-index: 9999 !important;
}

/* HOTSPOT PULSE */
.hotspot::before {
    content: "";
    position: absolute;
    inset: -8px;
    border:
        2px solid
        rgba(0, 94, 168, 0.55);
    border-radius: 50%;
    animation:
        hotspotPulse
        1.8s
        ease-out
        infinite;
    pointer-events: none;
}

.hotspot::after {
    content: "";
    position: absolute;
    inset: -15px;
    border:
        2px solid
        rgba(0, 94, 168, 0.25);
    border-radius: 50%;
    animation:
        hotspotPulseOuter
        1.8s
        ease-out
        infinite;
    pointer-events: none;
}

.hotspot-plus {
    position: relative;
    width: 14px;
    height: 14px;
    display: block;
    font-size: 0;
    line-height: 0;
}

.hotspot-plus::before,
.hotspot-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.hotspot-plus::before {
    width: 12px;
    height: 2px;
}

.hotspot-plus::after {
    width: 2px;
    height: 12px;
}
/* HOTSPOT PERMIT TITLE TOOLTIP */

.hotspot {
     z-index: 100;
    overflow: visible;
}

/*HOTSPOT TOOLTIP */

.hotspot-tooltip {
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    display:inline-block;
    width:max-content;
    min-width:0;
    max-width:260px;
    padding:7px 10px;
    margin:0;
    border-radius:7px;
    background:#152238;
    color:#ffffff;
    font-size:12px;
    font-weight:600;
    line-height:1.3;
    text-align:center;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    box-sizing:border-box;
    transform:translateX(-50%) translateY(4px);
    box-shadow:0 5px 15px rgba(0,0,0,.25);
    transition:opacity .15s ease,visibility .15s ease,transform .15s ease;
    z-index:10000;
}

.hotspot-tooltip::after {
    content:"";
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);
    border-width:5px;
    border-style:solid;
    border-color:#152238 transparent transparent transparent;
}

.hotspot:hover .hotspot-tooltip,
.hotspot:focus-visible .hotspot-tooltip {
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

/* TOOLTIP */
.viewer-legend.is-collapsed .legend-tooltip {
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    display:inline-block;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    padding:7px 10px;
    margin:0;
    background:#152238;
    color:#ffffff;
    border-radius:7px;
    font-size:11px;
    font-weight:600;
    line-height:1.3;
    text-align:center;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    box-sizing:border-box;
    transform:translateX(-50%) translateY(4px);
    box-shadow:0 5px 15px rgba(0,0,0,.24);
    transition:opacity .15s ease,visibility .15s ease,transform .15s ease;
    z-index:10000;
}

/* SHOW TOOLTIP */
.viewer-legend.is-collapsed li:hover .legend-tooltip,
.viewer-legend.is-collapsed li:focus-within .legend-tooltip {
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

/* TOOLTIP ARROW */
.viewer-legend.is-collapsed .legend-tooltip::after {
    content:"";
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);
    border-width:5px;
    border-style:solid;
    border-color:#152238 transparent transparent transparent;
}

/* TOOLTIP */
.viewer-legend.is-collapsed .legend-tooltip {
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    transform:translateX(-50%) translateY(4px);
    width:max-content;
    min-width:0;
    max-width:260px;
    padding:7px 10px;
    background:#152238;
    color:#ffffff;
    border-radius:7px;
    font-size:11px;
    font-weight:600;
    line-height:1.3;
    text-align:center;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    box-shadow:0 5px 15px rgba(0,0,0,.24);
    transition:opacity .15s ease,visibility .15s ease,transform .15s ease;
    z-index:10000;
}

/* SHOW TOOLTIP */
.viewer-legend.is-collapsed li:hover .legend-tooltip,
.viewer-legend.is-collapsed li:focus-within .legend-tooltip {
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

/* CENTER PLUS INSIDE PERMIT KEY DOT */
.permit-key-dot {
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
}

.permit-key-plus {
    position: relative;
    width: 12px;
    height: 12px;
    display: block;
    font-size: 0;
    line-height: 0;
}

.permit-key-plus::before,
.permit-key-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.permit-key-plus::before {
    width: 10px;
    height: 2px;
}

.permit-key-plus::after {
    width: 2px;
    height: 10px;
}

/* PERMIT KEY - COLLAPSED */
.permit-key.is-collapsed {
    width:190px;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible;
}

.permit-key.is-collapsed #permitKeyContent,
.permit-key.is-collapsed #permitKeyList,
.permit-key.is-collapsed #permitNoResults {
    display:none !important;
}

.permit-key.is-collapsed .permit-key-header {
    padding:12px 14px;
}

.permit-key.is-collapsed .panel-title-row {
    margin:0;
}

.permit-key.is-collapsed .permit-key-header h2 {
    margin:0;
}

.permit-key.is-collapsed .panel-minimize {
    flex:0 0 34px;
    width:34px;
    height:34px;
}

/* SHOW FOR KEYBOARD USERS */
.hotspot:focus-visible .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    transform:
        translateX(-50%)
        translateY(-2px);
}

/* SELECTED HOTSPOT */
.hotspot.selected {
    background:#C69214;
    color: #ffffff;
    transform:
        translate(
            -50%,
            -50%
        )
        scale(1.14);
    box-shadow:
        0 0 0 3px
        rgba(255, 255, 255, 0.96),
        0 0 0 7px
        rgba(198, 146, 20, 0.24),
        0 8px 24px
        rgba(104, 76, 5, 0.30);
    z-index: 500;
}

.hotspot.selected::before {
    border-color: rgba(198, 146, 20, 0.85);
}

.hotspot.selected::after {
    border-color: rgba(198, 146, 20, 0.35);
}

.hotspot:focus-visible {
    outline:4px solid #FFD54F;
    outline-offset: 5px;
}

@keyframes hotspotPulse {

    0% {
        transform:
            scale(0.78);
        opacity:
            0.85;
    }

    100% {
        transform:
            scale(1.65);
        opacity:
            0;
    }
}

@keyframes hotspotPulseOuter {

    0% {
        transform:
            scale(0.72);
        opacity:
            0.55;
    }

    100% {
        transform:
            scale(1.55);
        opacity:
            0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .hotspot::before,
    .hotspot::after {
        animation:
            none;
    }
}

/* PERMIT KEY */

.permit-key {
    position: absolute;
    top: 28px;
    right: 38px;
    z-index: 55;
    width: 340px;
    height: 700px;
    max-height:calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.94);
    border:
        1px solid
        rgba(255, 255, 255, 0.94);
    border-radius:22px;
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 18px 50px
        rgba(31, 41, 51, 0.13),
        0 3px 10px
        rgba(31, 41, 51, 0.05);
    overflow: hidden;
}


/* PERMIT KEY HEADER */
.permit-key-header {
    padding: 22px 20px 16px;
}

.permit-key-header h2 {
    margin: 0 0 6px;
    color: #152238;
    font-size: 22px;
    font-weight:700;
    line-height: 1.2;
}

.permit-key-header p {
    margin: 0 0 16px;
    color: #53657a;
    font-size:13px;
    line-height:1.45;
}


/*PERMIT SEARCH */

.permit-search {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    background: rgba(247, 249, 251, 0.95);
    border: 1px solid #dce4ea;
    border-radius:12px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.permit-search:focus-within {
    background:#ffffff;
    border-color: #0067b9;
    box-shadow:
        0 0 0 3px
        rgba(0, 103, 185, 0.12);
}

.permit-search img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
    opacity: 0.65;
}

.permit-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background:transparent;
    color: #152238;
    font-family:"Inter",Arial,Helvetica,sans-serif;
    font-size:14px;
}

.permit-search input::placeholder {
    color:
        #7c8b98;
}


/* PERMIT LIST / ORANGE SCROLLBAR*/

#permitKeyList {
    flex: 1;
    margin: 0;
    padding:2px 14px 16px;
    overflow-y:auto;
    scrollbar-width: thin;
    scrollbar-color: #C97700 transparent;
}

#permitKeyList::-webkit-scrollbar {
    width:6px;
}

#permitKeyList::-webkit-scrollbar-track {
    background:transparent;
}

#permitKeyList::-webkit-scrollbar-thumb {
    background:#C97700;
    border-radius:20px;
}

#permitKeyList::-webkit-scrollbar-thumb:hover {
    background: #A85F00;
}


/* PERMIT ITEM */
.permit-key-item {
    position: relative;
    width: 100%;
    min-height:50px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    padding:8px 38px 8px 10px;
    border: 1px solid rgba(38, 55, 70, 0.07);
    border-radius:13px;
    background: rgba(255, 255, 255, 0.88);
    color: #152238;
    font-family:"Inter",Arial,Helvetica,sans-serif;
    font-size:12.5px;
    font-weight:600;
    line-height:1.3;
    text-align:left;
    cursor:pointer;
    box-shadow:
        0 3px 10px
        rgba(31, 41, 51, 0.06);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.permit-key-item:hover {
    background: #ffffff;
    transform: translateX(-2px);
    box-shadow:
        0 6px 16px
        rgba(31, 41, 51, 0.10);
}

.permit-key-item::after {
    content: "›";
    position:absolute;
    right:14px;
    color: #71808d;
    font-size:22px;
    font-weight:400;
    line-height: 1;
}

/* BLUE  */
.permit-key-dot {
    flex:0 0 26px;
    width: 26px;
    height:26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:2px solid #ffffff;
    border-radius:50%;
    background: #0067b9;
    color: #ffffff;
    font-size:17px;
    font-weight:400;
    line-height:1;
    box-shadow:
        0 2px 7px
        rgba(0, 94, 168, 0.25);
}

/* SELECTED PERMIT */
.permit-key-item.selected {
   color: #725200;
    box-shadow:
        0 0 0 2px
        rgba(198, 146, 20, 0.30),
        0 6px 16px
        rgba(114, 82, 0, 0.10);
}

.permit-key-item.selected
.permit-key-dot {
    background: #C69214;
    box-shadow:
        0 0 0 4px
        rgba(198, 146, 20, 0.15);
}

/* NO RESULTS */

.permit-no-results {
    margin: 0;
    padding:
        20px;

    color:
        #667782;

    font-size:
        13px;

    text-align:
        center;
}


/* SCREEN READER ONLY*/

.sr-only {
    position:
        absolute;

    width:
        1px;

    height:
        1px;

    padding:
        0;

    margin:
        -1px;

    overflow:
        hidden;

    clip:
        rect(0, 0, 0, 0);

    white-space:
        nowrap;

    border:
        0;
}


/* EXPLORE PROPERTY*/

.viewer-legend {
    position:absolute;
    right:28px;
    left:auto;
    bottom:28px;
    z-index:55;
    width:340px;
    padding:22px;
    background:rgba(255,255,255,0.94);
    border:1px solid rgba(255,255,255,0.94);
    border-radius:22px;
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    box-shadow:0 18px 50px rgba(31,41,51,0.14),0 3px 10px rgba(31,41,51,0.06);
}

.viewer-legend h2 {
    margin: 0 0 16px;
    color: #152238;
    font-size:23px;
    font-weight:700;
}

.viewer-legend ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.viewer-legend li {
    display: flex;
    align-items:center;
    gap:13px;
    margin:11px 0;
    color: #53657a;
    font-size:13px;
    line-height:1.4;
}

.viewer-legend li strong {
    color: #152238;
}

.legend-symbol {
    flex: 0 0 38px;
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 12px;
    background: #e7f2fc;
}

.legend-symbol img {
    width:24px;
    height:24px;
    object-fit: contain;
    display:block;
}

/*POPUP BACKDROP*/
.popup-backdrop {
    position:absolute;
    inset: 0;
    z-index:80;
    display:none;
    background: rgba(15, 35, 50, 0.28);
    backdrop-filter:blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.popup-backdrop.open {
    display:
        block;
}

/* PERMIT PANEL*/
.permit-panel {
    position:absolute;
    top:50%;
    right:30px;
    z-index:90;
    display:none;
    width:min(480px,alc(100% - 40px));
    max-height:calc(100% - 60px);
    overflow-y:auto;
    transform:translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    border:1px solid rgba(255, 255, 255, 0.82);
    border-radius:18px;
    box-shadow:0 22px 70px rgba(0, 0, 0, 0.26);
}

.permit-panel.open {
    display: block;
}

.permit-header {
    position:relative;
    padding: 25px 62px 23px 25px;
    background:linear-gradient( 135deg,#006f9e,#005EA8);
    color:#ffffff;
}

.permit-header h2 {
    margin: 0;
    font-size:24px;
    line-height:1.25;
}

.permit-header p {
    margin:7px 0 0;
    opacity:0.90;
    line-height:1.4;
}

.permit-close {
    position:absolute;
    top:15px;
    right: 15px;
    width:40px;
    height:40px;
    display:flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.80);
    border-radius:50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size:26px;
    line-height:1;
    cursor: pointer;
}

.permit-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.permit-close:focus-visible {
    outline: 4px solid#FFD54F;
    outline-offset:3px;
}

.permit-body {
    padding: 24px;
}

/* INFORMATION SECTIONS*/
.permit-section {
    margin-bottom:22px;
}

.permit-section h3 {
    margin:0 0 8px;
    font-size: 17px;
}

.permit-section p {
    margin:0;
    color: #45535f;
    line-height: 1.6;
    white-space:
        pre-line;
}

.permit-section.info {
    padding:14px 16px;
    border-left: 4px solid#0076a8;
    border-radius:8px;
    background:#eef7fb;
}

.permit-section.warning {
    padding:14px 16px;
    border-left: 4px solid #b26a00;
    border-radius:8px;
    background: #fff8e7;
}


/* DOCUMENT GROUPS*/
.permit-document-group {
    margin-bottom:26px;
}

.permit-document-group h3 {
    margin: 0 0 10px;
    color: #152238;
    font-size:17px;
    font-weight:700;
}

.optional-documents {
    padding:16px;
    background: #f4f8fa;
    border: 1px solid #e1e9ee;
    border-radius:10px;
}

.required-documents {
    margin: 0;
    padding:0;
    list-style:none;
}

.required-documents li {
    padding:11px 0;
    border-bottom:1px solid #e3e8ec;
    line-height:1.4;
}

.required-documents li:last-child {
    border-bottom:0;
}

.required-documents a {
    color: #005EA8;
    font-weight:700;
}

.document-note {
    display:block;
    margin: 4px 0 0 28px;
    color: #596975;
    font-size:14px;
}

.check {
    display:inline-block;
    width:24px;
    color: #166534;
    font-weight:700;
}

/* STATUS*/
#status {
    position:absolute;
    left:28px;
    bottom:245px;
    z-index:50;
    padding:10px 14px;
    border:1px solid rgba(255, 255, 255, 0.80);
    border-radius:10px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.10);
    font-size:14px;
    font-weight: 700;
}

/*  ACCORDIONS */
.has-accordions {
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.permit-accordion {
    overflow: hidden;
    border: 1px solid #b9cbd8;
    border-radius:6px;
    background: #ffffff;
}

.permit-accordion-button {
    width: 100%;
    min-height:62px;
    padding:12px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    border:0;
    background: #ffffff;
    color:#10243e;
    font:inherit;
    text-align:left;
    cursor:pointer;
}

.permit-accordion-button:hover {
    background:#f4f9fc;
}

.permit-accordion-button:focus-visible {
    outline:3px solid#005ea8;
    outline-offset: -3px;
}

.permit-accordion-title {
    font-size:16px;
    font-weight:700;
}

.permit-accordion-icon {
    flex: 0 0 36px;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #2878aa;
    border-radius:50%;
    color: #2878aa;
    font-size: 24px;
    font-weight: 400;
    line-height:1;
}

.permit-accordion.open {
    border-color:#2878aa;
}

.permit-accordion.open
.permit-accordion-button {
    background: #edf6fa;
}

.permit-accordion.open
.permit-accordion-title {
    color:#2878aa;
    text-decoration:underline;
    text-underline-offset:4px;
}

.permit-accordion.open
.permit-accordion-icon {
    background: #2878aa;
    color: #ffffff;
}

.permit-accordion-content {
    border-top:1px solid #d8e3ea;
}

.permit-accordion-content[hidden] {
    display:none;
}

.accordion-content-inner {
    padding:20px;
}


/*STANDARD DESKTOP 951px TO 1920px SMALLER FOR 1920 x 1080 */

@media (min-width: 951px) and (max-width: 1920px) {

    /* TITLE */
    .topbar {
        top:18px;
        left:18px;
        width: 390px;
        padding:15px 17px;
        border-radius: 16px;
    }

    .topbar h1 {
        margin-bottom:5px;
        font-size:21px;
    }

    .topbar p {
        font-size:1.5px;
        line-height: 1.4;
    }


    /* PERMIT KEY */
    .permit-key {
        top:18px;
        right:18px;
        width:280px;
        height:560px;
        max-height:calc(100vh - 36px);
        border-radius: 16px;
    }

    .permit-key-header {
        padding:14px 14px 10px;
    }

    .permit-key-header h2 {
        margin-bottom:4px;
        font-size:18px;
    }

    .permit-key-header p {
        margin-bottom:9px;
        font-size:10.5px;
        line-height:1.35;
    }

    /* SEARCH */
    .permit-search {
        height: 34px;
        gap:7px;
        padding:0 9px;
        border-radius:9px;
    }

    .permit-search img {
        width:15px;
        height:15px;
        flex:0 0 15px;
    }

    .permit-search input {
        font-size:11px;
    }

    /* PERMIT ITEMS */
    #permitKeyList {
        padding:1px 9px 10px;
    }

    .permit-key-item {
        min-height:37px;
        margin:4px 0;
        padding:5px 30px 5px 7px;
        gap:7px;
        border-radius:9px;
        font-size:10.5px;
    }

    .permit-key-dot {
        flex:0 0 21px;
        width:21px;
        height: 21px;
        font-size:14px;
    }

    .permit-key-item::after {
        right:10px;
        font-size:17px;
    }


    /* EXPLORE PROPERTY */
    .viewer-legend {
        left:18px;
        bottom:18px;
        width:245px;
        padding:14px;
        border-radius:16px;
    }

    .viewer-legend h2 {
        margin-bottom:9px;
        font-size:17px;
    }

    .viewer-legend li {
        gap:8px;
        margin:6px 0;
        font-size:10.5px;
        line-height:1.3;
    }

    .legend-symbol {
        flex:0 0 29px;
        width:29px;
        height:29px;
        border-radius:8px;
    }

    .legend-symbol img {
        width:18px;
        height: 18px;
    }
}


/*  TABLET 801px TO 950px*/

@media (min-width: 801px) and (max-width: 950px) {

    .topbar {
        top:16px;
        left:16px;
        width:350px;
        padding:14px 15px;
        border-radius:15px;
    }

    .topbar h1 {
        font-size:19px;
    }

    .topbar p {
        font-size:10.5px;
    }

    .permit-key {
        top:16px;
        right:16px;
        width:255px;
        height:520px;
        max-height:calc(100vh - 32px);
        border-radius:15px;
    }

    .permit-key-header {
        padding:12px 12px 9px;
    }

    .permit-key-header h2 {
        font-size:17px;
    }

    .permit-key-header p {
        margin-bottom:8px;
        font-size:10px;
    }

    .permit-search {
        height:33px;
    }

    .permit-key-item {
        min-height:36px;
        margin: 4px 0;
        font-size:10px;
    }

    .viewer-legend {
        left:16px;
        bottom:16px;
        width:225px;
        padding: 12px;
        border-radius:14px;
    }

    .viewer-legend h2 {
        margin-bottom:8px;
        font-size:16px;
    }

    .viewer-legend li {
        gap:7px;
        margin: 5px 0;
        font-size:9.5px;
    }

    .legend-symbol {
        flex:0 0 27px;
        width: 27px;
        height:27px;
    }

    .legend-symbol img {
        width:17px;
        height:17px;
    }
}


/* MOBILE / SMALL TABLET 800px AND BELOW
   IMPORTANT:HOUSE IS ON TOP. PERMIT KEY IS BELOW THE HOUSE. THEY DO NOT OVERLAP.*/

@media (max-width: 800px) {

    html,
    body {
        width:100%;
        height:100%;
        overflow:hidden;
    }


    /* BACKGROUND */
    .city-background {
        position:fixed;
        inset: 0;
    }


    /* 3D HOUSE AREA*/
    #viewer {
        position: absolute;
        top: 0;
        left:0;
        right:0;
        bottom:auto;
        width:100%;
        height:60vh;
        overflow:hidden;
    }


    /* TITLE OVER HOUSE */
    .topbar {
        top:10px;
        left: 10px;
        right: 10px;
        width:auto;
        max-width: none;
        padding: 12px 14px;
        border-radius:14px;
    }

    .topbar h1 {
        margin-bottom: 4px;
        font-size:18px;
        line-height:1.15;
    }

    .topbar p {
        font-size:10.5px;
        line-height:1.35;
    }

    /* DON'T SHOW EXPLORE CARD */
    .viewer-legend {
        display:none;
    }

    /* PERMIT KEY BELOW THE HOUSE */
    .permit-key {
        position: absolute;
        top:60vh;
        left:0;
        right:0;
        bottom:0;
        width:100%;
        height: 40vh;
        max-height: none;
        border-radius:18px 18px 0 0;
        background:rgba(255, 255, 255, 0.98);
        box-shadow:
            0 -8px 28px
            rgba(31, 41, 51, 0.14);
    }

    .permit-key-header {
        padding:12px 12px 8px;
    }

    .permit-key-header h2 {
        margin-bottom: 3px;
        font-size: 17px;
    }

    .permit-key-header p {
        margin-bottom:7px;
        font-size: 10px;
        line-height:1.3;
    }


    /* SEARCH */
    .permit-search {
        height:34px;
        gap:7px;
        padding:0 9px;
        border-radius: 9px;
    }

    .permit-search img {
        width:15px;
        height:15px;
        flex:0 0 15px;
    }

    .permit-search input {
        font-size:11px;
    }


    /* LIST */

    #permitKeyList {
        padding:0 9px 10px;
    }

    .permit-key-item {
        min-height:36px;
        margin: 4px 0;
        padding:5px 30px 5px 7px;
        gap: 7px;
        border-radius:9px;
        font-size:10.5px;
    }

    .permit-key-dot {
        flex:0 0 21px;
        width: 21px;
        height:21px;
        font-size:14px;
    }

    .permit-key-item::after {
        right:10px;
        font-size: 17px;
    }


    /* HOTSPOTS */
    .hotspot {
        width:30px;
        height:30px;
        border-width:2px;
        font-size:20px;
    }


    /*PERMIT POPUP */
    .permit-panel {
        position:fixed;
        top:8vh;
        left:10px;
        right:10px;
        bottom:10px;
        width:auto;
        max-height:84vh;
        transform:none;
        border-radius:16px;
    }

    .permit-header {
        padding:19px 52px 17px 18px;
    }

    .permit-header h2 {
        font-size:20px;
    }

    .permit-header p {
        font-size: 12px;
    }

    .permit-close {
        top:11px;
        right:11px;
        width:36px;
        height:36px;
        font-size:23px;
    }

    .permit-body {
        padding:17px;
    }

    .permit-section {
        margin-bottom:17px;
    }

    .permit-section h3,
    .permit-document-group h3 {
        font-size:15px;
    }

    .permit-section p,
    .required-documents li,
    .document-note {
        font-size: 12px;
    }


    /* ACCORDIONS */
    .permit-accordion-button {
        min-height:52px;
        padding:9px 12px;
    }

    .permit-accordion-title {
        font-size:14px;
    }

    .permit-accordion-icon {
        flex:0 0 31px;
        width:31px;
        height:31px;
        font-size:20px;
    }

    .accordion-content-inner {
        padding:15px;
    }


    /* STATUS ABOVE PERMIT KEY */
    #status {
        left:10px;
        bottom:calc(40vh + 10px);
        padding:8px 10px;
        font-size: 11px;
    }


    /* LOADER */
    .model-loading-card {
        width:min(310px,alc(100% - 28px));
        padding:24px 20px;
        border-radius:16px;
    }

    .model-loading-spinner {
        width:38px;
        height: 38px;
        margin-bottom: 13px;
    }

    .model-loading-title {
        font-size:17px;
    }

    .model-loading-text {
        font-size:11px;
    }
}


/* SMALL PHONES 480px AND BELOW*/

@media (max-width: 480px) {

    /* Give the Permit Key slightly more vertical space on narrow phones.*/

    #viewer {
        height:57vh;
    }

    .permit-key {
        top:57vh;
        height:43vh;
    }

    /* TITLE */
    .topbar {
        padding:10px 12px;
    }

    .topbar h1 {
        font-size:16px;
    }

    .topbar p {
        font-size:9.5px;
    }

    /* PERMIT KEY */
    .permit-key-header {
        padding:10px 10px 7px;
    }

    .permit-key-header h2 {
        font-size:16px;
    }

    .permit-key-header p {
        font-size:9.5px;
    }

    #permitKeyList {
        padding:0 8px 8px;
    }

    .permit-key-item {
        min-height:34px;
        font-size:10px;
    }


    /* HOTSPOTS */
    .hotspot {
        width:28px;
        height:28px;
        font-size: 18px;
    }

    /* STATUS */
    #status {
        bottom:calc(43vh + 8px);
    }
}