/* Główne kolory i style */
:root {
    --primary-color: #8e9585;
    --text-color: #ffffff;
    --button-color: #000000;
}

/* Style dla sekcji mapy na stronie głównej */
.mapa-placowek {
    padding: 50px 0;
    margin: 0;
    background-color: #f9f9f9;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.mapa-placowek__container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.mapa-placowek__content {
    margin-top: 40px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Układ dwukolumnowy */
.ukfp-map-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.ukfp-map-sidebar {
    flex: 0 0 300px;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 30px;
    border-radius: 0;
    box-sizing: border-box;
}

.ukfp-map-content {
    flex: 1;
    min-width: 60%;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
}

.ukfp-sidebar-title {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: bold;
    color: var(--text-color);
}

.ukfp-legend {
    margin-bottom: 40px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.marker-color {
    display: inline-block;
    margin-right: 15px;
    width: 54px;
    height: auto;
}

.marker-color .custom-marker {
    transform: scale(0.85);
    margin: 0 auto;
}

.marker-color svg {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.legend-text {
    font-size: 16px;
}

.ukfp-sidebar-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.flex-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkbox {
    position: relative;
    display: inline-block;
}

.checkbox:after,
.checkbox:before {
    font-family: FontAwesome;
    font-feature-settings: normal;
    -webkit-font-kerning: auto;
    font-kerning: auto;
    font-language-override: normal;
    font-stretch: normal;
    font-style: normal;
    font-synthesis: weight style;
    font-variant: normal;
    font-weight: normal;
    text-rendering: auto;
}

.checkbox label {
    width: 65px;
    height: 30px;
    background: #ccc;
    position: relative;
    display: inline-block;
    border-radius: 0;
    transition: 0.4s;
}

.checkbox label:after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 0;
    left: 0;
    top: -3px;
    z-index: 2;
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: 0.4s;
}

.checkbox input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    opacity: 0;
    cursor: pointer;
}

.checkbox input:hover+label:after {
    box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.2), 0 3px 8px 0 rgba(0, 0, 0, 0.15);
}

.checkbox input:checked+label:after {
    left: 30px;
}

.model-2 .checkbox label {
    width: 60px;
}

.model-2 .checkbox label:after {
    top: 0;
    width: 30px;
    height: 30px;
}

.model-2 .checkbox input:checked+label {
    background: var(--button-color);
}

.model-2 .checkbox input:checked+label:after {
    left: 30px;
}

.responsive-map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Zmiana układu dla różnych rozmiarów ekranu */
@media (min-width: 1200px) {
    .ukfp-map-sidebar {
        flex: 0 0 350px;
    }
}

@media (min-width: 1400px) {
    .ukfp-map-sidebar {
        flex: 0 0 400px;
    }
}

@media (max-width: 768px) {
    .responsive-map {
        height: 500px;
    }

    .ukfp-map-layout {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .ukfp-map-sidebar {
        flex: 1 0 auto;
        width: 100%;
        padding: 20px;
    }

    .mapa-placowek {
        padding: 30px 0;
    }

    .mapa-placowek__container {
        padding: 0 10px;
    }

    .ukfp-sidebar-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .responsive-map {
        height: 400px;
    }

    .ukfp-map-sidebar {
        padding: 15px;
    }

    .mapa-placowek {
        padding: 20px 0;
    }

    .legend-text {
        font-size: 14px;
    }

    .ukfp-sidebar-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

.ukfp-map-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.ukfp-filter-group {
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    box-sizing: border-box;
}

.ukfp-filter-group select {
    width: 100%;
    padding: 12px;
    border-radius: 0;
    border: 1px solid #ddd;
    background-color: var(--primary-color);
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 16px;
    box-sizing: border-box;
	border-radius: 6px;
}

/* Style dla przełącznika */
.ukfp-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.ukfp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ukfp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 0;
}

.ukfp-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 0;
}

input:checked+.ukfp-slider {
    background-color: var(--button-color);
}

input:focus+.ukfp-slider {
    box-shadow: 0 0 1px var(--button-color);
}

input:checked+.ukfp-slider:before {
    transform: translateX(26px);
}

.ukfp-switch-label {
    margin-bottom: 10px;
    display: block;
    color: var(--text-color);
    font-size: 16px;
}

.cluster-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text-color);
    gap: 10px;
}

.cluster-toggle-wrapper .flex-section {
    width: 100%;
    font-size: 14px;
}

/* Przyciski */
.ukfp-button {
    background-color: var(--button-color);
    color: var(--text-color);
    border: none;
    padding: 10px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    display: inline-block;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.ukfp-button:hover {
    opacity: 0.9;
}

/* Styl dla komunikatu interaktywności mapy */
#map-interaction-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 5px;
    z-index: 10;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

#map-interaction-overlay:hover {
    background-color: #364e40;
}

@media (max-width: 768px) {
    #map-interaction-overlay {
        font-size: 12px;
        padding: 6px 12px;
        right: 10px;
        left: auto;
    }

    #map {
        height: 450px;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    #map {
        height: 350px;
        min-height: auto;
    }

    .ukfp-filter-group select {
        padding: 10px;
        font-size: 14px;
    }

    .ukfp-button {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Naprawia problem przewijania */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.asw-menu-btn {
    left: 0 !important;
    bottom: 0 !important;
}

@media only screen and (max-width: 768px) {
    .asw-menu-btn {
        width: 80px !important;
        height: 75px !important;
    }
}

/* Nowy okrągły toggle */
.toggle-inline-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    padding: 8px 0;
}

.toggle-inline-label {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
    flex: 1;
}

.round-toggle {
    position: relative;
    display: inline-block;
    width: 58px;
    height: 32px;
    cursor: pointer;
}

.round-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.round-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s ease;
    border-radius: 32px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.round-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.round-toggle input:checked+.round-slider {
    background-color: #717469;
}
/*
.round-toggle input:focus+.round-slider {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(76, 175, 80, 0.3);
}
*/

.round-toggle input:checked+.round-slider:before {
    transform: translateX(26px);
}

.round-toggle:hover .round-slider {
    background-color: #bbb;
}

.round-toggle:hover input:checked+.round-slider {
    background-color: #717469;
}

/* Style dla klasterów mapy */
.mapboxgl-marker {
    cursor: pointer;
}

.mapboxgl-popup {
    z-index: 10;
}

.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid #ffffff;
    padding: 10px;
}

.mapboxgl-popup-tip {
    border-top-color: #ffffff;
}

.mapboxgl-popup-close-button {
    color: #666;
    font-size: 20px;
    padding: 0;
    right: 8px;
    top: 8px;
}

.mapboxgl-popup-close-button:hover {
    color: #000;
    background: transparent;
}

/* Style dla elementów mapy */
.mapboxgl-canvas {
    cursor: grab;
}

.mapboxgl-canvas:active {
    cursor: grabbing;
}

/* Efekt hover dla elementów interaktywnych mapy */
#map .mapboxgl-marker:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Animacje dla klasterów */
@keyframes cluster-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.cluster-toggle-wrapper {
    margin-top: 20px;
}