* {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}


html,
body,
#mapid {
    height: 100%;
    width: 100vw;
}

.f-size-09em {
    font-size: 14px;
}

.leaflet-bar {
    border: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-bar a {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #333 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
}

.leaflet-bar a:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.leaflet-bar a:last-child {
    border-radius: 0 0 12px 12px !important;
}

.table>tbody>tr>td {
    vertical-align: middle;

}

td {
    width: 35% !important;
}

.table {
    font-size: 15px;
}

.table-row {
    font-size: 14px;
}

#mapid {
    position: relative;
}

.side-panel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: 100%;
    z-index: 4000;
    pointer-events: none;
}

.city-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 320px !important;
    z-index: 2000 !important;
    display: block !important;
}

.cities-select-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: auto;
}

.main-logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    padding: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-logo-container a {
    pointer-events: auto;
}

.main-logo-container:hover {
    transform: scale(1.1);
}

.scale-container {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 1000;
    pointer-events: none;
}

@keyframes premiumGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    overflow: hidden;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;

}


.sensor-popup-premium {
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(-45deg, #ffffff, var(--status-color-15), #ffffff, var(--status-color-05)) !important;
    padding: 15px;
    backdrop-filter: blur(2px);
    animation: gradientBG 4s ease infinite !important;
}



/* Klasa animated-gradient-bg załatwi resztę (animation i background-size) */




.popup-inner {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    gap: 12px;
    min-width: 290px;
    max-width: 360px;
}


.popup-logo-container {
    flex-shrink: 0;
    padding-left: 5px;
}

.popup-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.popup-main-info {
    flex-grow: 1;
    min-width: 0;
    padding-right: 5px;
}

.popup-sponsor {
    font-size: 15px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-address {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-status-container {
    flex-shrink: 0;
    padding-right: 30px;
    /* Miejsce na krzyżyk X */
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-status-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

/* Przycisk zamknięcia Leaflet */
.leaflet-popup-close-button {
    top: 12px !important;
    right: 12px !important;
    z-index: 9999 !important;
    font-size: 20px !important;
    color: #95a5a6 !important;
    transition: all 0.2s ease;
    padding: 2px !important;
}

.leaflet-popup-close-button:hover {
    color: #2c3e50 !important;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}


.stale-data-badge {
    background: rgba(127, 140, 141, 0.95);
    color: #f1c40f;
    padding: 8px 12px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    position: relative;
    /* Zmienione na relative, aby pchało kontent w dół */
    z-index: 5;
}


.scale {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    width: fit-content;
}

/* --- PREMIUM MODAL & CARDS --- */

.modal-backdrop {
    z-index: 4050 !important;
}

.modal {
    z-index: 4055 !important;
}

@media (min-width: 1400px) {
    .modal-xxl {
        max-width: 94vw;
    }
}

.premium-modal {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.premium-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.premium-btn-pill {
    border-radius: 50px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.premium-segmented-control {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.premium-segmented-control .btn {
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 6px 16px !important;
    color: #666 !important;
}

.premium-segmented-control .btn.active {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.premium-nav-pills .nav-link {
    border-radius: 50px !important;
    color: #666 !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    margin-right: 8px !important;
    border: 1px solid transparent !important;
}

.premium-nav-pills .nav-link.active {
    background: #000 !important;
    color: #fff !important;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.status-dot-good {
    background: #96c11f;
}

.status-dot-warning {
    background: #f39200;
}

.status-dot-danger {
    background: #e33110;
}

/* Select2 Modern Overrides */
.select2-container--default .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding-left: 10px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 10px !important;
}

.select2-dropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-top: 5px !important;
}

.select2-search__field {
    border-radius: 8px !important;
    border: 1px solid #eee !important;
    padding: 8px !important;
}

.scale h5 {
    font-size: 0.8rem;
    font-weight: 800;
    margin: 0;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 10px;
}

.scale-item {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.scale-item-good {
    background: #96c11f;
}

.scale-item-warning {
    background: #f39200;
}

.scale-item-danger {
    background: #e33110;
}

.sidepanel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 100%;
    width: 440px;
    max-width: 100vw;
    padding: 30px;
    color: #1a1a1a;
    z-index: 3000;
    display: none;
    overflow-y: auto;
    pointer-events: auto;
    box-shadow: 15px 0 35px rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sensor-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.indicator-row:last-child {
    border-bottom: none;
}

.value-box {
    text-align: right;
}

.value-main {
    font-size: 1.25rem;
    font-weight: 700;
}

.value-unit {
    font-size: 0.85rem;
    color: #666;
    margin-left: 4px;
}



.social-media {
    letter-spacing: 10px;
}

.close-side-panel {
    float: right;
}

.close-side-panel:hover {
    cursor: pointer;
}

.sidepanel-header-img {
    width: 6em;
}

.sidepanel-header-text {
    text-align: center;
}

.f-size-1-5 {
    font-size: 1.2vw;
}

.m-top-2 {
    margin-top: 2%;
}

.m-top-5 {
    margin-top: 5%;
}


.m-top-7 {
    margin-top: 7%;
}

.text-center {
    text-align: center;
}

.cities-select-container {
    width: 100%;
    font-size: 1.1em;
    pointer-events: auto;
}


.select2 {
    width: 100% !important;
}

.select2-container {
    z-index: 700;
}

.select2-selection {
    height: 40px !important;
}

.select2-selection__rendered {
    color: #444;
    line-height: 38px !important;
}

.select2-selection__arrow {
    height: 35px !important;
}

.linebreak {
    border: solid 0.5px #eddcdc;


}

.no-border {
    border-bottom: none !important;
}

.nav>li>a {
    padding: 5px 10px !important;
}


.padding-0 {
    padding: 0 !important;
}

.vertical-middle {
    vertical-align: middle !important;
}


.add-localization {
    color: green;
}

.add-localization:hover {
    cursor: pointer;
    transform: scale(1.2);

}

.nav {
    font-size: 0.7em;
}

.cookie-info {
    width: 100%;
    position: absolute;
    bottom: 0;
    padding: 10px;
    background: white;
    color: black;
    z-index: 999;
    text-align: center;
}

.baner-info {
    padding: 0;
    background: #fe0404;
    color: white;
    /* padding-left: 5px; */
    padding: 5px;
    text-align: center;
    font-weight: 600;
}

.baner-info>h4 {
    font-size: 1.1em;
    font-weight: 600;
}

#main {
    transition: margin-left .5s;
    padding: 20px;
}

@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 15px;
    }

    .sidenav a {
        font-size: 18px;
    }
}

/* Safari 4.0 - 8.0 */
@-webkit-keyframes example {
    from {
        background-color: #FF6347;
    }

    to {
        background-color: transparent;
    }
}

/* Standard syntax */
@keyframes example {
    from {
        background-color: #FF6347;
    }

    to {
        background-color: transparent;
    }
}



/* responsive layout */
@media (max-width: 767px) {
    .side-panel-container {
        height: 60vh;
        bottom: 0;
        overflow: scroll;
        top: auto;
    }

    .sidepanel {
        overflow: scroll;
    }

    .cities-select-container {

        width: 80%;
    }

    .f-size-1-5 {
        font-size: 3vw;
    }

    .media-body {
        width: 80% !important;
    }
}

@media (max-width: 500px) {

    .f-size-1-5 {
        font-size: 4vw;
    }
}

.smogcontrol-media {
    margin-top: 1px;
    position: unset;
    bottom: 0;
}





/* Tooltip container */
.tltip {
    color: #aaaaaa;
}

/* Tooltip text */
.tltip .tltiptext {
    visibility: hidden;
    width: 300px;

    background-color: white;
    color: black;
    font-family: sans-serif;

    padding: 5px;
    border-radius: 6px;

    /* Position the tooltip text */
    position: absolute;
    font-size: 14px;
    left: 40;
    /* Fade in tooltip */
    opacity: 0;
}

/* Tooltip arrow */
.tltip .tltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tltip:hover .tltiptext {
    visibility: visible;
    opacity: 1;
    z-index: 600;
}

.modal-dialog {
    max-width: 60% !important;
    width: 60% !important;
    margin: 1.75rem auto;
}

@media (max-width: 767px) {
    .modal-dialog {
        max-width: 95% !important;
        width: 95% !important;
    }
}

.modal-header {
    padding: 10px;
    border: none;
}

.modal-body {
    padding: 0px;
}

.datepicker,
.table-condensed {
    width: 250px;
    height: 300px;
}



.canvas-holder {
    width: 100% !important;
    height: auto !important;
}

canvas {
    width: 100% !important;
    height: auto !important;
}

.quadrado {
    width: 200px;
    height: 145px;
    position: relative;
    top: 120;
    animation: crescendo 1.5s alternate infinite ease-in;
}

@keyframes crescendo {
    0% {
        transform: scale(.8);
    }

    100% {
        transform: scale(1.5);
    }
}

/* Custom Tooltip Z-Index Fix */
.tooltip {
    z-index: 100000 !important;
}

/* Animated Gradient Backgrounds */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-bg {
    background-size: 400% 400% !important;
    animation: gradientBG 4s ease infinite !important;
}


/* Leaflet Popup Premium Overrides */
/* .leaflet-popup-content-wrapper {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
} */

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4 !important;
}

.leaflet-popup-close-button {
    padding: 8px 8px 0 0 !important;
    z-index: 10;
}

.sensor-popup {
    padding: 15px 30px 15px 15px !important;
    /* Added right padding for close button */
    min-width: 250px;
    font-size: 13px;
}

.stale-data-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    padding: 2px;
    background: rgba(108, 117, 125, 0.9);
    color: white;
    z-index: 5;
}