/* ================================================
   Icerad Locations Frontend CSS
   Responsive Map + Table Layout
   ================================================ */

/* === Container === */
.if-locations-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* === Hauptcontainer: Map + Table nebeneinander === */
.if-content-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.if-social-icon svg {
    color: #ffffff;
    opacity: 0.9;
}

.if-social-icon:hover svg {
    opacity: 1;
}
#if-germany-map path:focus,
#if-germany-map path.if-focused {
    fill: rgba(59, 130, 246, 0.5);
    stroke: rgba(59, 130, 246, 1);
    outline: none;
}

#if-germany-map path.if-has-locations:focus,
#if-germany-map path.if-has-locations.if-focused {
    fill: rgba(59, 130, 246, 0.5);
    stroke: rgba(59, 130, 246, 1);
}

/* Responsive: unter 1000px stapeln */
@media (max-width: 1000px) {
    .if-content-container {
        grid-template-columns: 1fr;
    }
}

/* === Karten-Sektion === */
.if-map-section {
    background: rgba(17, 24, 39, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.if-map-controls {
    margin-bottom: 15px;
}

.if-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.if-select:hover,
.if-select:focus {
    border-color: rgba(59, 130, 246, 0.6);
    outline: none;
}

/* === Karten-Container === */
.if-map-container {
    position: relative;
    width: 100%;
    padding: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.95) 100%);
    border-radius: 12px;
    overflow: visible;
}


/* SVG Map */
#if-germany-map {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
}

/* Bundesland-Pfade */
#if-germany-map path {
    fill: rgba(55, 65, 81, 0.6);
    stroke: rgba(107, 114, 128, 0.4);
    stroke-width: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

#if-germany-map path:hover {
    fill: rgba(59, 130, 246, 0.3);
    stroke: rgba(59, 130, 246, 0.8);
	 outline: 0px;
}

#if-germany-map path.if-has-locations {
    fill: rgba(59, 130, 246, 0.3);
    stroke: rgba(59, 130, 246, 0.8);
}

#if-germany-map path.if-has-locations:hover {
    fill: rgba(59, 130, 246, 0.5);
    stroke: rgba(59, 130, 246, 1);
}

#if-germany-map path.if-selected {
    fill: rgba(59, 130, 246, 0.5);
    stroke: rgba(59, 130, 246, 1);
    stroke-width: 2;
}

/* Standort-Marker auf der Karte */
.if-location-marker {
    cursor: pointer;
    transition: all 0.3s ease;
}

.if-location-marker circle {
    fill: #10b981;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.4));
}

.if-location-marker:hover circle {
    fill: #3b82f6;
    filter: drop-shadow(0 3px 6px rgba(59, 130, 246, 0.6));
}

/* Standort ohne Standortleiter: grau */
.if-location-marker--open circle {
    fill: #6b7280;
    stroke: rgba(255, 255, 255, 0.7);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

/* Legende unter der Karte */
.if-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    font-size: 13px;
    color: rgba(209, 213, 219, 0.9);
}
.if-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.if-map-legend i {
    display: inline-block;
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 2px solid #fff;
}
.if-map-legend .if-dot-active { background: #10b981; }
.if-map-legend .if-dot-open   { background: #6b7280; border-color: rgba(255,255,255,.7); }


/* === Tabellen-Sektion === */
.if-table-section {
    background: rgba(17, 24, 39, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.if-table-controls {
    margin-bottom: 15px;
}

.if-search {
    width: 100%;
    padding: 12px 16px;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.if-search::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

.if-search:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(31, 41, 55, 1);
}

/* === Locations Table === */
.if-locations-table {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(31, 41, 55, 0.3);
}

.if-locations-table::-webkit-scrollbar {
    width: 8px;
}

.if-locations-table::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 4px;
}

.if-locations-table::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

.if-locations-table::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Location Card */
.if-location-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.if-location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.if-location-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.if-location-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.if-location-title {
    flex: 1;
}

.if-location-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.if-location-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: rgba(156, 163, 175, 0.9);
}

.if-location-social {
    display: flex;
    gap: 8px;
}

.if-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 18px;
}

.if-social-icon:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.if-location-body {
    padding-top: 12px;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.if-contact-info {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: rgba(209, 213, 219, 0.9);
}

.if-contact-info strong {
    color: #fff;
    font-weight: 500;
}

.if-contact-info a {
    color: rgba(96, 165, 250, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.if-contact-info a:hover {
    color: rgba(147, 197, 253, 1);
    text-decoration: underline;
}

/* === Allgemeiner Kontakt === */
.if-general-contact {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(17, 24, 39, 0.9) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.if-general-contact h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.if-general-contact p {
    margin: 8px 0;
    font-size: 16px;
    color: rgba(209, 213, 219, 0.9);
}

.if-general-contact a {
    color: rgba(96, 165, 250, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.if-general-contact a:hover {
    color: rgba(147, 197, 253, 1);
    text-decoration: underline;
}

/* === Error Message === */
.if-error-message {
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.5);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

/* === Mobile Optimierungen === */
@media (max-width: 768px) {
    .if-locations-wrapper {
        padding: 15px;
    }

    .if-content-container {
        gap: 20px;
    }

    .if-map-section,
    .if-table-section {
        padding: 15px;
    }

    .if-location-card {
        padding: 14px;
    }

    .if-location-card-header {
        gap: 10px;
    }

    .if-location-title h3 {
        font-size: 16px;
    }

    .if-general-contact {
        padding: 20px;
    }

    .if-general-contact h3 {
        font-size: 20px;
    }
}

/* Highlight Animation */
@keyframes highlight {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3); 
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6); 
    }
}
/* === Location Popup === */
.if-location-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.if-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 38, 38, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.if-popup-close:hover {
    background: rgba(220, 38, 38, 0.4);
    transform: scale(1.1);
}

.if-popup-content {
    text-align: center;
}

.if-popup-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.if-popup-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.if-location-popup h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.if-popup-subtitle {
    color: rgba(156, 163, 175, 0.9);
    font-size: 16px;
    margin: 0 0 20px 0;
}

.if-popup-info {
    text-align: left;
    display: grid;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.if-popup-info > div {
    color: rgba(209, 213, 219, 0.9);
    font-size: 14px;
}

.if-popup-info strong {
    color: #fff;
    font-weight: 500;
}

.if-popup-info a {
    color: rgba(96, 165, 250, 0.9);
    text-decoration: none;
}

.if-popup-info a:hover {
    color: rgba(147, 197, 253, 1);
    text-decoration: underline;
}

/* Button "Icerad Standort gruenden" */
.if-found-btn,
.if-found-btn:visited {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d5f8a, #3ea0da);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    transition: background .3s, transform .2s, box-shadow .2s;
}
.if-found-btn:hover {
    background: linear-gradient(135deg, #ff6b35, #f7345d);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, .35);
}


/* Bundesland-Dropdown: Theme-Hoehe ueberschreiben, damit der Text sichtbar ist */
.if-locations-wrapper select.if-select,
.if-locations-wrapper #if-state-filter {
    height: auto !important;
    min-height: 46px !important;
    line-height: 1.4 !important;
    padding: 10px 40px 10px 16px !important;
    color: #fff !important;
    font-size: 15px !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233ea0da' stroke-width='2'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}
/* Eintraege in der aufgeklappten Liste lesbar */
.if-locations-wrapper #if-state-filter option {
    background: #1f2937;
    color: #fff;
}

/* Suchzeile mit Button "Nur aktive anzeigen" */
.if-locations-wrapper .if-table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.if-locations-wrapper .if-table-controls .if-search {
    flex: 1 1 220px;
    width: auto;
    min-width: 0;
    height: auto !important;
    min-height: 46px;
}
.if-locations-wrapper .if-active-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    margin: 0;
    padding: 0 16px;
    border-radius: 8px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    background: rgba(31, 41, 55, 0.8);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.if-locations-wrapper .if-active-toggle:hover { border-color: rgba(59, 130, 246, 0.6); background: rgba(31, 41, 55, 1); color: #fff; }
.if-locations-wrapper .if-toggle-box {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid #6b7280;
    background: transparent;
    transition: all .2s;
}
.if-locations-wrapper .if-active-toggle.is-on {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}
.if-locations-wrapper .if-active-toggle.is-on .if-toggle-box {
    border-color: #fff;
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}
@media (max-width: 600px) {
    .if-locations-wrapper .if-table-controls { flex-wrap: nowrap; gap: 8px; }
    .if-locations-wrapper .if-table-controls .if-search {
        flex: 1 1 0;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .if-locations-wrapper .if-active-toggle {
        min-height: 40px;
        padding: 0 10px;
        gap: 6px;
        font-size: 12px;
    }
    .if-locations-wrapper .if-toggle-box { width: 12px; height: 12px; }
}

