/**
 * SpotOn Visualisation - Public CSS
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 * 
 * @package SpotOn-Visualisation
 * @since 1.0.0
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.spoton-meta-data-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
}

/* ==========================================================================
   TABS FUNCTIONALITY
   ========================================================================== */

.spoton-meta-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.spoton-tab-button {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
}

.spoton-tab-button.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.spoton-tab-content {
    display: none;
}

.spoton-tab-content.active {
    display: block;
}

/* ==========================================================================
   MAP CONTAINERS AND CONTROLS
   ========================================================================== */

.spoton-map-container,
.spoton-locations-map-container {
    margin: 20px 0;
}

.spoton-map-controls {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.spoton-search-container,
.spoton-search-control {
    flex: 1;
    min-width: 200px;
}

.spoton-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.spoton-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.spoton-filter-container,
.spoton-category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spoton-category-select,
.spoton-category-filter select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.spoton-category-select:focus,
.spoton-category-filter select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.spoton-results-info,
.spoton-map-info {
    margin-left: auto;
    font-weight: 600;
    color: #0073aa;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.spoton-locations-map,
#spoton-frontend-map {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
}

.spoton-coordinates {
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* ==========================================================================
   ADDRESS AND LOCATION DETAILS
   ========================================================================== */

.spoton-address-details {
    line-height: 1.6;
}

.spoton-address-line {
    margin-bottom: 5px;
}

.spoton-location-categories,
.spoton-location-address {
    margin-bottom: 8px;
    color: #666;
}

/* ==========================================================================
   LOCATION/POST CARDS - MODERN DESIGN
   ========================================================================== */

.spoton-cards-container {
    margin-top: 30px;
    padding: 20px 0;
}

.spoton-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin: 0 auto;
    max-width: 1200px;
}

.spoton-location-card {
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.spoton-location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #0073aa;
}

.spoton-card-header {
    padding: 24px 24px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.spoton-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.spoton-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.spoton-card-title a:hover {
    color: #0073aa;
}

.spoton-card-badge {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.spoton-card-content {
    padding: 20px 24px;
}

.spoton-card-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.spoton-address-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.spoton-address-text {
    flex: 1;
}

.spoton-address-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.spoton-card-address .spoton-address-line {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.spoton-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
}

.spoton-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.spoton-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    flex: 1;
}

.spoton-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
}

.spoton-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 4px;
}

.spoton-card-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.spoton-card-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.spoton-card-link {
    background: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.spoton-card-link:hover {
    background: #0073aa;
    color: white;
    transform: translateY(-2px);
}

.spoton-button-icon {
    font-size: 16px;
}

/* ==========================================================================
   LEGACY LOCATION ITEMS (for backward compatibility)
   ========================================================================== */

.spoton-locations-list h3 {
    margin-bottom: 20px;
    color: #333;
}

.spoton-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.spoton-location-item {
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.spoton-location-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spoton-location-item h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.spoton-location-item h4 a {
    color: #0073aa;
    text-decoration: none;
}

.spoton-location-item h4 a:hover {
    text-decoration: underline;
}

.spoton-location-actions {
    margin-top: 12px;
}

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */

.spoton-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.spoton-related-post {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.spoton-post-type-badge {
    background: #0073aa;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
}

/* ==========================================================================
   BUTTONS AND ACTIONS
   ========================================================================== */

.spoton-zoom-to-marker {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: 2px solid transparent;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.spoton-zoom-to-marker:hover {
    background: linear-gradient(135deg, #005a87 0%, #004570 100%);
    transform: translateY(-2px);
}

/* ==========================================================================
   MAP MARKERS AND BADGES
   ========================================================================== */

.spoton-marker-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.spoton-badge-content {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: Arial, sans-serif;
    line-height: 1;
}

/* ==========================================================================
   POPUP STYLES
   ========================================================================== */

.spoton-marker-popup {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.spoton-marker-popup h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.spoton-marker-popup h4 a {
    color: #0073aa;
    text-decoration: none;
}

.spoton-marker-popup h4 a:hover {
    text-decoration: underline;
}

.spoton-marker-popup p {
    margin: 4px 0;
    font-size: 12px;
    color: #666;
}

.spoton-popup-actions {
    margin-top: 10px;
    text-align: center;
}

.spoton-popup-link {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: background-color 0.2s;
}

.spoton-popup-link:hover {
    background: #005a87;
    color: white;
}

.spoton-related-posts {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-left: 3px solid #007cba;
    border-radius: 3px;
}

.spoton-related-posts p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .spoton-map-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .spoton-category-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .spoton-locations-grid {
        grid-template-columns: 1fr;
    }

    .spoton-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }

    .spoton-location-card {
        border-radius: 12px;
    }

    .spoton-card-header {
        padding: 16px 16px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .spoton-card-content {
        padding: 16px;
    }

    .spoton-card-actions {
        padding: 12px 16px 16px;
        flex-direction: column;
    }

    .spoton-card-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .spoton-cards-grid {
        padding: 0 8px;
    }

    .spoton-card-title {
        font-size: 16px;
    }

    .spoton-card-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ==========================================================================
   ENHANCED CARD HEADER WITH MAP ICONS
   ========================================================================== */

.spoton-card-header-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.spoton-card-map-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, #0073aa 0%, #005a87 100%); */
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.spoton-custom-map-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.spoton-default-map-icon {
    font-size: 20px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   NO RESULTS STATE
   ========================================================================== */

.spoton-no-results {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 40px;
}

.spoton-no-results-content {
    text-align: center;
    max-width: 400px;
}

.spoton-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.spoton-no-results h3 {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 20px;
    font-weight: 600;
}

.spoton-no-results p {
    margin: 0;
    color: #888;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   MARKER HIGHLIGHTING
   ========================================================================== */

.spoton-marker-highlight {
    animation: spoton-marker-pulse 2s ease-in-out;
    z-index: 1000 !important;
}

@keyframes spoton-marker-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.3) drop-shadow(0 0 10px rgba(0, 115, 170, 0.8));
    }
}

/* ==========================================================================
   FILTERING TRANSITIONS
   ========================================================================== */

.spoton-location-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spoton-location-card:not(.spoton-visible) {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.spoton-location-card.spoton-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* ==========================================================================
   ENHANCED RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .spoton-card-header-content {
        gap: 12px;
    }
    
    .spoton-card-map-icon {
        width: 32px;
        height: 32px;
    }
    
    .spoton-custom-map-icon {
        width: 18px;
        height: 18px;
    }
    
    .spoton-default-map-icon {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .spoton-card-map-icon {
        width: 28px;
        height: 28px;
    }
    
    .spoton-default-map-icon {
        font-size: 14px;
    }
    
    .spoton-no-results-icon {
        font-size: 36px;
    }
    
    .spoton-no-results h3 {
        font-size: 18px;
    }
}

/* ==========================================================================
   ENHANCED CARD HEADER WITH MAP ICONS
   ========================================================================== */

.spoton-card-header-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.spoton-card-map-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, #0073aa 0%, #005a87 100%); */
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.spoton-custom-map-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.spoton-default-map-icon {
    font-size: 20px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   INITIAL VISIBILITY - ALLE CARDS STANDARDMÄSSIG SICHTBAR
   ========================================================================== */

.spoton-location-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    opacity: 1; /* STANDARD: Sichtbar */
    transform: scale(1); /* STANDARD: Normal scale */
    pointer-events: auto; /* STANDARD: Interaktiv */
}

/* Nur verstecken wenn explizit NICHT .spoton-visible */
.spoton-location-card:not(.spoton-visible) {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    pointer-events: none !important;
}

.spoton-location-card.spoton-visible {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   NO RESULTS STATE
   ========================================================================== */

.spoton-no-results {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 40px;
}

.spoton-no-results-content {
    text-align: center;
    max-width: 400px;
}

.spoton-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.spoton-no-results h3 {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 20px;
    font-weight: 600;
}

.spoton-no-results p {
    margin: 0;
    color: #888;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   MARKER HIGHLIGHTING
   ========================================================================== */

.spoton-marker-highlight {
    animation: spoton-marker-pulse 2s ease-in-out;
    z-index: 1000 !important;
}

@keyframes spoton-marker-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.3) drop-shadow(0 0 10px rgba(0, 115, 170, 0.8));
    }
}

/* ==========================================================================
   ENHANCED RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .spoton-card-header-content {
        gap: 12px;
    }
    
    .spoton-card-map-icon {
        width: 32px;
        height: 32px;
    }
    
    .spoton-custom-map-icon {
        width: 18px;
        height: 18px;
    }
    
    .spoton-default-map-icon {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .spoton-card-map-icon {
        width: 28px;
        height: 28px;
    }
    
    .spoton-default-map-icon {
        font-size: 14px;
    }
    
    .spoton-no-results-icon {
        font-size: 36px;
    }
    
    .spoton-no-results h3 {
        font-size: 18px;
    }
}

/* ==========================================================================
   ENHANCED CARD BADGES FOR TERMS
   ========================================================================== */

.spoton-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.spoton-card-badge {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.spoton-card-badge:nth-child(2) {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

.spoton-card-badge:nth-child(3) {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.spoton-card-badge:nth-child(4) {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
}

.spoton-card-badge:nth-child(5) {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* ==========================================================================
   LIST VISIBILITY CONTROL
   ========================================================================== */

.spoton-cards-container {
    margin-top: 30px;
    padding: 20px 0;
}

/* Ensure list respects show_list parameter */
.spoton-map-container[data-show-list="false"] .spoton-cards-container {
    display: none !important;
}

/* ==========================================================================
   ENHANCED RESPONSIVE DESIGN FOR BADGES
   ========================================================================== */

@media (max-width: 768px) {
    .spoton-card-header {
        padding: 16px 16px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .spoton-card-badges {
        margin-top: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .spoton-card-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .spoton-card-badge {
        font-size: 9px;
        padding: 2px 5px;
        border-radius: 10px;
    }
}



