/* sun-moon-map-calendar-style.css - Z księżycem */

.sun-moon-map-calendar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.4;
}

/* Sekcja mapa + informacje */
.sun-moon-map-section {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 15px;
    align-items: start;
}

/* Sekcja słońce i księżyc pod mapą */
.sun-moon-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.sun-moon-map-container {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
    background: #f0f0f0;
    overflow: hidden;
}

.sun-moon-map-container .leaflet-container {
    border-radius: 8px;
    height: 100% !important;
    width: 100% !important;
}

/* Panel informacji o ciałach niebieskich */
.celestial-info-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.celestial-section {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.location-section { border-left: 4px solid #2ecc71; }
.sun-section      { border-left: 4px solid #ffc107; }
.moon-section     { border-left: 4px solid #6f42c1; }

/* Lista rozwijana krajów */
.country-select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #2ecc71;
    border-radius: 4px;
    background: white;
    font-size: 0.95em;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}
.country-select:hover { border-color: #27ae60; box-shadow: 0 0 0 3px rgba(46,204,113,0.15); }
.country-select:focus { outline: none; border-color: #27ae60; box-shadow: 0 0 0 4px rgba(46,204,113,0.25); }

/* Lista rozwijana miast */
.city-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    font-size: 0.9em;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    line-height: 1.3;
}
.city-select:hover { border-color: #2ecc71; box-shadow: 0 0 0 2px rgba(46,204,113,0.1); }
.city-select:focus { outline: none; border-color: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,0.2); }

.city-select option,
.country-select option { padding: 4px 8px; line-height: 1.4; }

.celestial-section h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.1em;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.celestial-section h4 {
    color: #495057;
    margin: 10px 0 6px 0;
    font-size: 0.9em;
    font-weight: 600;
}

.info-section { margin-bottom: 12px; }

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.85em;
    align-items: center;
}

.info-item .label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.info-item .value {
    font-weight: 500;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.03);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    text-align: right;
    min-width: 70px;
}

/* Wyświetlanie fazy księżyca */
.moon-phase-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f0ff 0%, #e9ecef 100%);
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.moon-phase-icon { font-size: 2em; min-width: 50px; text-align: center; }
.moon-phase-text { font-weight: 600; color: #6f42c1; font-size: 1em; }
.moon-illumination {
    margin-left: auto;
    background: #6f42c1;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

/* Przyciski sterujące */
.celestial-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 5px;
}

.celestial-controls .button {
    background: #495057;
    color: white;
    border: none;
    padding: 10px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.celestial-controls .button:hover {
    background: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Sekcja kalendarza */
.calendar-section {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.calendar-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
    white-space: nowrap;
}

.calendar-nav { display: flex; gap: 6px; }

.calendar-nav .button {
    background: #495057;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    font-weight: 600;
    white-space: nowrap;
}

.calendar-nav .button:hover { background: #6c757d; transform: translateY(-1px); }

/* Przełącznik widoku kalendarza */
.calendar-view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.view-btn {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-btn.active { background: #3498db; color: white; border-color: #2980b9; }
.view-btn:hover:not(.active) { background: #dee2e6; }

/* Tabela kalendarza */
.sun-moon-calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    font-size: 0.85em;
    table-layout: fixed;
}

.sun-moon-calendar-table th {
    background: #3498db;
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #2980b9;
    font-size: 0.9em;
    width: 14.28%;
}

.sun-moon-calendar-table th:nth-child(6),
.sun-moon-calendar-table th:nth-child(7) {
    background: #ff9800;
    border-color: #f57c00;
    font-weight: 700;
}

.sun-moon-calendar-table td {
    padding: 3px;
    border: 1px solid #e9ecef;
    vertical-align: top;
    height: 90px;
    width: 14.28%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.sun-moon-calendar-table td.empty    { background: #f8f9fa; }
.sun-moon-calendar-table td.calendar-day { transition: all 0.2s; cursor: pointer; }
.sun-moon-calendar-table td.calendar-day:hover {
    background: #e7f5ff;
    transform: scale(1.01);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    z-index: 1;
}
.sun-moon-calendar-table td.today {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    font-weight: bold;
    border: 3px solid #2196F3;
    box-shadow: 0 0 10px rgba(33,150,243,0.4);
}
.sun-moon-calendar-table td.weekend {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 3px solid #ffa726;
}
.sun-moon-calendar-table td.full-moon { border-bottom: 3px solid #6f42c1; }
.sun-moon-calendar-table td.new-moon  { border-bottom: 3px solid #343a40; }

.day-number {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3px;
    color: #2c3e50;
    padding: 5px 7px;
    background: rgba(255,255,255,0.95);
    border-radius: 4px;
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sun-times, .moon-times, .celestial-times {
    font-size: 0.95em;
    padding: 0 3px;
    position: absolute;
    bottom: 3px;
    left: 3px;
    right: 3px;
}

.sun-time, .moon-time, .celestial-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.sun-time  { background: rgba(255,193,7,0.15);  border-left: 2px solid #ffc107; color: #2c3e50; }
.moon-time { background: rgba(111,66,193,0.15); border-left: 2px solid #6f42c1; color: #2c3e50; }
.celestial-time.sun  { background: rgba(255,193,7,0.12);  margin-bottom: 2px; font-size: 0.9em; }
.celestial-time.moon { background: rgba(111,66,193,0.12); font-size: 0.8em; }
.celestial-time span { font-weight: bold; font-size: 0.9em; }

.moon-phase-icon-inline { font-size: 0.85em; margin-left: 3px; opacity: 0.9; }

/* Legenda */
.calendar-legend {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 0.8em;
    flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
}
.legend-color.today   { background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); }
.legend-color.weekend { background: #f8f9fa; }
.legend-color.full-moon,
.legend-color.new-moon { border: none; font-size: 1.2em; width: auto; height: auto; background: transparent; }

/* ===========================
   Kalendarz roczny
=========================== */
.year-calendar-container {
    margin-top: 20px;
    padding: 11px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100%;
    overflow-x: auto;
}

.year-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.year-calendar-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-year-btn {
    background: #6c757d;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}
.close-year-btn:hover { background: #495057; transform: scale(1.1); }

.year-calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.year-calendar-month {
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    min-width: 0;
}

.year-calendar-month:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }

.year-calendar-month h4 {
    text-align: center;
    margin: 0 0 15px 0;
    color: #3498db;
    font-size: 1.1em;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.year-calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: 1px solid #dee2e6;
    font-size: 0.85em;
    table-layout: fixed;
}

.year-calendar-table th {
    background: #3498db;
    color: white;
    padding: 8px 2px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #2980b9;
    font-size: 0.9em;
    width: 14.28%;
}

.year-calendar-table th:nth-child(6),
.year-calendar-table th:nth-child(7) {
    background: #ff9800;
    border-color: #f57c00;
    font-weight: 700;
}

.year-calendar-table td {
    padding: 3px;
    border: 1px solid #e9ecef;
    vertical-align: top;
    height: 85px;
    width: 14.28%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.year-calendar-table td.empty { background: #f8f9fa; }
.year-calendar-table td.year-calendar-day { transition: all 0.2s; cursor: pointer; }
.year-calendar-table td.year-calendar-day:hover {
    background: #e7f5ff;
    transform: scale(1.01);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    z-index: 1;
}
.year-calendar-table td.today {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    font-weight: bold;
    border: 3px solid #2196F3;
    box-shadow: 0 0 8px rgba(33,150,243,0.4);
}
.year-calendar-table td.weekend {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 3px solid #ffa726;
}

.year-day-number {
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3px;
    color: #2c3e50;
    padding: 3px 5px;
    background: rgba(255,255,255,0.95);
    border-radius: 4px;
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.year-celestial-times {
    position: absolute;
    bottom: 3px;
    left: 3px;
    right: 3px;
    font-size: 0.75em;
}

.year-celestial-time.sun {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    background: rgba(255,193,7,0.12);
    color: #2c3e50;
}

.year-celestial-time.sun:first-child::before { content: none; color: #ffc107; font-weight: bold; margin-right: 4px; }
.year-celestial-time.sun:last-child::before  { content: none; color: #ffc107; font-weight: bold; margin-right: 4px; }

/* Sekcja faz księżyca */
.moon-phases-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.moon-phases-section h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.moon-phases-container { overflow-x: auto; }

.moon-phases-grid {
    display: flex;
    gap: 15px;
    padding: 5px;
    flex-wrap: nowrap;
    min-width: min-content;
}

.moon-phase-item {
    flex: 0 0 auto;
    width: 120px;
    background: #f8f0ff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
    transition: all 0.2s;
}

.moon-phase-item:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(111,66,193,0.2); background: white; }

.moon-phase-date        { font-weight: 600; color: #6f42c1; font-size: 0.9em; margin-bottom: 8px; }
.moon-phase-icon-large  { font-size: 2.5em; margin-bottom: 5px; height: 50px; display: flex; align-items: center; justify-content: center; }
.moon-phase-name        { font-weight: 600; color: #495057; font-size: 0.85em; margin-bottom: 5px; }
.moon-phase-illumination { background: #6f42c1; color: white; padding: 3px 8px; border-radius: 20px; font-size: 0.8em; font-weight: bold; display: inline-block; }

/* ===========================
   Kompaktowa wersja
=========================== */
.sun-moon-map-calendar-wrapper.compact { gap: 15px; }
.sun-moon-map-calendar-wrapper.compact .sun-moon-map-section { gap: 10px; }
.sun-moon-map-calendar-wrapper.compact .sun-moon-map-container { min-height: 320px; height: 320px; }
.sun-moon-map-calendar-wrapper.compact .celestial-info-panel { padding: 12px; }
.sun-moon-map-calendar-wrapper.compact .celestial-section { padding: 10px; }
.sun-moon-map-calendar-wrapper.compact .info-section { margin-bottom: 10px; }
.sun-moon-map-calendar-wrapper.compact .info-item { margin-bottom: 4px; padding: 4px 0; font-size: 0.8em; }
.sun-moon-map-calendar-wrapper.compact .calendar-section { padding: 15px; }
.sun-moon-map-calendar-wrapper.compact .sun-moon-calendar-table td { height: 80px; }
.sun-moon-map-calendar-wrapper.compact .day-number { font-size: 13px; }
.sun-moon-map-calendar-wrapper.compact .moon-phases-section { padding: 12px; }
.sun-moon-map-calendar-wrapper.compact .moon-phase-item { width: 110px; padding: 8px; }

/* ===========================
   ZJAWISKA ASTRONOMICZNE
=========================== */
.phenomena-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eaf6 100%);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #c5cae9;
    margin-top: 15px;
}

.phenomena-section > h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #c5cae9;
    padding-bottom: 10px;
}

.phenomena-planets { border-left: 4px solid #3f51b5; }
.phenomena-meteors { border-left: 4px solid #e65100; }
.phenomena-other   { border-left: 4px solid #00897b; }

.phenomena-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82em;
    margin-top: 8px;
}

.phenomena-table th { background: #3f51b5; color: white; padding: 7px 10px; text-align: left; font-weight: 600; font-size: 0.9em; }
.phenomena-meteors-table th { background: #e65100; }
.phenomena-table td { padding: 6px 10px; border-bottom: 1px solid #e8eaf6; vertical-align: top; }
.phenomena-table tr:last-child td { border-bottom: none; }
.phenomena-table tr:hover td { background: rgba(63,81,181,0.05); }

.phen-planet-name { font-weight: 700; color: #283593; white-space: nowrap; min-width: 85px; }
.phen-state { white-space: nowrap; min-width: 155px; font-size: 0.9em; }
.phen-note  { color: #546e7a; font-size: 0.85em; font-style: italic; }
.phen-zhr   { font-weight: 700; color: #e65100; text-align: center; }
.phen-active-label { font-weight: 700; color: #2e7d32; margin: 4px 0 8px 0; font-size: 0.9em; }
.phen-no-events { color: #757575; font-style: italic; font-size: 0.9em; padding: 10px 0; }

.phen-details {
    margin-top: 12px;
    font-size: 0.85em;
    border-top: 1px dashed #c5cae9;
    padding-top: 8px;
}
.phen-details summary { cursor: pointer; color: #5c6bc0; font-weight: 600; padding: 4px 0; user-select: none; }
.phen-details summary:hover { color: #3949ab; }
.phen-details ul { margin: 8px 0 0 18px; padding: 0; color: #546e7a; line-height: 1.7; }

.phenomena-other-list { margin: 8px 0 0 0; padding: 0 0 0 18px; font-size: 0.88em; line-height: 1.8; }
.phenomena-other-list li { color: #2c3e50; margin-bottom: 3px; }

/* Najbliższe zjawiska */
.phenomena-upcoming-list { list-style: none; margin: 8px 0 0 0; padding: 0; }
.phen-upcoming-item { display: flex; align-items: baseline; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #e8eaf6; font-size: 0.84em; }
.phen-upcoming-item:last-child { border-bottom: none; }
.phen-ev-icon { font-size: 1.1em; flex-shrink: 0; }
.phen-ev-date { color: #5c6bc0; font-weight: 700; white-space: nowrap; min-width: 95px; font-size: 0.9em; }
.phen-ev-name { color: #2c3e50; }
.phen-urgent { background: #fff3e0; border-left: 3px solid #e65100; }
.phen-soon   { background: #f3e5f5; border-left: 3px solid #7b1fa2; }
.phen-section-label { font-weight: 700; color: #283593; font-size: 0.9em; margin: 4px 0 6px 0; }
.phen-tip { margin-top: 10px; padding: 6px 10px; background: #e8f5e9; border-radius: 4px; font-size: 0.83em; color: #1b5e20; border-left: 3px solid #43a047; }

/* ===========================
   DATE PICKER Z STRZAŁKAMI
=========================== */
.date-section { border-left: 4px solid #3498db; }

.date-picker-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    width: 100%;
}

.date-picker-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 8px;
    border: 2px solid #3498db;
    border-radius: 6px;
    background: white;
    font-size: 0.9em;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    max-width: 160px;
}
.date-picker-input:hover { border-color: #2471a3; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }
.date-picker-input:focus { outline: none; border-color: #2471a3; box-shadow: 0 0 0 4px rgba(52,152,219,0.22); }

.date-nav-btn {
    flex-shrink: 0;
    width: 32px;
    height: 34px;
    background: linear-gradient(145deg, #3498db, #2471a3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.72em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(36,113,163,0.4);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    line-height: 1;
}
.date-nav-btn:hover  { background: linear-gradient(145deg, #2471a3, #1a5276); box-shadow: 0 4px 10px rgba(36,113,163,0.5); transform: translateY(-2px); }
.date-nav-btn:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(36,113,163,0.3); }

/* ===========================
   RESPONSYWNOŚĆ
=========================== */
@media (max-width: 1200px) {
    .year-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .sun-moon-map-section    { grid-template-columns: 1fr; gap: 12px; }
    .sun-moon-map-container  { height: 350px; min-height: 350px; }
    .celestial-controls      { grid-template-columns: 1fr; }
    .toggle-moon-btn         { grid-column: 1; }
    .sun-moon-info-section   { grid-template-columns: 1fr; }
    .year-calendar-grid      { grid-template-columns: 1fr; gap: 15px; }
    .year-calendar-month     { padding: 10px; }
}

@media (max-width: 768px) {
    .sun-moon-map-calendar-wrapper { gap: 15px; margin: 10px 0; }
    .sun-moon-map-container        { height: 300px; min-height: 300px; }
    .sun-moon-info-section         { grid-template-columns: 1fr; }
    .year-calendar-grid            { grid-template-columns: 1fr; }

    .calendar-header               { flex-direction: column; text-align: center; gap: 8px; }
    .calendar-header h3            { font-size: 1em; white-space: normal; }
    .calendar-nav                  { width: 100%; justify-content: center; flex-wrap: wrap; }
    .calendar-nav .button          { font-size: 0.78em; padding: 5px 8px; }

    /* Kalendarz – pełna szerokość na mobile */
    .calendar-section {
        padding: 10px 4px;
        border-radius: 4px;
        overflow-x: hidden;
    }
    .calendar-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sun-moon-calendar-table {
        width: 100%;
        table-layout: fixed;
        font-size: 0.72em;
    }
    .sun-moon-calendar-table th   { padding: 6px 2px; font-size: 0.78em; }
    .sun-moon-calendar-table td   { height: 72px; padding: 2px; width: 14.28%; }
    .day-number                   { font-size: 13px; padding: 3px 4px; }

    .calendar-view-toggle         { flex-wrap: wrap; gap: 5px; }
    .view-btn                     { font-size: 0.78em; padding: 6px 8px; flex: 1 1 auto; }

    .year-calendar-table td { height: 60px; }
    .sun-times, .moon-times, .celestial-times { font-size: 0.75em; }
    .year-celestial-times { font-size: 0.7em; }

    .moon-phases-grid { flex-wrap: wrap; justify-content: center; }
    .moon-phase-item  { width: calc(33.333% - 10px); min-width: 100px; }

    .phenomena-table  { font-size: 0.75em; }
    .phen-note        { display: none; }
    .phenomena-section { padding: 12px; }
    .phen-state       { min-width: auto; }
	
}

@media (max-width: 576px) {
    .sun-moon-map-calendar-wrapper { margin: 5px -8px; }
    .sun-moon-map-container        { height: 250px; min-height: 250px; }

    /* Kalendarz – jeszcze węższe fonty, minimalne paddingi */
    .calendar-section {
        padding: 6px 2px;
        border-radius: 0;
    }
    .sun-moon-calendar-table       { font-size: 0.65em; }
    .sun-moon-calendar-table th    { padding: 4px 1px; font-size: 0.72em; }
    .sun-moon-calendar-table td    { height: 60px; padding: 1px; }
    .day-number                    { font-size: 11px; padding: 2px 3px; }
    .celestial-time                { font-size: 0.7em !important; padding: 2px 3px !important; }

    .sun-times, .moon-times, .celestial-times {
        display: block;
        font-size: 0.7em;
        bottom: 2px;
        left: 2px;
        right: 2px;
    }

      /* === KALENDARZ ROCZNY NA MOBILE === */
    .year-calendar-grid {
        grid-template-columns: 1fr;  /* jeden miesiąc na szerokość */
        gap: 10px;
    }

    .year-calendar-table {
        font-size: 0.6em;
        table-layout: fixed;
    }

    .year-calendar-table th {
        padding: 3px 1px;
        font-size: 0.68em;
    }

    .year-calendar-table td {
        height: 52px;
        padding: 1px;
        width: 14.28%;
        vertical-align: top;
        position: relative;
        overflow: hidden;
    }

    .year-day-number {
        font-size: 9px;        /* mniejszy numer dnia */
        padding: 1px 2px;
        position: absolute;
        top: 1px;
        left: 1px;
        right: 1px;
        background: rgba(255,255,255,0.92);
        border-radius: 3px;
        text-align: center;
        line-height: 1.2;
        z-index: 2;
    }

    .year-celestial-times {
        display: block;        /* nadpisuje "display:none" które było wcześniej */
        position: absolute;
        bottom: 1px;
        left: 0px;
        right: 1px;
        font-size: 0.58em;
    }

    .year-celestial-time.sun {
        display: flex;
        justify-content: space-between;
        padding: 1px 0px;
        margin-bottom: 1px;
        font-size: 1em;        /* relatywnie do .year-celestial-times */
    }
	.year-calendar-container {
    padding: 4px;        /* było 15px */
    border-width: 1px;   /* upewnij się że cienka */
    border-radius: 4px;
    margin-top: 10px;
}

    .celestial-info-panel, .moon-phases-section { padding: 12px; }
    .info-item                     { font-size: 0.8em; }
    .info-item .label              { min-width: 90px; }

    .celestial-controls .button,
    .calendar-nav .button,
    .view-btn                      { font-size: 0.75em; padding: 6px 8px; }
    .moon-phase-item               { width: calc(50% - 8px); }

    .phenomena-table th,
    .phenomena-table td            { padding: 4px 6px; }
    .phenomena-other-list          { font-size: 0.82em; }

    .date-picker-input             { max-width: 130px; font-size: 0.82em; padding: 6px 6px; }
    .date-nav-btn                  { width: 28px; height: 30px; font-size: 0.65em; }
}
