/* JuKi Event Calendar Frontend Styles */

.juki-events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.juki-events-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2.5em;
}

/* Filter Bereich */
#juki-events-filter {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.juki-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.juki-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.juki-btn-primary {
    background: #0073aa;
    color: white;
}

.juki-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.juki-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.juki-filter-reset {
    background: #666;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.juki-filter-reset:hover {
    background: #444;
}

/* Events Liste */
#juki-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.juki-event-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.juki-event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.juki-event-header {
    margin-bottom: 15px;
}

.juki-event-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.juki-event-date {
    display: inline-flex;
    align-items: center;
    background: #0073aa;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.date-icon {
    margin-right: 6px;
    font-size: 14px;
}

.juki-event-meta {
    margin-bottom: 15px;
}

.juki-event-category {
    display: inline-flex;
    align-items: center;
    background: #46b450;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-icon {
    margin-right: 5px;
    font-size: 12px;
}

.juki-event-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.juki-event-excerpt {
    margin: 0;
}

.juki-event-actions {
    text-align: right;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.juki-read-more {
    background: transparent;
    color: #0073aa;
    border: 1px solid #0073aa;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.juki-read-more:hover {
    background: #0073aa;
    color: white;
}

/* No Events Styling */
.juki-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
    grid-column: 1 / -1; /* Nimmt die ganze Breite im Grid */
}

.no-events-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.juki-no-events h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    color: #333;
}

.juki-no-events p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.5;
}

/* Loading State */
.juki-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.juki-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: juki-spin 1s linear infinite;
    z-index: 1000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .juki-events-container {
        padding: 15px;
    }

    .juki-events-container h2 {
        font-size: 2em;
        margin-bottom: 20px;
    }

    #juki-events-filter {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    #juki-events-filter label {
        margin-right: 0;
        margin-bottom: 5px;
    }

    #juki-events-filter select,
    #juki-events-filter input[type="date"] {
        width: 100%;
        max-width: none;
    }

    #juki-events-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .juki-event-meta {
        flex-direction: column;
        gap: 8px;
    }

    .juki-event-date,
    .juki-event-category {
        display: inline-block;
        width: fit-content;
    }
}

@media (max-width: 480px) {
    .juki-events-container {
        padding: 10px;
    }

    .juki-event-item {
        padding: 15px;
    }

    .juki-event-title {
        font-size: 1.2em;
    }
}

/* No Events Message */
.juki-no-events {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.juki-no-events:before {
    content: "📅";
    display: block;
    font-size: 3em;
    margin-bottom: 15px;
}

/* Filter Reset Button */
.juki-filter-reset {
    background: #666;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.juki-filter-reset:hover {
    background: #444;
}

/* Category Colors (will be set dynamically via JavaScript) */
.juki-category-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animations */
.juki-event-item {
    animation: juki-fadeIn 0.5s ease;
}

@keyframes juki-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Widget Styles */
.juki-events-widget .widget-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
}

.juki-widget-events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.juki-widget-event-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    transition: background-color 0.3s ease;
}

.juki-widget-event-item:hover {
    background: #f0f0f0;
}

.juki-widget-event-item:last-child {
    margin-bottom: 0;
}

.juki-widget-event-title {
    margin: 0 0 8px 0;
    font-size: 1em;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.juki-widget-event-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.juki-widget-event-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: white;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.juki-widget-event-excerpt {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

.juki-widget-more-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.juki-widget-view-all {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: color 0.3s ease;
}

.juki-widget-view-all:hover {
    color: #005a87;
    text-decoration: underline;
}

.juki-widget-no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 2px dashed #ddd;
}

/* Widget Admin Styles */
.widget .juki-events-widget input.tiny-text {
    width: 60px;
}

.widget .juki-events-widget .checkbox {
    margin-right: 5px;
}

