/* ===== Базовые стили ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

#map {
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.coords-row {
    margin-top: 15px;
}

.coordinates {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.capacity-input {
    margin: 15px 0;
}

.capacity-input label {
    font-weight: bold;
    margin-right: 10px;
}

.capacity-input input {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 150px;
}

/* ===== Результаты ===== */
.results {
    display: none;
    margin-top: 20px;
}

.data-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.data-block h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 600;
    color: #555;
}

.data-value {
    color: #2c3e50;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #7f8c8d;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

/* ===== Почасовая таблица (секция) ===== */
#hourly-table {
    display: none;
    margin-top: 30px;
}

/* ===== Кнопка скачивания CSV ===== */
#download-section {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.download-hint {
    color: #666;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ===== SEO-блок ===== */
.seo-text {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* ===== Таблица почасовой выработки ===== */
.solar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.solar-table th {
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid #ddd;
}

.solar-table th:first-child {
    text-align: left;
}

.solar-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.solar-table td:first-child {
    text-align: left;
    font-weight: bold;
}

.solar-table .sum-row {
    font-weight: bold;
    background-color: #f0f0f0;
}

.solar-table .sum-row td {
    padding: 10px;
}

/* Легенда под таблицей */
.table-legend {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.table-legend .swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 5px;
    vertical-align: middle;
}


/* ===== Блок графиков (как в Global Solar Atlas) ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 20px;
    /* align-items: start — убираем, чтобы колонки растягивались на одну высоту */
}

.charts-left,
.charts-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* У панелей внутри колонок убираем нижний отступ —
   расстояния задаёт gap, иначе он добавляет лишние 20px снизу */
.charts-left .panel,
.charts-right .panel {
    margin-bottom: 0;
}

/* Нижняя панель в каждой колонке растягивается на остаток высоты */
.charts-left .panel:last-child,
.charts-right .panel:last-child {
    flex: 1;
}

.chart-panel h2 {
    margin: 0 0 5px;
    font-size: 1.15rem;
    color: #1f3349;
}

.chart-subtitle {
    margin: 0 0 15px;
    color: #8a97a5;
    font-size: 0.9rem;
}

.annual-stats {
    display: flex;
    gap: 60px;
    padding: 10px 0 5px 20px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
}

.stat-red   { color: #c4314b; }
.stat-green { color: #94c44b; }

.stat-label {
    color: #8a97a5;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Сетка мини-графиков 4 x 3, как на скриншоте */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 20px;
}

.profile-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1f3349;
    margin-bottom: 4px;
}



/* SVG-графики */
.chart-svg, .profile-svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-grid   { stroke: #e2e8ee; stroke-width: 1; }
.chart-bar    { fill: #c4314b; }
.profile-line { fill: none; stroke: #c4314b; stroke-width: 1.6; }
.chart-tick   { fill: #8a97a5; font-size: 11px; }
.profile-tick { fill: #8a97a5; font-size: 8px; }

@media (max-width: 900px) {
    .charts-grid { grid-template-columns: 1fr; }
    .profiles-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Водяной знак ===== */

/* внутри SVG-диаграммы */
.chart-watermark {
    fill: #1f3349;
    opacity: 0.07;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: none;
    user-select: none;
}

/* поверх панели с мини-графиками */
.watermarked {
    position: relative;
}

.watermarked::after {
    content: "Солнечные крыши";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-size: 2.6rem;
    font-weight: 700;
    color: #1f3349;
    opacity: 0.05;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* Для варианта 1 */
.install-params {
    margin-top: 15px;
}
.param-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}
.param-row:last-child {
    border-bottom: none;
}
.param-label {
    color: #666;
    font-size: 14px;
}
.param-value {
    font-weight: 600;
    color: #333;
}

/* Для варианта 2 */
.system-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}
.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.spec-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
}
.spec-label {
    font-size: 12px;
    color: #666;
}
.spec-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}


