/* Heat Trends overview styles: graphs, overview cards, overview tables */

/* Graph map */

.heat-trends-page .plot-graphs-card .card-body {
    min-height: 480px;
}
.heat-trends-page .plot-graphs-mask {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--plot-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.heat-trends-page .plot-graphs-map {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: 100%;
    min-height: 340px;
    max-height: 520px;
    background: #f4f6f8;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
@media (max-width: 991.98px) {
    .heat-trends-page .plot-graphs-map {
        max-height: 440px;
    }
}
@media (max-width: 1229.98px) {
    .heat-trends-page .plot-overview-top {
        flex-direction: column;
    }
    .heat-trends-page .plot-overview-top > [class*="col-"] {
        width: 100%;
    }
    .heat-trends-page .plot-overview-top .plot-overview-card.h-100 {
        height: auto !important;
    }
    .heat-trends-page .plot-graphs-map-wrap {
        aspect-ratio: auto;
        height: auto;
    }
    .heat-trends-page .plot-graphs-map {
        aspect-ratio: auto;
        height: clamp(320px, 52vh, 520px);
        max-height: none;
    }
}
.heat-trends-page .plot-graphs-recenter {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 5;
    padding: 6px 10px;
    border-radius: 10px;
}

/* Graph table */

.heat-trends-page .plot-graphs-table-wrap {
    max-height: none;
    max-width: 100%;
    overflow: visible;
    position: relative;
    z-index: 2;
}
.heat-trends-page #plot-graphs-table {
    width: 100%;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}
.heat-trends-page #plot-graphs-table th,
.heat-trends-page #plot-graphs-table td {
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    vertical-align: middle;
}
.heat-trends-page #plot-graphs-table thead tr:first-child th:first-child,
.heat-trends-page #plot-graphs-table tbody tr > :first-child {
    border-left: 1px solid #d0d0d0;
}
.heat-trends-page #plot-graphs-table thead tr:first-child th {
    border-top: 1px solid #d0d0d0;
}
.heat-trends-page #plot-graphs-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--plot-card-bg-subtle);
    background-clip: padding-box;
    box-sizing: border-box;
    box-shadow: none;
}
.heat-trends-page #plot-graphs-table thead th:first-child {
    z-index: 4;
}
.heat-trends-page #plot-graphs-table th:nth-child(1),
.heat-trends-page #plot-graphs-table th:nth-child(2),
.heat-trends-page .plot-graphs-col-id,
.heat-trends-page #plot-graphs-table td:nth-child(2) {
    width: 1%;
    white-space: nowrap;
}
.heat-trends-page #plot-graphs-table th:nth-child(3),
.heat-trends-page .plot-graphs-col-alias {
    width: 11rem;
    min-width: 9rem;
}
.heat-trends-page #plot-graphs-table th:nth-child(4),
.heat-trends-page .plot-graphs-col-color,
.heat-trends-page #plot-graphs-table th:nth-child(5),
.heat-trends-page .plot-graphs-col-order {
    width: 1%;
    min-width: 4.75rem;
    text-align: center;
    white-space: nowrap;
}
.heat-trends-page .plot-graphs-order-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.heat-trends-page .plot-graphs-order-btn {
    color: rgba(33, 37, 41, 0.85);
    line-height: 1;
    text-decoration: none;
    padding: 0;
}
.heat-trends-page .plot-graphs-order-btn i {
    font-size: 1rem;
}
.heat-trends-page .plot-graphs-order-btn:disabled {
    color: rgba(108, 117, 125, 0.55);
    opacity: 0.85;
    cursor: not-allowed;
}
.heat-trends-page .plot-graphs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
}
.heat-trends-page .plot-graphs-inline-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.65);
}
.heat-trends-page .plot-graphs-btn-edit {
    color: rgba(0, 0, 0, 0.75);
    background: rgba(248, 249, 250, 1);
}
.heat-trends-page .plot-graphs-btn-edit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.heat-trends-page .plot-graphs-alias-input {
    min-width: 0;
    width: 100%;
}
.heat-trends-page .plot-graphs-color-picker {
    position: relative;
    display: inline-block;
}
.heat-trends-page .plot-graphs-color-picker.is-disabled .plot-graphs-color-trigger {
    cursor: not-allowed;
    opacity: 0.65;
}
.heat-trends-page .plot-graphs-color-picker.is-disabled .plot-graphs-color-grid {
    display: none;
}
.heat-trends-page .plot-graphs-color-trigger {
    list-style: none;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.35rem;
    background: #fff;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.heat-trends-page .plot-graphs-color-trigger::-webkit-details-marker {
    display: none;
}
.heat-trends-page .plot-graphs-color-preview {
    width: 18px;
    height: 18px;
    border-radius: 0.2rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    display: inline-block;
}
.heat-trends-page .plot-graphs-color-grid {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.3rem;
    padding: 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.45rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    min-width: 150px;
}
.heat-trends-page .plot-graphs-color-option {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.2rem;
    padding: 0;
    cursor: pointer;
}
.heat-trends-page .plot-graphs-color-option.is-active {
    outline: 2px solid #000;
    outline-offset: 1px;
}
.heat-trends-page .plot-graphs-alias-input:disabled {
    background: #f1f3f5;
    color: rgba(0, 0, 0, 0.65);
    border-color: rgba(0, 0, 0, 0.12);
    cursor: not-allowed;
}

/* Overview cards */

.plot-overview-card, .plot-overview-section {
    border: 1px solid rgba(0, 0, 0, 0.075);
    border-radius: var(--plot-radius-md);
    background: var(--plot-card-bg);
}
.plot-overview-card {
    padding: 0.75rem;
}
@media (min-width: 1230px) {
    .heat-trends-page .plot-overview-top > .col-lg-5 > .plot-overview-card.h-100, .heat-trends-page .plot-overview-top > .col-lg-7 > .plot-overview-card.h-100 {
        display: flex;
        flex-direction: column;
        max-height: 465px;
        overflow: hidden;
    }
    .heat-trends-page .plot-overview-top > .col-lg-5 > .plot-overview-card.h-100 .plot-graphs-map-wrap {
        flex: 1 1 auto;
        min-height: 0;
        aspect-ratio: auto;
        height: 100%;
        max-height: 100%;
    }
    .heat-trends-page .plot-overview-top > .col-lg-5 > .plot-overview-card.h-100 .plot-graphs-map {
        height: 100%;
        max-height: none;
    }
    .heat-trends-page .plot-overview-top > .col-lg-7 > .plot-overview-card.h-100 .plot-graphs-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        max-height: none;
    }
}
.plot-overview-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.plot-overview-card-title {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.2;
}
.plot-overview-note {
    font-size: 0.95rem;
    line-height: 1.35;
}
.plot-graphs-map-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--plot-radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f7f7f7;
}
.plot-graphs-inline-mask {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.85rem;
}
.plot-graphs-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.plot-graphs-controls-main {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.plot-graphs-controls-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.plot-graphs-btn-export {
    text-decoration: underline;
    white-space: nowrap;
}
.plot-graphs-btn-export:disabled {
    opacity: 0.55;
    pointer-events: none;
}
.plot-graphs-mask-inner {
    text-align: center;
    padding: 1rem 1.25rem;
    border-radius: var(--plot-radius-md);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--plot-border-subtle);
}
.plot-overview-tables {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.plot-overview-section {
    overflow: hidden;
}
.plot-overview-section-title {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
#plot-results-overview-pane .tab-content {
    padding-top: 0.75rem;
}

/* Selected graphs */

.plot-graphs-selected-head {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    border-bottom: 1px solid var(--bs-nav-tabs-border-color, #dee2e6);
}
.plot-graphs-selected-head > .nav-tabs {
    flex: 0 1 auto;
    border-bottom: 0;
    margin-bottom: 0;
}
#plot-graphs-selected-tabs .nav-link {
    font-family: "Oswald", Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
}
.plot-graphs-selected-head .plot-graphs-selected-actions {
    margin-left: auto;
    padding-bottom: 0.6rem;
}
.plot-graphs-selected-head .plot-graphs-selected-actions .btn:disabled {
    opacity: 0.55;
}

/* Responsive rules */

@media (max-width: 1400px) {
    .heat-trends-page .plot-graphs-col-alias {
        width: 9rem;
        min-width: 8rem;
    }
    .heat-trends-page #plot-graphs-table {
        min-width: 100%;
    }
}
@media (max-width: 992px) {
    .plot-graphs-selected-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    .plot-graphs-selected-head > .nav-tabs {
        width: 100%;
    }
    .plot-graphs-selected-head .plot-graphs-selected-actions {
        margin-left: 0;
        padding-bottom: 0;
        width: 100%;
        justify-content: flex-start;
    }
}
#plot-results-overview-pane table[data-sort-table="graphs_land"] th .plot-state-pctile-note,
#plot-results-overview-pane table[data-sort-table="graphs_census"] th .plot-state-pctile-note {
    margin-right: 0.1rem;
}
#plot-results-overview-pane table[data-sort-table="graphs_land"] th .plot-state-pctile-note + .plot-sort-icon,
#plot-results-overview-pane table[data-sort-table="graphs_census"] th .plot-state-pctile-note + .plot-sort-icon {
    margin-left: 0.1rem;
}
