/* ==================== Event Kalender Styling ==================== */

/* ==================== CSS Reset für Page Builder Isolation ==================== */
/* Verhindert Konflikte mit Breakdance, Elementor, etc. */

.skm-events-container,
.skm-events-container *,
.skm-events-container *::before,
.skm-events-container *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

.skm-events-container {
    all: initial;
    display: block !important;
    box-sizing: border-box !important;
}

/* Container */
.skm-events-container {
    display: block !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #2c3e50 !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
}

/* ==================== Listen-Ansicht ==================== */
.skm-events-list {
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

.skm-events-list .skm-event-item {
    margin-bottom: 30px !important;
}

.skm-events-list .skm-event-item:last-of-type {
    margin-bottom: 30px !important;
}

.skm-event-item {
    display: flex !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

.skm-event-item > * {
    margin-right: 25px;
}

.skm-event-item > *:last-child {
    margin-right: 0;
}

.skm-event-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.skm-event-item:hover .skm-event-date-badge {
    transform: scale(1.05);
}

/* Datum Badge - im Bild absolut positioniert */
.skm-event-image .skm-event-date-badge {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border-radius: 0 0 12px 0 !important;
    padding: 15px 12px !important;
    text-align: center !important;
    min-width: 90px !important;
    z-index: 10 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    transition: transform 0.3s ease !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

/* Datum Badge standalone (ohne Bild) - Desktop List View */
.skm-events-list .skm-badge-standalone {
    position: relative !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 20px 15px !important;
    text-align: center !important;
    min-width: 100px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    transition: transform 0.3s ease !important;
    margin: 0 25px 0 0 !important;
    flex-shrink: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    order: -1 !important;
    align-self: flex-start !important;
}

/* Hover-Effekt auch für standalone */
.skm-event-item:hover .skm-badge-standalone {
    transform: scale(1.05) !important;
}

.skm-event-day {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.skm-event-month {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-top: 5px;
}

.skm-event-year {
    font-size: 14px;
    opacity: 0.8;
    display: block;
    margin-top: 3px;
}

/* Event Wrapper für Bild + Badge */
.skm-event-item {
    position: relative !important;
}

/* Event Bild Container - 4:3 Aspect Ratio */
.skm-event-image {
    position: relative !important;
    width: 320px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    order: -1 !important;
    border-radius: 12px 0 0 12px !important;
    background: #f5f5f5 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* 4:3 Aspect Ratio erzwingen */
.skm-event-image::before {
    content: '' !important;
    display: block !important;
    padding-top: 75% !important; /* 4:3 = 75% */
}

.skm-event-image > img,
.skm-event-image > .skm-event-placeholder {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Placeholder für Events ohne Bild */
.skm-event-placeholder {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #1a252f 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.skm-event-placeholder::after {
    content: '📅' !important;
    font-size: 64px !important;
    opacity: 0.3 !important;
}

/* Event ohne Bild - dunkleres Placeholder */
.skm-event-no-image .skm-event-placeholder {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 50%, #5d6d7e 100%) !important;
}

.skm-event-sold-out-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #d63638;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

/* Event Content */
.skm-event-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    flex: 1;
}

.skm-event-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1d2327;
    line-height: 1.3;
}

.skm-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.skm-event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #646970;
    font-size: 15px;
}

.skm-event-meta-item .dashicons {
    color: #2271b1;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.skm-event-free {
    color: #00a32a;
    font-weight: 600;
}

.skm-event-description {
    color: #50575e;
    line-height: 1.6;
    margin: 10px 0;
}

/* Event Actions */
.skm-event-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.skm-event-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.skm-event-btn-primary {
    background: #2271b1;
    color: #fff;
}

.skm-event-btn-primary:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.skm-event-btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.skm-event-btn-secondary:hover {
    background: #dcdcde;
}

.skm-event-btn-disabled {
    background: #dcdcde;
    color: #a7aaad;
    cursor: not-allowed;
}

.skm-event-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Sold Out State */
.skm-event-sold-out {
    opacity: 0.7;
}

.skm-event-sold-out .skm-event-date-badge {
    background: linear-gradient(135deg, #646970 0%, #787c82 100%);
}

/* ==================== Grid-Ansicht ==================== */
.skm-events-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.skm-events-grid .skm-event-item {
    margin-bottom: 30px !important;
    flex-direction: column !important;
}

.skm-events-grid .skm-event-item:last-of-type {
    margin-bottom: 30px !important;
}

/* Grid: Bild oben, volle Breite, 4:3 Ratio */
.skm-events-grid .skm-event-image {
    width: 100% !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Grid: 4:3 bleibt erhalten durch ::before */
.skm-events-grid .skm-event-image::before {
    padding-top: 75% !important; /* 4:3 Ratio */
}

/* Grid: Badge im Bild */
.skm-events-grid .skm-event-image .skm-event-date-badge {
    top: 0 !important;
    left: 0 !important;
}

/* Grid: Badge standalone ohne Bild - zentriert über Content */
.skm-events-grid .skm-badge-standalone {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    margin: 0 !important;
    z-index: 5 !important;
}

.skm-events-grid .skm-event-content {
    padding: 20px !important;
}

.skm-events-grid .skm-event-title {
    font-size: 20px !important;
}

.skm-events-grid .skm-event-meta {
    flex-direction: column !important;
}

.skm-events-grid .skm-event-meta > * {
    margin-bottom: 10px;
}

.skm-events-grid .skm-event-meta > *:last-child {
    margin-bottom: 0;
}

.skm-events-grid .skm-event-actions {
    flex-direction: column !important;
}

/* ==================== No Events ==================== */
.skm-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
    font-size: 18px;
}

/* ==================== Load More Button ==================== */
.skm-events-wrapper .skm-load-more-wrapper,
.skm-load-more-wrapper {
    all: initial !important;
    display: block !important;
    text-align: center !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
    padding: 20px 0 !important;
    box-sizing: border-box !important;
}

button.skm-load-more-btn,
.skm-load-more-btn {
    all: initial !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 32px !important;
    background: var(--skm-button-color, #2c3e50) !important;
    color: var(--skm-button-text-color, #ffffff) !important;
    border: none !important;
    border-radius: 50px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    margin: 0 auto !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Breakdance Focus Override */
button.skm-load-more-btn:focus,
.skm-load-more-btn:focus,
button.skm-load-more-btn:focus-visible,
.skm-load-more-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

button.skm-load-more-btn:hover,
.skm-load-more-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    background: var(--skm-button-color-hover, #1a2634) !important;
    opacity: 0.9 !important;
}

button.skm-load-more-btn:active,
.skm-load-more-btn:active {
    transform: translateY(0) !important;
}

button.skm-load-more-btn:disabled,
.skm-load-more-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    pointer-events: none !important;
}

.skm-events-wrapper .skm-load-more-spinner,
.skm-load-more-spinner {
    all: initial !important;
    display: none !important;
    margin-left: 10px !important;
    vertical-align: middle !important;
}

.skm-load-more-spinner.visible {
    display: inline-block !important;
}

.skm-load-more-spinner .spinner {
    all: initial !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 3px solid var(--skm-spinner-border, rgba(255, 255, 255, 0.3)) !important;
    border-top-color: var(--skm-spinner-color, #ffffff) !important;
    border-radius: 50% !important;
    animation: skm-spinner-rotate 0.8s linear infinite !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

@keyframes skm-spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== Responsive ==================== */
@media (max-width: 782px) {
    .skm-event-item {
        flex-direction: column !important;
    }
    
    /* Mobile: Bild volle Breite, 4:3 Ratio beibehalten */
    .skm-event-image {
        width: 100% !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    /* 4:3 Ratio bleibt durch ::before erhalten */
    .skm-event-image::before {
        padding-top: 75% !important; /* 4:3 = 75% */
    }
    
    /* Badge im Bild */
    .skm-event-image .skm-event-date-badge {
        min-width: 80px !important;
        padding: 12px 10px !important;
    }
    
    /* Badge standalone - auf Mobile absolut positionieren */
    .skm-badge-standalone {
        position: absolute !important;
        top: 15px !important;
        left: 15px !important;
        min-width: 80px !important;
        padding: 12px 10px !important;
        margin: 0 !important;
        z-index: 5 !important;
    }
    
    /* Content Padding für Badge Platz */
    .skm-no-thumbnail .skm-event-content {
        padding-top: 90px !important;
    }
    
    .skm-event-day {
        font-size: 28px !important;
    }
    
    .skm-event-month {
        font-size: 13px !important;
    }
    
    .skm-event-year {
        font-size: 12px !important;
    }
    
    .skm-event-title {
        font-size: 18px !important;
    }
    
    .skm-event-meta {
        flex-direction: column !important;
    }
    
    .skm-event-meta > * {
        margin-bottom: 10px;
    }
    
    .skm-event-meta > *:last-child {
        margin-bottom: 0;
    }
    
    .skm-event-actions {
        flex-direction: column !important;
    }
    
    .skm-event-content {
        padding: 20px !important;
    }
    
    .skm-events-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Kompaktere Abstände zwischen Events */
    .skm-events-container {
        padding: 15px 0 !important;
    }
    
    .skm-events-list .skm-event-item {
        margin-bottom: 16px !important;
    }
    
    .skm-events-list .skm-event-item:last-of-type {
        margin-bottom: 16px !important;
    }
    
    /* Kompaktere Event Content Paddings */
    .skm-event-content {
        padding: 16px !important;
    }
    
    /* Kleinere Titel */
    .skm-event-title {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    /* Noch kompaktere Abstände */
    .skm-events-list .skm-event-item {
        margin-bottom: 12px !important;
    }
    
    .skm-events-list .skm-event-item:last-of-type {
        margin-bottom: 12px !important;
    }
    
    /* Badge im Bild */
    .skm-event-image .skm-event-date-badge {
        min-width: 70px !important;
        padding: 10px 8px !important;
    }
    
    /* Badge standalone - bleibt absolut */
    .skm-badge-standalone {
        min-width: 70px !important;
        padding: 10px 8px !important;
    }
    
    /* Content Padding für kleinere Badge */
    .skm-no-thumbnail .skm-event-content {
        padding-top: 80px !important;
    }
    
    .skm-event-day {
        font-size: 24px !important;
    }
    
    .skm-event-month {
        font-size: 12px !important;
    }
    
    .skm-event-year {
        font-size: 11px !important;
    }
    
    .skm-event-content {
        padding: 12px !important;
    }
    
    .skm-event-title {
        font-size: 16px !important;
    }
    
    .skm-event-placeholder::after {
        font-size: 48px !important;
    }
}
