/* Weather Map Styles */

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Weather date time info */
.weather-date-time-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weather-date-time-info .forecast-date {
    font-weight: bold;
    margin-bottom: 4px;
}

.weather-date-time-info .update-info {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
    font-style: italic;
}

.weather-date-time-info .gfs-date {
    font-size: 10px;
    color: #666;
}

.weather-date-time-info .area-sun-times {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
}

.weather-date-time-info .area-name {
    font-weight: 600;
    color: #0073b7;
    margin-right: 4px;
}

.weather-date-time-info .sun-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.weather-date-time-info .sun-info i {
    font-size: 10px;
}

/* Leaflet popup styles */
.leaflet-popup {
    z-index: 9999999 !important;
    position: absolute !important;
    margin: 0 !important;
}

/* Popraw pozycjonowanie popup żeby nie był przysłonięty */
.leaflet-popup-content-wrapper {
    z-index: 9999999 !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    max-width: 300px !important;
    min-width: 250px !important;
    position: relative !important;
    margin: 0 !important;
}

/* Usuń domyślne pozycjonowanie Leaflet */
.leaflet-popup-tip-container {
    display: none !important;
}

/* Popraw pozycjonowanie dla różnych pozycji na mapie */
.leaflet-popup.leaflet-popup-top {
    margin-top: -10px !important;
}

.leaflet-popup.leaflet-popup-bottom {
    margin-top: 10px !important;
}

.leaflet-popup.leaflet-popup-left {
    margin-left: -10px !important;
}

.leaflet-popup.leaflet-popup-right {
    margin-left: 10px !important;
}

.leaflet-popup-content-wrapper {
    z-index: 9999999 !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    max-width: 300px !important;
    min-width: 200px !important;
    position: relative !important;
}

.leaflet-popup-tip {
    z-index: 9999999 !important;
}

.weather-popup-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 9999999 !important;
    position: relative !important;
    padding: 10px !important;
    max-width: 300px !important;
    min-width: 250px !important;
}

.weather-popup-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #0096d6 0%, #0073b7 100%);
    color: white;
    border-radius: 5px 5px 0 0;
    padding: 8px;
}

.weather-popup-content {
    padding: 8px;
}

.weather-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    color: white;
}

.weather-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.weather-popup-container h3 {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
    color: white;
}

.forecast-time {
    font-size: 12px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.weather-popup-container img {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: block;
}

.weather-popup-container .text-sm {
    font-size: 14px;
    margin-top: 4px;
    text-align: center;
}

.weather-popup-container .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 8px;
}

.weather-popup-container .grid > div {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.weather-popup-container .grid > div i {
    width: 16px;
    margin-right: 8px;
}

.weather-details-btn {
    background: #0073b7;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    transition: background-color 0.2s;
}

.weather-details-btn:hover {
    background: #005a94;
}

.leaflet-container {
    z-index: 1 !important;
}

.leaflet-popup-content {
    z-index: 9999999 !important;
    position: relative !important;
}

.leaflet-popup-close-button {
    z-index: 9999999 !important;
}

/* Weather navigation buttons */
.weather-nav-btn {
    background: #0073b7 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    cursor: pointer !important;
    font-size: 12px !important;
}

.weather-nav-btn:hover {
    background: #005a94 !important;
}

/* Popup positioning - wyłączone, używamy własnego pozycjonowania w JS */
.leaflet-popup {
    /* margin-left i margin-top są ustawiane dynamicznie w JS */
}

.leaflet-popup-content-wrapper {
    margin: 0 !important;
}

/* Weather markers */
.weather-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid #0073b7;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weather-marker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.weather-marker.position-adjusted {
    border-color: #ff6b35;
}

.weather-marker.has-warning {
    border-color: #dc2626;
    border-width: 2px;
}

.city-name-container {
    text-align: center;
    margin-bottom: 0px;
    padding: 0px 4px;
}

.city-name {
    font-size: 15px;
    font-weight: normal;
    font-style: normal;
    color: #333;
    line-height: 1.2;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.weather-details {
    display: flex;
    align-items: center;
    gap: 2px;
}

.temp {
    font-size: 32px;
    font-weight: normal;
    font-style: normal;
    color: #0073b7;
}

.weather-icon-container img {
    width: 41px;
    height: 41px;
    display: block;
    margin: 0;
}

.warning-icons {
    margin-top: 2px;
    display: flex;
    justify-content: center;
    gap: 1px;
}

.adjust-indicator {
    color: #ff6b35;
    font-size: 8px;
    margin-top: 1px;
}

/* Baltic markers */
.weather-marker.baltic-marker {
    background: #e3f2fd;
    border-color: #1976d2;
}

.weather-marker.baltic-marker.night-mode {
    background-color: rgba(210, 225, 240, 0.95); /* Nieco ciemniejszy, poszarzały niebieski dla nocy na morzu */
    border-color: rgba(25, 118, 210, 0.4);
}

.baltic-name .city-name {
    font-size: 11px;
    max-width: 50px;
}

/* Time buttons grid */
.days-tabs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.day-tab, .time-btn {
    padding: 6px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    transition: all 0.2s ease;
}

.day-tab:hover, .time-btn:hover {
    background: #f0f0f0;
}

.day-tab.active, .time-btn.active {
    background: #0073b7;
    color: white;
    border-color: #0073b7;
}

.day-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.day-tab.disabled:hover {
    background: #f5f5f5;
}

.day-tab:hover:not(.active):not(.disabled) {
    background: #f0f0f0;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073b7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .weather-date-time-info {
        font-size: 10px;
        padding: 6px 8px;
    }

    /* Usunięto nadpisujące style dla markerów - używane są te z weather-new.css */
}
