/* Frontend Styles für Veranstaltungen & Richterberichte */

/* Veranstaltungen Container */
.ve-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Richterberichte Container */
.ru-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Filter - Veranstaltungen */
.ve-filters {
    margin-bottom: 32px;
    padding: 20px 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 20px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 32px auto;
}

/* Filter - Richterberichte */
.ru-filters {
    margin-bottom: 32px;
    padding: 20px 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 20px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 32px auto;
}

/* Bessere Mindestbreiten für Dropdowns - Veranstaltungen */
.ve-filters .ve-filter-item:nth-child(2) {
    min-width: 180px;
}

/* Bessere Mindestbreiten für Dropdowns - Richterberichte */
.ru-filters .ru-filter-item:nth-child(2),
.ru-filters .ru-filter-item:nth-child(3) {
    min-width: 180px;
}

/* Reset-Button Styling - Veranstaltungen */
.ve-filter-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Reset-Button Styling - Richterberichte */
.ru-filter-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ve-filter-reset {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.ru-filter-reset {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.ve-filter-reset:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.ru-filter-reset:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.ru-filter-reset:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.4);
}

.ru-filter-reset:disabled {
    background: #9ca3af;
    color: white;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.ve-filter-reset.reset-success {
    background: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.ve-filter-reset.reset-success:hover {
    background: #10b981;
    transform: none;
}

.ru-filter-reset.reset-success {
    background: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.ru-filter-reset.reset-success:hover {
    background: #10b981;
    transform: none;
}

.ve-reset-icon {
    font-size: 16px;
    line-height: 1;
}

.ve-reset-text {
    font-size: 14px;
    transition: all 0.2s ease;
}

.ru-reset-icon {
    font-size: 16px;
    line-height: 1;
}

.ru-reset-text {
    font-size: 14px;
    transition: all 0.2s ease;
}

.ve-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ru-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ve-filters select,
.ve-filters input {
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
    min-height: 44px;
}

.ru-filters select,
.ru-filters input {
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
    min-height: 44px;
}

/* Theme-Überschreibung für Filter-Felder */
.elementor-widget-Veranstaltungen .ru-filters select,
.elementor-widget-Veranstaltungen .ru-filters input,
.ru-container .ru-filters select,
.ru-container .ru-filters input {
    color: #374151 !important;
}

/* Spezielle Styles für Dropdowns */
.ru-filters select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M6 8L0 2h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 36px;
    padding-top: 14px;
    padding-bottom: 14px;
    vertical-align: middle;
}

/* Option-Styling für bessere Darstellung */
.ru-filters select option {
    padding: 8px 12px;
    line-height: 1.4;
    font-size: 14px;
}

.ve-filters select:focus,
.ve-filters input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.ru-filters select:focus,
.ru-filters input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Jahres-Gruppierung - Veranstaltungen */
.ve-year-group {
    margin-bottom: 40px;
}

/* Jahres-Gruppierung - Richterberichte */
.ru-year-group {
    margin-bottom: 40px;
}

.ve-year-header {
    background: #374151;
    color: white;
    padding: 20px 24px;
    margin: 0 0 24px 0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(55, 65, 81, 0.1);
}

.ru-year-header {
    background: #374151;
    color: white;
    padding: 20px 24px;
    margin: 0 0 24px 0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(55, 65, 81, 0.1);
}

/* Theme-Überschreibung für Jahres-Header - Veranstaltungen */
.elementor-widget-veranstaltungen .ve-year-header,
.ve-container .ve-year-header {
    color: white !important;
}

/* Theme-Überschreibung für Jahres-Header - Richterberichte */
.elementor-widget-richterberichte_urkunden .ru-year-header,
.ru-container .ru-year-header {
    color: white !important;
}

.ve-year-header:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(55, 65, 81, 0.2);
}

.ru-year-header:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(55, 65, 81, 0.2);
}

.ve-year-toggle {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.ru-year-toggle {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.ve-year-content {
    transition: all 0.3s ease;
}

.ru-year-content {
    transition: all 0.3s ease;
}

/* Grid Layout - Veranstaltungen */
.ve-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    margin-top: 24px;
}

/* Grid Layout - Richterberichte */
.ru-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    margin-top: 24px;
}

/* Auszeichnungs-Box */
.ru-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ru-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Platzierung mit Pokal-Icon */
.ru-platzierung {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    text-align: center;
    padding: 0;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Theme-Überschreibung für Platzierung */
.elementor-widget-Veranstaltungen .ru-platzierung,
.ru-container .ru-platzierung {
    color: #374151 !important;
}

.ru-platzierung .ru-trophy-icon {
    font-size: 32px;
    line-height: 1;
}

.ru-platzierung .ru-place-text {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: inherit;
}

/* Theme-Überschreibung für Platz-Text */
.elementor-widget-Veranstaltungen .ru-place-text,
.ru-container .ru-place-text {
    color: #374151 !important;
}

/* Ausstellung */
.ru-ausstellung {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Wichtige Überschreibung für Theme-Kompatibilität */
.elementor-widget-Veranstaltungen .ru-ausstellung,
.ru-container .ru-ausstellung {
    color: #111827 !important;
}

.ru-besonderheiten {
    font-size: 13px;
    color: #059669 !important;
    font-weight: 600;
    margin-top: 6px;
    padding: 4px 8px;
    background: #ecfdf5;
    border-radius: 6px;
    display: inline-block;
    text-align: center;
}

/* Datum */
.ru-datum {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Theme-Überschreibung für Datum */
.elementor-widget-Veranstaltungen .ru-datum,
.ru-container .ru-datum {
    color: #6b7280 !important;
}

/* Buttons */
.ru-buttons {
    display: flex;
    gap: 8px;
    flex-direction: column;
    margin-top: auto;
}

/* Höhere Spezifität für Theme-Override-Schutz */
.ru-item .ru-buttons .ru-button,
.elementor-widget-Veranstaltungen .ru-button {
    text-decoration: none !important;
    color: inherit;
}

.ru-item .ru-buttons .ru-button:hover,
.ru-item .ru-buttons .ru-button:focus,
.ru-item .ru-buttons .ru-button:active,
.elementor-widget-Veranstaltungen .ru-button:hover,
.elementor-widget-Veranstaltungen .ru-button:focus,
.elementor-widget-Veranstaltungen .ru-button:active {
    text-decoration: none !important;
}

/* Globale Button-Farben-Überschreibung */
.elementor-widget-Veranstaltungen .ru-button-urkunde,
.ru-container .ru-button-urkunde {
    color: white !important;
}

.elementor-widget-Veranstaltungen .ru-button-Veranstaltung,
.ru-container .ru-button-Veranstaltung {
    color: white !important;
}

.elementor-widget-Veranstaltungen .ru-filter-reset,
.ru-container .ru-filter-reset {
    color: white !important;
}

.ru-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ru-button:hover,
.ru-button:focus {
    text-decoration: none !important;
}

.ru-button-urkunde {
    background: #dc2626;
    color: white !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.ru-button-urkunde:hover,
.ru-button-urkunde:focus {
    background: #b91c1c !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
    text-decoration: none !important;
}

.ru-button-Veranstaltung {
    background: #dc2626;
    color: white !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.ru-button-Veranstaltung:hover,
.ru-button-Veranstaltung:focus {
    background: #b91c1c !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
    text-decoration: none !important;
}

/* Keine Ergebnisse */
.ru-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

/* Extra große Bildschirme - mehr Platz für Filter */
@media (min-width: 1920px) {
    .ru-filters {
        max-width: 1100px;
        grid-template-columns: 1.8fr 1.1fr 1.1fr auto;
        gap: 24px;
    }
    
    .ru-filters .ru-filter-item:nth-child(2),
    .ru-filters .ru-filter-item:nth-child(3) {
        min-width: 200px;
    }
}

/* Große Desktop Bildschirme */
@media (min-width: 1400px) and (max-width: 1919px) {
    .ru-filters {
        max-width: 1050px;
        grid-template-columns: 1.6fr 1.2fr 1.2fr auto;
        gap: 22px;
    }
    
    .ru-filters .ru-filter-item:nth-child(2),
    .ru-filters .ru-filter-item:nth-child(3) {
        min-width: 190px;
    }
}

/* Standard Desktop */
@media (min-width: 1025px) and (max-width: 1399px) {
    .ru-filters {
        grid-template-columns: 1.5fr 1fr 1fr auto;
        gap: 20px;
    }
}

/* Tablet Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .ru-filters {
        grid-template-columns: 1fr 1fr auto;
        padding: 20px;
        max-width: 750px;
    }
    
    .ru-filters .ru-filter-item:first-child {
        grid-column: 1 / -1;
    }
    
    .ru-filters .ru-filter-item:nth-child(2),
    .ru-filters .ru-filter-item:nth-child(3) {
        min-width: 150px;
    }
    
    .ru-filter-reset {
        grid-column: 3;
        grid-row: 2;
        margin-left: 16px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ru-container {
        padding: 24px 16px;
    }
    
    .ru-filters {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 12px;
    }
    
    .ru-filter-reset {
        justify-self: center;
        margin-top: 8px;
        max-width: 200px;
    }
    
    .ru-reset-text {
        display: inline;
    }
    
    .ru-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }
    
    .ru-item {
        padding: 20px;
        min-height: 180px;
    }
    
    .ru-platzierung .ru-trophy-icon {
        font-size: 28px;
    }
    
    .ru-ausstellung {
        font-size: 16px;
    }
    
    .ru-year-header {
        padding: 16px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ru-container {
        padding: 10px;
    }
    
    .ru-item {
        padding: 12px;
    }
    
    .ru-platzierung {
        font-size: 18px;
    }
    
    .ru-ausstellung {
        font-size: 14px;
    }
    
    .ru-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .ru-filter-reset {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .ru-reset-text {
        font-size: 13px;
    }
    
    .ru-filters select,
    .ru-filters input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        min-height: 48px; /* Touch-freundlich */
    }
}

/* Animationen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

.ru-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.ru-item:nth-child(1) { animation-delay: 0.1s; }
.ru-item:nth-child(2) { animation-delay: 0.2s; }
.ru-item:nth-child(3) { animation-delay: 0.3s; }
.ru-item:nth-child(4) { animation-delay: 0.4s; }
.ru-item:nth-child(5) { animation-delay: 0.5s; }
.ru-item:nth-child(6) { animation-delay: 0.6s; }

.ru-year-content {
    animation: slideDown 0.3s ease-out;
}

/* Verbesserte Button-Interaktionen */
.ru-button {
    position: relative;
    will-change: transform, box-shadow;
}

.ru-button:active {
    transform: translateY(0) !important;
    transition: all 0.1s ease;
}

.ru-button-urkunde:active,
.ru-button-Veranstaltung:active {
    background: #991b1b !important;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.4) !important;
}

/* Loading-Zustand */
.ru-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ru-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    border-top-color: #007cba;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Platzierung-spezifische Farben für Trophy Icons */
.ru-item[data-platzierung="1"] .ru-trophy-icon {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.ru-item[data-platzierung="2"] .ru-trophy-icon {
    color: #c0c0c0;
    text-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.ru-item[data-platzierung="3"] .ru-trophy-icon {
    color: #cd7f32;
    text-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.ru-item[data-platzierung="4"] .ru-trophy-icon,
.ru-item[data-platzierung="5"] .ru-trophy-icon,
.ru-item[data-platzierung="6"] .ru-trophy-icon {
    color: #6b7280;
    text-shadow: 0 1px 2px rgba(107, 114, 128, 0.2);
}

/* Tooltip für Buttons */
.ru-button {
    position: relative;
}

.ru-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.ru-button[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
    z-index: 1000;
} 

/* Video Styles für Veranstaltungen-Widget */
.ve-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px 0 0 16px; /* Abgerundet oben links und unten links */
    margin: 0;
    padding: 0;
}

.ve-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px 0 0 16px; /* Abgerundet oben links und unten links */
    margin: 0;
    padding: 0;
    border: none;
}

.ve-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
    border-radius: 16px 0 0 16px; /* Abgerundet oben links und unten links */
    margin: 0;
    padding: 0;
}

.ve-video-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.ve-play-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0;
}

.ve-play-button:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ve-play-icon {
    font-size: 20px;
    color: #333;
    margin-left: 3px; /* Leichte Verschiebung für bessere optische Zentrierung */
    line-height: 1;
}

/* Video-Spezifische Card-Klassen */
.ve-has-video .ve-image-section {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 16px 0 0 16px;
    overflow: hidden;
}

.ve-has-video .ve-video-container.playing .ve-video-overlay {
    opacity: 0;
    pointer-events: none;
}

.ve-has-video .ve-video-container.playing .ve-video {
    cursor: pointer;
}

/* Responsive Video-Anpassungen */
@media (max-width: 768px) {
    .ve-video-container {
        border-radius: 12px 12px 0 0; /* Auf Mobile: oben abgerundet */
    }
    
    .ve-video {
        border-radius: 12px 12px 0 0;
    }
    
    .ve-video-overlay {
        border-radius: 12px 12px 0 0;
    }
    
    .ve-has-video .ve-image-section {
        border-radius: 12px 12px 0 0;
    }
    
    .ve-play-button {
        width: 50px;
        height: 50px;
    }
    
    .ve-play-icon {
        font-size: 16px;
    }
}

/* Desktop: Nur oben links und unten links abgerundet */
@media (min-width: 769px) {
    .ve-video-container {
        border-radius: 16px 0 0 16px !important;
    }
    
    .ve-video {
        border-radius: 16px 0 0 16px !important;
    }
    
    .ve-video-overlay {
        border-radius: 16px 0 0 16px !important;
    }
    
    .ve-has-video .ve-image-section {
        border-radius: 16px 0 0 16px !important;
    }
}

/* Placeholder-Update für No-Media */
.ve-no-media .ve-placeholder-icon {
    font-size: 48px;
    color: #9ca3af;
} 