/* ============================================
   VS Events – Frontend Styles
   v1.0 | vogelspinner.net
   ============================================ */

:root {
    --vse-black:      #111111;
    --vse-dark:       #222222;
    --vse-border:     #e2e2e2;
    --vse-bg:         #f5f5f5;
    --vse-white:      #ffffff;
    --vse-text:       #222222;
    --vse-muted:      #777777;
    --vse-past:       #aaaaaa;
    --vse-radius:     6px;
    --vse-shadow:     0 2px 10px rgba(0,0,0,0.08);
    --vse-shadow-hover: 0 8px 24px rgba(0,0,0,0.13);
    --vse-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Basis ────────────────────────────────── */
.vse-container,
.vse-single-wrap,
.vse-archive-wrap {
    font-family: var(--vse-font);
    color: var(--vse-text);
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Kachel-Grid ──────────────────────────── */
.vse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

/* ── Einzelne Kachel ──────────────────────── */
.vse-card {
    display: flex;
    flex-direction: column;
    background: var(--vse-white);
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    box-shadow: var(--vse-shadow);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vse-card:hover {
    box-shadow: var(--vse-shadow-hover);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* Bild */
.vse-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--vse-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vse-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.vse-card:hover .vse-card-image img {
    transform: scale(1.04);
}

.vse-card-image--placeholder svg {
    width: 40px;
    height: 40px;
    color: var(--vse-border);
}

/* Card Body */
.vse-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.vse-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vse-black);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vse-card-date svg {
    flex-shrink: 0;
}

.vse-card-time {
    font-weight: 400;
    color: var(--vse-muted);
    margin-left: 4px;
}

.vse-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--vse-black);
    margin: 4px 0 2px;
    line-height: 1.35;
}

.vse-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: var(--vse-muted);
}

.vse-card-location svg { flex-shrink: 0; }

.vse-card-excerpt {
    font-size: 13px;
    color: var(--vse-muted);
    line-height: 1.5;
    margin: 4px 0 0;
}

.vse-card-more {
    margin-top: auto;
    padding-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vse-black);
    letter-spacing: 0.02em;
}

/* Vergangene Kacheln */
.vse-card--past {
    opacity: 0.6;
    filter: grayscale(30%);
}

.vse-card--past:hover {
    opacity: 0.85;
}

/* ── Keine Events ─────────────────────────── */
.vse-no-events {
    color: var(--vse-muted);
    font-size: 14px;
    padding: 24px 0;
}

/* ── Vergangene Events Toggle ─────────────── */
.vse-past-section {
    border-top: 1px solid var(--vse-border);
    padding-top: 32px;
    margin-top: 8px;
}

.vse-past-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vse-muted);
    cursor: pointer;
    margin-bottom: 20px;
    transition: border-color 0.15s, color 0.15s;
}

.vse-past-toggle:hover {
    border-color: var(--vse-black);
    color: var(--vse-black);
}

.vse-past-toggle svg {
    transition: transform 0.2s;
}

.vse-past-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.vse-past-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ── Einzelansicht ────────────────────────── */
.vse-single-wrap {
    padding: 32px 0 64px;
}

.vse-back-link {
    display: inline-block;
    font-size: 13px;
    color: var(--vse-muted);
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.15s;
}

.vse-back-link:hover {
    color: var(--vse-black);
}

.vse-single-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--vse-black);
    margin: 0 0 12px;
    line-height: 1.2;
}

.vse-single-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.vse-single-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--vse-bg);
    border: 1px solid var(--vse-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vse-dark);
}

/* Layout: Inhalt + Sidebar */
.vse-single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.vse-single-image {
    width: 100%;
    height: auto;
    border-radius: var(--vse-radius);
    margin-bottom: 24px;
    display: block;
    border: 1px solid var(--vse-border);
}

.vse-single-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--vse-text);
}

.vse-single-description p { margin-bottom: 1em; }

/* Info-Karte (Sidebar) */
.vse-info-card {
    background: var(--vse-white);
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    box-shadow: var(--vse-shadow);
    padding: 20px 22px;
    position: sticky;
    top: 32px;
}

.vse-info-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vse-muted);
    margin: 0 0 16px;
}

.vse-info-row {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--vse-border);
}

.vse-info-row:last-of-type {
    border-bottom: none;
}

.vse-info-row svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--vse-muted);
}

.vse-info-row > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vse-info-row strong {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vse-muted);
}

.vse-info-row span,
.vse-info-row a {
    font-size: 13.5px;
    color: var(--vse-dark);
    line-height: 1.4;
    text-decoration: none;
    word-break: break-word;
}

.vse-info-row a:hover {
    text-decoration: underline;
    color: var(--vse-black);
}

.vse-cta-button {
    display: block;
    margin-top: 16px;
    padding: 11px 16px;
    background: var(--vse-black);
    color: #fff !important;
    text-align: center;
    border-radius: var(--vse-radius);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    transition: background 0.15s;
}

.vse-cta-button:hover {
    background: #333;
}

/* ── Archiv-Seite ─────────────────────────── */
.vse-archive-wrap {
    padding: 32px 0 64px;
}

.vse-archive-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    margin-bottom: 28px;
}

/* ── Responsive ───────────────────────────── */
@media ( max-width: 800px ) {
    .vse-single-layout {
        grid-template-columns: 1fr;
    }

    .vse-info-card {
        position: static;
    }
}

@media ( max-width: 560px ) {
    .vse-grid,
    .vse-past-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   VS Events – Filter & Listenansicht
   ============================================ */

/* ── Filter-Leiste ────────────────────────── */
.vse-filter-bar {
    margin-bottom: 24px;
}

.vse-filter-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.vse-filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vse-filter-bar select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    font-size: 13px;
    font-family: var(--vse-font);
    color: var(--vse-dark);
    background: var(--vse-white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%23777'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.15s;
}

.vse-filter-bar select:focus {
    outline: none;
    border-color: var(--vse-black);
}

.vse-filter-reset {
    font-size: 12px;
    color: var(--vse-muted);
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.vse-filter-reset:hover {
    color: var(--vse-black);
    border-color: var(--vse-black);
}

/* ── Ansicht-Toggle ───────────────────────── */
.vse-view-toggle {
    display: flex;
    gap: 4px;
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    overflow: hidden;
}

.vse-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    color: var(--vse-muted);
    text-decoration: none;
    background: var(--vse-white);
    transition: background 0.12s, color 0.12s;
}

.vse-view-btn:hover {
    color: var(--vse-black);
    background: var(--vse-bg);
}

.vse-view-btn.active {
    background: var(--vse-black);
    color: #fff;
}

/* ── Listenansicht ────────────────────────── */
.vse-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}

.vse-list-item {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
    background: var(--vse-white);
    border: 1px solid var(--vse-border);
    border-radius: var(--vse-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s, transform 0.15s;
    min-height: 110px;
    overflow: hidden;
}

.vse-list-item:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

/* Thumbnail */
.vse-list-thumb {
    width: 130px;
    min-width: 130px;
    height: 110px;
    overflow: hidden;
    background: var(--vse-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vse-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vse-list-thumb--placeholder svg {
    width: 24px;
    height: 24px;
    color: var(--vse-border);
}

/* Datumsspalte */
.vse-list-date-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px 20px;
    min-width: 160px;
    max-width: 160px;
    border-right: 1px solid var(--vse-border);
}

.vse-list-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--vse-black);
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.vse-list-time {
    font-size: 11.5px;
    color: var(--vse-muted);
    white-space: nowrap;
}

/* Hauptspalte */
.vse-list-body {
    flex: 1;
    padding: 14px 20px;
    min-width: 0;
}

.vse-list-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--vse-black);
    margin: 0 0 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vse-list-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--vse-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vse-list-veranstalter {
    font-size: 11.5px;
    color: var(--vse-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Land-Badge */
.vse-list-land {
    padding: 0 18px;
    flex-shrink: 0;
}

.vse-land-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--vse-muted);
    background: var(--vse-bg);
    border: 1px solid var(--vse-border);
    border-radius: 3px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* Pfeil */
.vse-list-arrow {
    padding: 0 20px 0 6px;
    color: var(--vse-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.vse-list-item:hover .vse-list-arrow {
    color: var(--vse-black);
    transform: translateX(3px);
}

/* Vergangene Listeneinträge */
.vse-list-item--past {
    opacity: 0.55;
}
.vse-list-item--past:hover {
    opacity: 0.8;
}

/* Past section mit Listenwrapper */
.vse-past-content {
    margin-top: 16px;
}

/* ── Responsive Listenansicht ─────────────── */
@media ( max-width: 640px ) {
    .vse-list-date-col {
        min-width: 90px;
        max-width: 90px;
        padding: 10px 10px;
    }
    .vse-list-thumb {
        width: 80px;
        min-width: 80px;
        height: 80px;
    }
    .vse-list-land,
    .vse-list-veranstalter { display: none; }
    .vse-list-arrow { padding: 0 10px; }
    .vse-filter-form { flex-direction: column; align-items: flex-start; }
    .vse-view-toggle { align-self: flex-end; }
}

/* ── Börsen-Zähler ────────────────────────── */
.vse-count-bar {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 16px;
}

.vse-count-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--vse-black);
    line-height: 1;
}

.vse-count-label {
    font-size: 14px;
    color: var(--vse-muted);
}

.vse-count-separator {
    margin: 0 4px;
    color: var(--vse-border);
}

.vse-count-total {
    font-size: 13px;
    color: var(--vse-muted);
}

.vse-count-filter-hint {
    font-size: 12px;
    color: var(--vse-muted);
    font-style: italic;
}
