/* Check je wijk - Stylesheet */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.5;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #8892b0;
    font-size: 1rem;
}

/* Compact Header for Results */
.compact-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.compact-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.municipality-badge {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #ff6b35;
}

.back-link {
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #f7c531;
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-section h2 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 1.3rem;
}

.search-section p {
    color: #8892b0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.search-form {
    position: relative;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.input-group label {
    color: #8892b0;
    font-size: 0.85rem;
}

.input-group input {
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.2s;
}

.input-group input::placeholder {
    color: #8892b0;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
    background: rgba(255, 255, 255, 0.15);
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-radius: 8px;
    margin-top: 4px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.suggestion {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.suggestion:hover {
    background: rgba(255, 107, 53, 0.2);
}

/* Search Button */
.search-button {
    padding: 12px 24px;
    font-size: 1rem;
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 15px;
    width: 100%;
    max-width: 500px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.search-button:disabled {
    cursor: wait;
    opacity: 0.9;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-content p {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #ccd6f6;
}

.spinner-large {
    animation: spin 1s linear infinite;
    color: #ff6b35;
}

/* Popular Cities */
.popular-cities {
    margin-top: 25px;
    text-align: center;
}

.popular-cities p {
    color: #8892b0;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.city-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.city-buttons button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.city-buttons button:hover {
    background: rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Inline Field Error */
.field-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 0;
}

/* Info Section */
.info-section {
    text-align: center;
}

.info-section h3 {
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.2rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-3px);
}

.info-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.info-card h4 {
    color: #ff6b35;
    margin-bottom: 8px;
    font-size: 1rem;
}

.info-card p {
    color: #8892b0;
    font-size: 0.85rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: #8892b0;
    font-size: 0.8rem;
}

footer a {
    color: #ff6b35;
    text-decoration: none;
}

/* ===== RESULTS PAGE ===== */

.results-page .container {
    padding: 15px;
}

/* Hero Section - Integrated Stats + Score Comparison */
.hero-section {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-neighborhood {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-icon {
    font-size: 1.8rem;
}

.selected-info h2 {
    font-size: 1.1rem;
    margin: 0;
    color: #ffffff;
}

.selected-meta {
    font-size: 0.8rem;
    color: #8892b0;
    margin: 2px 0 0 0;
}

.original-badge {
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    color: #1a1a2e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.back-btn {
    padding: 6px 12px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 6px;
    color: #ff6b35;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    width: fit-content;
}

.back-btn:hover {
    background: rgba(255, 107, 53, 0.3);
}

.hero-scores {
    display: flex;
    gap: 15px;
}

.hero-score {
    text-align: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-width: 80px;
}

.hero-score.main {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.hero-score .score-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.hero-score.main .score-value {
    color: #ff6b35;
    font-size: 1.4rem;
}

.hero-score .score-label {
    font-size: 0.7rem;
    color: #8892b0;
    text-transform: uppercase;
}

/* Score Table Compact */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-table-compact {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.85rem;
}

.table-header-row,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 0.8fr;
    gap: 6px;
    padding: 6px 10px;
    align-items: center;
}

.table-header-row {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
}

.table-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.table-row.highlight {
    background: rgba(255, 107, 53, 0.1);
}

.td-metric {
    color: #ffffff;
}

.td-score {
    color: #ff6b35;
    font-weight: 600;
}

.td-avg {
    color: #8892b0;
}

.td-weight {
    color: #8892b0;
    text-align: right;
}

.table-row.info-row {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.table-row.info-row .td-metric {
    color: #8892b0;
    font-size: 0.8rem;
}

.table-row.info-row .td-score {
    color: #a0aec0;
    font-weight: 500;
}

.info-label {
    font-size: 0.65rem;
    color: #666;
    font-style: italic;
}

/* Hero Controls */
.hero-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.toggle-group {
    display: flex;
    gap: 5px;
}

.toggle-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: #8892b0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-btn.active {
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    color: #1a1a2e;
    border-color: transparent;
    font-weight: 600;
}

.config-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #8892b0;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.config-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Config Panel */
.config-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.config-panel.open {
    max-height: 150px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.config-grid {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
}

.config-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ff6b35;
}

.config-item input[type="number"] {
    width: 50px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.85rem;
}

.config-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.weight-total {
    color: #8892b0;
    font-size: 0.85rem;
}

.recalc-btn {
    padding: 8px 16px;
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    border: none;
    border-radius: 6px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.recalc-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
}

.recalc-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Map + Neighborhoods Side by Side */
.map-neighborhoods-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.map-column,
.neighborhoods-column {
    min-width: 0;
}

.section-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-header-compact h3 {
    font-size: 0.95rem;
    color: #ffffff;
    margin: 0;
}

.section-hint {
    color: #8892b0;
    font-size: 0.75rem;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 380px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Neighborhoods Column */
.neighborhoods-column {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.neighborhood-count {
    color: #8892b0;
    font-size: 0.8rem;
}

.neighborhoods-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    max-height: 340px;
    overflow-y: auto;
}

.neighborhood-row {
    display: grid;
    grid-template-columns: 50px 2fr 60px 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}

.neighborhood-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.neighborhood-row.selected {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.4);
}

.row-rank {
    color: #ff6b35;
    font-weight: 700;
    font-size: 0.9rem;
}

.row-name {
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-score {
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    color: #1a1a2e;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.row-detail {
    color: #8892b0;
    font-size: 0.85rem;
    text-align: right;
}

/* Scrollbar styling */
.neighborhoods-grid::-webkit-scrollbar {
    width: 6px;
}

.neighborhoods-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.neighborhoods-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.4);
    border-radius: 3px;
}

.neighborhoods-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.6);
}

/* ===== NEW RESULTS LAYOUT ===== */

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.results-header h1 {
    margin: 0;
    font-size: 1.8rem;
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-header .subtitle {
    margin: 0;
    color: #8892b0;
}

/* Results Main - 3 column grid */
.results-main {
    display: grid;
    grid-template-columns: 260px 1fr 380px;
    gap: 20px;
    min-height: calc(100vh - 180px);
}

/* Score Section (Left Column) */
.score-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.selected-info {
    margin-bottom: 15px;
}

.selected-info h3 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: #ffffff;
}

.rank-badge {
    background: linear-gradient(90deg, #ff6b35, #f7c531);
    color: #1a1a2e;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Score Boxes */
.score-boxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.score-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-box.total {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.score-box .score-label {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
}

.score-box .score-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}

.score-box.total .score-value {
    color: #ff6b35;
    font-size: 1.5rem;
}

.score-box .score-avg {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Metric Switches */
.metric-switches {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.switches-label {
    font-size: 0.8rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.switch-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.switch-name {
    font-size: 0.85rem;
    color: #ccd6f6;
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #8892b0;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background: linear-gradient(90deg, #ff6b35, #f7c531);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #1a1a2e;
}

/* Map Section (Middle Column) */
.map-section {
    min-width: 0;
}

.map-section .map-container {
    height: 100%;
    min-height: 500px;
}

/* Neighborhoods Section (Right Column) */
.neighborhoods-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.neighborhoods-section h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.neighborhoods-table-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.neighborhoods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.neighborhoods-table thead {
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 10;
}

.neighborhoods-table th {
    text-align: left;
    padding: 8px 6px;
    color: #8892b0;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.neighborhoods-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.neighborhoods-table th.sortable:hover {
    color: #ff6b35;
}

.neighborhoods-table th .sort-icon {
    font-size: 0.6rem;
    color: #ff6b35;
    margin-left: 3px;
}

.neighborhoods-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.neighborhoods-table .neighborhood-row {
    display: table-row;
    cursor: pointer;
    transition: background 0.2s;
}

.neighborhoods-table .neighborhood-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.neighborhoods-table .neighborhood-row.selected {
    background: rgba(255, 107, 53, 0.15);
}

.neighborhoods-table .rank {
    color: #ff6b35;
    font-weight: 700;
}

.neighborhoods-table .name {
    color: #ffffff;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.neighborhoods-table .score {
    color: #4ade80;
    font-weight: 600;
}

.neighborhoods-table .woz,
.neighborhoods-table .income,
.neighborhoods-table .ownership {
    color: #8892b0;
}

/* Scrollbar for table */
.neighborhoods-table-container::-webkit-scrollbar {
    width: 6px;
}

.neighborhoods-table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.neighborhoods-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.4);
    border-radius: 3px;
}

/* Responsive for new layout */
@media (max-width: 1100px) {
    .results-main {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .score-section {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .selected-info {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }

    .score-boxes {
        flex: 2;
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 0;
    }

    .score-box {
        flex: 1;
        min-width: 100px;
    }

    .metric-checkboxes {
        flex: 1;
        min-width: 200px;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0;
        padding-left: 15px;
    }
}

@media (max-width: 768px) {
    .results-main {
        grid-template-columns: 1fr;
    }

    .score-section {
        flex-direction: column;
    }

    .score-boxes {
        flex-direction: row;
    }

    .metric-checkboxes {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 0;
        padding-top: 12px;
    }

    .metric-checkboxes form {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .map-section .map-container {
        min-height: 350px;
    }

    .neighborhoods-table-container {
        max-height: 300px;
    }

    .neighborhoods-table .woz,
    .neighborhoods-table .income {
        display: none;
    }
}

/* ===== NEW VERTICAL LAYOUT ===== */

/* Vertical main layout */
.results-main-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Score Section at Top */
.score-section-top {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Score Boxes in a Row */
.score-boxes-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.score-boxes-row .score-box {
    flex: 1;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.score-boxes-row .score-box.total {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.score-boxes-row .score-box .score-label {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.score-boxes-row .score-box .score-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
}

.score-boxes-row .score-box.total .score-value {
    color: #ff6b35;
    font-size: 2rem;
}

.score-boxes-row .score-box .relative-score {
    color: #4ade80;
}

.score-boxes-row .score-box .score-absolute {
    font-size: 0.85rem;
    color: #ffffff;
    margin-top: 3px;
}

.score-boxes-row .score-box .score-avg {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.score-boxes-row .score-box.disabled {
    opacity: 0.4;
}

.score-boxes-row .score-box.disabled .relative-score {
    color: #8892b0;
}

.score-boxes-row .score-box.info-only {
    background: rgba(100, 100, 120, 0.15);
    border-color: rgba(100, 100, 120, 0.3);
}

.score-boxes-row .score-box.info-only .score-label {
    color: #a0a0b0;
}

/* Map and Table Row - Side by Side */
.map-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 450px;
}

.map-section-half {
    min-width: 0;
}

.map-section-half .map-container {
    height: 100%;
    min-height: 450px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.neighborhoods-section-half {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.neighborhoods-section-half h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.neighborhoods-section-half .neighborhoods-table-container {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* Responsive for vertical layout */
@media (max-width: 900px) {
    .map-table-row {
        grid-template-columns: 1fr;
    }

    .map-section-half .map-container {
        min-height: 350px;
    }

    .neighborhoods-section-half .neighborhoods-table-container {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .score-boxes-row {
        flex-direction: column;
    }

    .score-boxes-row .score-box {
        min-width: 100%;
    }
}
