/* --- Base Layout --- */
.sq-interactive-map {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.sq-interactive-map-title {
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.5rem;
}

.sq-map-container svg {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

.sq-map-container svg .is-interactive path,
.sq-map-container svg .is-interactive polygon {
    stroke: #ffffff;
    stroke-width: 1px;
}

.sq-map-container .is-interactive {
    cursor: pointer;
}

/* Target paths directly and override inline styles */
.sq-map-container .is-interactive path,
.sq-map-container .is-interactive polygon {
    transition: fill 0.2s ease, stroke-width 0.2s ease;
}

.sq-map-container .is-interactive:focus,
.sq-map-container .is-interactive:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* --- Floating UI Tooltip Container --- */
.sq-map-tooltip {
    display: none;
    width: max-content;
    max-width: 640px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: auto; /* Allows clicking inside */
    transition: left 0.15s ease-out, top 0.15s ease-out;
}

/* The Z-Index Sandwich */
.tooltip-content {
    padding: 0; 
    position: relative;
    z-index: 2; 
    display: flex;
    overflow: hidden; 
}

.tooltip-arrow {
    position: absolute;
    background: #002e5c;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    border: 2px solid ##002e5c;
    /*border: 2px solid #8db7e1; */
    z-index: 1;
}

/* --- Close Button --- */
.sq-map-tooltip .sq-tooltip-close {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 40px;
    height: 40px;
    border: none;
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Condition 1: WITH Projects  */
.sq-map-tooltip .sq-tooltip-close.with-projects {
    /*background-color: #8db7e1;*/
    background-color: #002e5c;
    color: #fff; 
}

.sq-map-tooltip .sq-tooltip-close.with-projects:hover {
    color: #c9d2de;
}

/* Condition 2: WITHOUT Projects  */
.sq-map-tooltip .sq-tooltip-close.without-projects {
    background-color: transparent; 
    color: #002e5c;
}

.sq-map-tooltip .sq-tooltip-close.without-projects:hover {
    background-color: #002e5c;
    color: #fff;
}

/* --- Left Column (Stats) --- */
.sq-tooltip-stats {
    flex: 1;
    /*border: 4px solid #8db7e1;*/
    border: 4px solid #002e5c;
    min-width: 260px;
    padding: 12px;
    background-color: #ffffff; 
}

.sq-tooltip-stats.no-projects {
    min-width: 208px;
}

.sq-map-tooltip h4 {
    margin: 0 0 16px 0;
}

.sq-stats-grid {
    display: flex;
    gap: 14px;
}

.sq-stat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #002e5c;
    padding-left: 14px;
}

.sq-stat-panel:first-child {
    border-left: none;
    padding-left: 0;
}

.sq-stat-panel .stat-value {
    font-size: 1.5rem;
    color: #2f6597;
    margin-bottom: 8px;
    font-weight: bold;
    white-space: nowrap;
}

.sq-stat-panel .stat-label {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #222;
}

/* --- Right Column (Projects) --- */
.sq-projects-wrapper {
    background-color: #002e5c;
    display: flex;
    flex-direction: column;
}

.sq-map-tooltip h4 .sq-seq-label {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    /*color: #fff;*/
    margin: 0 0 2px 0;
    text-transform: uppercase;
}

/* Single Project */
.sq-projects-wrapper.sq-projects-single {
    width: 220px; 
    border: 4px solid #002e5c;
    border-left: none; 
}

.sq-projects-single {
    /*height: 100%;*/
}

.sq-projects-single .sq-project-highlight {
    display: flex;
    flex-direction: column;
    height:100%;
}

.sq-projects-single .project-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    margin: 0 !important;
}

.sq-projects-single .project-details {
    display:flex;
    flex-direction: column;
    padding: 12px 16px;
    flex: 1;
}

.sq-projects-single .title {
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: bold;
    /*color: #222;*/
    color: #fff;
    margin: 0;
}

.sq-projects-single .summary {
    font-size: 0.8rem;
    line-height: 1.15;
    /*color: #333;*/
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sq-projects-single .learn-more-arrow {
    align-self: flex-end;
    margin-top: auto;
    display: inline-flex;
    transition: transform 0.2s ease;
}

/* Multi Projects  */
.sq-projects-wrapper.sq-projects-multi {
    width: 300px; 
}

.sq-projects-multi .sq-project-highlight {
    display: flex;
    flex-direction: row; 
    border-bottom: 2px solid #ffffff;
    align-items: stretch;
    min-height: 96px; 
    position: relative;
    flex: 1;
}

.sq-projects-multi .sq-project-highlight:last-child {
    border-bottom: none;
}

.sq-projects-multi .project-details {
    flex: 1;
    padding: 12px 110px 12px 12px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: 4px; 
}

.sq-projects-multi .title {
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.sq-projects-multi .learn-more-arrow {
    align-self: flex-end; 
    margin-top: auto;
    display: inline-flex;
    transition: transform 0.2s ease;
}

.sq-project-highlight:hover .learn-more-arrow {
    transform: translateX(4px); 
}

.sq-projects-multi .project-thumbnail {
    position: absolute; 
    right: 0;
    top: 0;
    width: 100px;
    height: 100%;
    object-fit: cover;
    border-left: 2px solid #ffffff;
    display: block;
    margin: 0;
}

a.sq-project-highlight {
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    outline: none; 
}

@media (max-width: 800px) {
    .sq-map-tooltip {
        width: clamp(400px, 85vw, 600px);
    }

    .tooltip-content {
        flex-direction: column; 
    }

    .sq-tooltip-stats {
        width: 100%;
        min-width: 100% !important;
        /*border-bottom: none; */
        flex: auto; 
        padding: 16px; 
    }

    .sq-stats-grid {
        flex-wrap: nowrap !important; 
        gap: 12px; 
    }
    .sq-stat-panel {
        min-width: 0 !important; 
        flex: 1 1 0%; 
        padding-left: 12px;
    }
    .sq-stat-panel:first-child {
        padding-left: 0;
    }
    
    .sq-stat-panel .stat-value {
        font-size: 1.5rem; 
        margin-bottom: 8px;
    }
    .sq-stat-panel .stat-label {
        font-size: 0.85rem; 
        line-height: 1.25;
    }

    .sq-projects-wrapper.sq-projects-multi,
    .sq-projects-wrapper.sq-projects-single {
        width: 100%;
        border: 4px solid #8db7e1;
        border-top: none;
        border-bottom: none;
        border-left: none;
        border-right: none;
        box-sizing: border-box;
    }

    .sq-projects-single .project-details {
        padding: 20px;
    }
    .sq-projects-multi .project-details {
        padding: 16px 146px 16px 16px;
    }
    
    .sq-projects-single .title,
    .sq-projects-multi .title {
        font-size: 1rem; 
    }
}

@media (max-width: 480px) {
    .sq-interactive-map {
        display: none !important;
    }
    .sq-housing-table-container.mobile-only {
        display:block;
    }
    .sq-housing-table-container.desktop-only {
        display:none;
    }
}
/* --- Base Layout --- */
.sq-housing-table-container {
    max-width: 900px; 
    margin: 20px 0;
    color: #1c2d5a; 
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background-color: #fff;
}
.sq-housing-table-container.mobile-only {
    display:none;
}

.sq-housing-table-container h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: bold;
    padding: 15px 15px 5px 15px;
}

.sq-housing-table-container p.date-subtitle {
    margin: 0 0 10px 0;
    font-weight: bold;
    font-size: 1rem;
    padding: 0 15px 10px 15px;
}

.sq-housing-table-container .date-subtitle p {
    margin: 0 0 1rem 0;
    font-weight: bold;
    font-size: 1rem;
    padding: 0 15px 10px 15px;
}

.table-responsive-wrapper ul.table-footnote {
    list-style:none;
    font-size: 0.9rem;
}

/* --- Responsive Wrapper --- */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
}

.sq-housing-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.sq-housing-table th {
    vertical-align: bottom;
    padding: 12px 15px;
    font-weight: bold;
    line-height: 1.25;
    border-top: 1px solid #f0f0f0;
    border-bottom: 2px solid #82b1ff; 
}

.sq-housing-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #f0f0f0; 
    color: #444444; 
    vertical-align: top;
}

.sq-housing-table tbody tr:nth-child(odd) {
    background-color: #f5f5f5;
}

.sq-housing-table td:first-child {
    color: #1c2d5a; 
    font-weight: bold;
    width: 20%;
}

.sq-housing-table th:nth-child(2) { width: 30%; }
.sq-housing-table th:nth-child(3) { width: 30%; }
.sq-housing-table th:nth-child(4) { width: 20%; }

.sq-housing-table tfoot tr {
    background-color: #f5f5f5; 
}

.sq-housing-table tfoot td {
    font-weight: bold;
    color: #1c2d5a;
    border-bottom: none; 
}

@media (max-width: 480px) {
    .sq-housing-table-container h3 {
        font-size: 1.15rem;
    }
    .sq-housing-table th, .sq-housing-table td {
        font-size: 0.8rem;
    }
}
.accordion__highlights {
    display: none;
}
@media (max-width: 480px) {
    .accordion__highlights {
        display: block;
    }
}
a.ft {
    margin-left: 0.25rem;
}