/* City Page Redesign CSS */

/* General Layout */
.bg-light {
    background-color: #f8f9fa;
}

.page-title-section {
    margin-bottom: 32px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 24px;
    color: #1a1a1a;
    border-left: 4px solid #fe9900;
    padding-left: 16px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Price Card Redesign */
.price-card-redesign {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf5 100%);
    border: 1px solid #ffeeba;
    position: relative;
    overflow: hidden;
}

.price-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 12px;
}

.price-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.price-card-unit {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
}

.price-card-range {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
    background: rgba(254, 153, 0, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

/* Indicators Grid */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.indicator-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.indicator-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.indicator-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #fff9f0;
    color: #fe9900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.indicator-icon-box .material-symbols-rounded {
    font-size: 24px;
}

.indicator-details {
    flex: 1;
}

.indicator-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.indicator-stat {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Tourism Grid */
.tourism-grid {
    grid-template-columns: 2fr 1fr;
}

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

/* Rental Indicators Grid */
.rental-indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

/* Chart Side Stats */
.chart-side-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Map Card */
.map-card-container {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

#map {
    flex: 1;
    min-height: 550px;
    width: 100%;
}

.map-notice {
    padding: 12px;
    font-size: 0.85rem;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    color: #666;
}

/* Charts */
.pie-chart,
.line-chart {
    width: 100%;
    min-height: 250px;
}

/* Tables */
.city-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.95rem;
}

.city-table tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.city-table tr:hover {
    background-color: #fcfcfc;
}

.city-table tr:last-child {
    border-bottom: none;
}

.city-table td {
    padding: 16px 8px;
    vertical-align: middle;
}

.city-table .label {
    color: #4a4a4a;
    font-weight: 500;
}

.city-table .value {
    font-weight: 600;
    text-align: right;
    color: #1a1a1a;
}

.city-table .total-row {
    border-top: 2px solid #eee;
    font-weight: 700;
    background-color: #fdfdfd;
}

.city-table .total-row td {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Override legacy styles from styles.css that cause blue background */
.city-table tr:nth-child(odd),
.city-table tr:nth-child(even) {
    background-color: transparent;
    color: inherit;
}

.city-table strong {
    color: inherit;
    font-size: inherit;
}

/* Links */
.useful-links {
    list-style: none;
    padding: 0;
}

.useful-links li a {
    color: #fe9900;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.useful-links li a:hover {
    color: #e08800;
    text-decoration: underline;
}

.useful-links-container {
    column-count: 2;
    column-gap: 32px;
    margin: 0;
    padding-left: 20px;
}

/* Utilities */
.text-muted {
    color: #666;
}

.text-small {
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-1 {
    margin-top: 4px !important;
}

.mb-1 {
    margin-bottom: 4px !important;
}

.mt-2 {
    margin-top: 8px !important;
}

.mb-2 {
    margin-bottom: 8px !important;
}

.mt-3 {
    margin-top: 16px !important;
}

.mb-3 {
    margin-bottom: 16px !important;
}

.mb-4 {
    margin-bottom: 24px !important;
}

/* Stars override for cards */
.stars-city-page {
    font-size: 18px;
    color: #ddd;
    position: relative;
    display: inline-block;
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #fe9900;
}

.stars-outer::before {
    content: "star star star star star";
    font-family: 'Material Symbols Rounded';
}

.stars-inner::before {
    content: "star star star star star";
    font-family: 'Material Symbols Rounded';
}

/* Layout Utilities (Added) */
.card-flex-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.card-main-content {
    flex: 1;
    min-width: 300px;
}

.card-sidebar {
    min-width: 250px;
}

.sidebar-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-container-medium {
    height: 250px;
}

.chart-container-small {
    height: 200px;
}

.stat-box {
    flex: 1;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.stat-box-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-icon-green,
.stat-text-green {
    color: #28a745;
}

.stat-icon-orange,
.stat-text-orange {
    color: #fd7e14;
}

.stat-icon-neutral {
    color: #333;
}

.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

/* Responsive */
@media (max-width: 768px) {
    .charts-grid-2 {
        grid-template-columns: 1fr;
    }
}

.pie-chart-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.25rem;
    }

    .price-card-value {
        font-size: 2rem;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
    }

    .useful-links-container {
        column-count: 1;
    }
}

/* Restored Content Styles */
.profitability-explanation {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: left;
}

.alur-zones-list {
    margin-top: 8px;
    padding-left: 20px;
    color: #666;
    font-size: 0.9rem;
}

.chart-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 16px;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    /* Ensure it fills the grid cell if stretched, but we will control stretch via grid */
    box-sizing: border-box;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: 16px;
    color: #1a1a1a;
    text-align: center;
}

#radar-chart {
    min-height: 400px;
}

/* Generic Table Styles within Card Content */
.card-main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.card-main-content table tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.card-main-content table tr:hover {
    background-color: #fcfcfc;
}

.card-main-content table tr:last-child {
    border-bottom: none;
}

.card-main-content table td,
.card-main-content table th {
    padding: 12px 8px;
    vertical-align: middle;
    text-align: left;
}

.card-main-content table th {
    font-weight: 600;
    color: #4a4a4a;
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
}

/* Override legacy styles */
.card-main-content table tr:nth-child(odd),
.card-main-content table tr:nth-child(even) {
    background-color: transparent;
    color: inherit;
}
