/* ==========================
   OSM Marker Map Styles
   ========================== */
   #osm-list-counter {
  padding-top: 10px;
}
.resetbtn {
    background: #fff !important;
    color: #0073aa !important;
    border-color: #0073aa !important;
}
.resetbtn:hover {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #0073aa !important;
}
   
   /* Flexbox für Checkbox & Label */
#osm-filters .osm-switch {
    display: flex;
    align-items: center;
    gap: 8px; /* Abstand zwischen Checkbox und Label */
    flex-wrap: nowrap; /* Verhindert Zeilenumbruch */
}

/* Optional: auf kleinen Bildschirmen etwas kleiner */
@media (max-width: 600px) {
    #osm-filters .osm-switch {
        font-size: 0.9em;
        gap: 6px;
    }
}

#osm-loader {
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  width:100%;
  height:100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.8);
}

/* Spinner Styles */
#osm-loader .spinner {
    margin-top: 10px;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #0073aa; /* Farbe des laufenden Segments */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



   
.osm-single-custom-fields {
    display: flex;
    flex-wrap: wrap; /* falls kleiner als 1000px, gehen die Blöcke untereinander */
    max-width: 100%; /* maximale Breite */
    margin: 0 auto; /* zentrieren */
    gap: 20px; /* optional: Abstand zwischen part1 und part2 */
}

.osm-single-custom-fields .part1,
.osm-single-custom-fields .part2 {
    box-sizing: border-box; /* padding/border zählen zur Breite */
}   
   
   
 .osm-meta a, .mk-single-content a {
    border-bottom: 1px solid;
}
.osm-meta a:hover, .mk-single-content a:hover{
    border-bottom: 1px dotted;
}   
   .osm-switch span {
    font-weight: 700 !important;
}
   .custom-dropdown .selected {
    padding-bottom: 0px !important;
    padding-top: 0px !important;
    font-family: Arial !important;
    color: #000 !important;
    font-weight: 600 !important;
    font-size: 0.95em !important;
}
.osm-list .osm-meta {
    background: none !important;
    border: 0px !important;
}


/* --- Filter Container --- */
#osm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}
#osm-filters select,
#osm-filters input[type="text"],
#osm-filters button {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.95em;
    background: #fff;
    cursor: pointer;
}
#osm-filters input[type="text"] {
    flex: 1 1 200px;
}
.osm-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
    cursor: pointer;
}
.osm-switch input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* --- Custom Dropdown für Kategorien mit Farbkreis --- */
.custom-dropdown {
    position: relative;
    width: 200px;
    font-family: inherit;
}
.custom-dropdown .selected {
    padding: 0px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
}
.custom-dropdown .options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    list-style: none;
    margin: 0;
    padding: 0;
}
.custom-dropdown .options li {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.custom-dropdown .options li:hover {
    background-color: #f0f0f0;
}
.custom-dropdown .options li .color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Listenansicht --- */
.osm-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 8px;
}
.osm-list-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border 0.3s;
}
.osm-list-item:hover {
    transform: translateY(-4px);
}
.osm-list-item.osm-list-active {
    border: 2px solid #c04b1d;
    box-shadow: 0 4px 12px rgba(192, 75, 29, 0.3);
}
.osm-list-thumb {
    width: 100%;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}
.osm-list-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.osm-list-title {
    font-family: 'Montserrat';
    font-size: 1.3em;
    color: #c04b1d;
    font-weight: 700;
    text-align: center;
    padding: 8px;
}
.osm-no-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,#eee,#ddd);
}

/* --- Pagination --- */
.osm-list-pagination {
    margin-top: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.osm-page-btn {
    padding: 6px 9px;
    border-radius: 4px;
    border: 1px solid #0073aa;
    background: #fff;
    cursor: pointer;
    color: #0073aa;
        margin: 0 2px;
}
.osm-page-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.osm-page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* --- Leaflet Marker --- */
.osm-marker-icon {
    margin-left: -18px !important;
    margin-top: -40px !important;
}
.leaflet-marker-icon path {
    stroke-width: 0.5;
    stroke: #fff !important;
}
.osm-marker-active {
    animation: pulse 1.5s infinite;
    z-index: 1000 !important;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 75, 0, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 12px 8px rgba(255, 75, 0, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 75, 0, 0.6); }
}

/* --- Detail Panel --- */
.osm-panel, #osm-marker-details {
    width: 320px;
    max-width: 40%;
    box-sizing: border-box;
    display: none;
}
.osm-detail-card img {
    border-radius: 5px 5px 0 0 !important;
    width: 100%;
    height: auto;
}
span.kartentitel {
    font-family: 'Montserrat';
    font-size: 1.3em;
    display: block;
    margin: 5px 0 7px 0;
    color: #c04b1d;
    font-weight: 700;
}
.osm-meta {
    background: #f6f6f6;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    border: 1px solid #ddd;
    border-top: 0;
    font-size: 0.9em;
}
.osm-desc {
    line-height: 140%;
    hyphens: auto;
    text-align: left;
    margin-bottom: 8px;
}
.osm-button a {
    display: inline-block;
    background: #097390;
    padding: 3px 10px;
    color: #fff;
    margin-top: 15px;
    border-radius: 5px;
    text-decoration: none !important;
    border: 1px solid #097390 !important;
    font-weight: 500;
}
.osm-button a:hover {
    background: #fff;
    color: #097390;
    border: 1px solid #097390 !important;
}

/* --- View Buttons --- */
.osm-view-controls {
    margin: 8px 0;
    display: block;
    clear: both;
    float: none;
    padding-top: 10px !important;
}
.osm-view-btn {
    display: inline-block;
    padding: 6px 10px;
    margin-right: 6px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    color: #0073aa;
    border-color: #0073aa;
}
.osm-view-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* --- Map & Layout --- */
.osm-map-flex {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}
#osm-map {
    flex: 1 1 100%;
    min-height: 650px;
    width: 100%;
    transition: width 0.3s;
}
#osm-map.map-with-panel {
    width: 60%;
    flex: 1 1 59%;
}
#osm-list {
    flex: 1 1 60%;
}

/* --- Responsive --- */
@media (min-width: 1000px) {
    .osm-single-custom-fields .part1 {
        flex: 0 0 33%;
    }

    .osm-single-custom-fields .part2 {
        flex: 0 0 64%;
    }
}
@media (max-width: 1000px){

	#osm-map.map-with-panel {width: 100% !important;}
	    .osm-panel, #osm-marker-details {
        width: 400px !important;
        max-width: 100% !important;
        margin: 0px auto !important;
        margin-top: 30px !Important;
    }
    div#osm-filters, .custom-dropdown {
    width: 100% ! IMPORTANT;
}
#osm-filters input[type="text"] {
    flex: none;
}
    .osm-list-grid { grid-template-columns: repeat(2,1fr); }
    .osm-map-flex { flex-direction: column; }
    .osm-panel, #osm-marker-details { width:100%; order:3; display:none; }
    #osm-map, #osm-list { width:100%; order:1; }
    #osm-filters { flex-direction: column; align-items: stretch; }
}
@media (max-width: 999px) {
        .osm-single-custom-fields .part1 {
        flex: 0 0 100%;
    }

    .osm-single-custom-fields .part2 {
        flex: 0 0 100%;
    }
}
@media (max-width: 600px){
    .osm-list-grid { grid-template-columns: 1fr; }
    #osm-map { min-height: 300px; }
    .osm-panel, #osm-marker-details { width:100%; position:relative; }
    #osm-filters select, #osm-filters input[type="text"], #osm-filters button { width: 100%; }
}
@media (min-width: 1024px) {
    .osm-list-grid { grid-template-columns: repeat(4,1fr); }
}

/* --- Dropdown & Reset Button --- */
#osm-filters button.osm-reset-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 10px;
    margin-top: -4px;
}
#osm-filters button.osm-reset-btn:hover {
    background: #eee;
}