/**
 * SVG Events Manager - Frontend Styles
 */

/* Header wie die Terminübersicht */
.svg-next-events {
    padding: 8px 0 22px;
}

.svg-next-events h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    color: #194e9e;
    font-weight: 700;
}

.svg-events-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

a.svg-event-card,
.svg-event-card {
    display: block;
    background: #194e9e;
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 22px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

a.svg-event-card:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.svg-event-card-date {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.svg-event-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.svg-event-card-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.svg-event-card-location svg {
    width: 16px;
    height: 16px;
}

.svg-month-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 14px;
}

.svg-month-filter-label {
    font-weight: 600;
    margin-right: 4px;
}

.svg-month-btn {
    border: none;
    background: transparent;
    color: #334155;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.svg-month-btn.active,
.svg-month-btn:hover {
    background: #194e9e;
    color: #fff;
}

.svg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.svg-filter-bar label,
.svg-filter-bar .svg-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.svg-filter-bar input[type="text"],
.svg-filter-bar input[type="date"],
.svg-filter-bar select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    background: #fff;
    min-width: 0;
}

.svg-filter-bar .svg-search-field input {
    width: 100%;
    min-width: 0;
    max-width: 320px;
}

.svg-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
    padding-bottom: 8px;
    cursor: pointer;
}

.svg-future-short {
    display: none;
}

.svg-stats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.svg-stats-count,
.svg-stats-range {
    font-size: 14px;
}

.svg-stats-range {
    flex: 1;
    text-align: center;
}

.svg-subscribe-wrap {
    margin-left: auto;
    text-align: right;
}

.svg-btn-subscribe {
    background: #194e9e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

.svg-btn-subscribe:hover {
    background: #143d7a;
    color: #fff;
}

.svg-subscribe-note,
.svg-subscribe-help summary {
    font-size: 12px;
    color: #64748b;
}

.svg-subscribe-help {
    text-align: left;
}

.svg-events-row {
    cursor: pointer;
}

.svg-events-row:hover {
    background: #f8fafc;
}

@media (max-width: 800px) {
    .svg-stats-range {
        order: 3;
        flex-basis: 100%;
        text-align: left;
    }
    .svg-subscribe-wrap {
        margin-left: 0;
    }
}


.svg-events-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
}

.svg-page-title {
    margin: 0 0 8px;
    background: #194e9e;
    color: #fff;
    text-align: center;
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 700;
    padding: 28px 20px;
    border-radius: 8px;
}

.svg-category-field,
.svg-location-field {
    flex: 0 0 210px;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
}

.svg-category-dropdown {
    position: relative;
    width: 100%;
}

.svg-events-container .svg-filter-bar .svg-select-control {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 38px;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 32px 8px 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    color: #1e293b;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23334155' d='M1.4 0 6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svg-year-field[hidden] {
    display: none;
}

.svg-category-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 8px;
}

.svg-category-panel label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-weight: 500 !important;
    cursor: pointer;
}

.svg-cat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #6c757d;
    color: #fff;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}

body.svg-events-overview .entry-header,
body.svg-events-overview h1.entry-title {
    display: none !important;
}

body.svg-events-overview #right-sidebar,
body.svg-events-overview #left-sidebar,
body.svg-events-overview .sidebar.widget-area,
body.svg-events-overview .is-right-sidebar {
    display: none !important;
}

body.svg-events-overview #primary,
body.svg-events-overview .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

@media (max-width: 782px) {
    .svg-page-title {
        font-size: 1.45rem;
        padding: 20px 14px;
    }

    .svg-events-cards {
        grid-template-columns: 1fr;
    }

    .svg-filter-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .svg-filter-bar > * {
        min-width: 0;
        max-width: 100%;
    }

    .svg-filter-bar .svg-search-field input,
    .svg-filter-bar select,
    .svg-filter-bar input[type="date"],
    .svg-filter-bar input[type="text"],
    .svg-category-dropdown,
    .svg-category-trigger {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .svg-future-full {
        display: none;
    }

    .svg-future-short {
        display: inline;
    }

    .svg-month-filter {
        flex-wrap: wrap;
        overflow: hidden;
        max-width: 100%;
    }

    .svg-stats-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .svg-stats-range,
    .svg-subscribe-wrap {
        margin-left: 0;
        text-align: center;
    }

    .svg-events-table th,
    .svg-events-table td {
        padding: 10px 8px;
    }
}

.svg-events-controls {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 24px;
}

.svg-events-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.svg-events-search-bar input[type="text"] {
    flex: 1 1 240px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.svg-events-search-bar input[type="text"]:focus {
    border-color: #194e9e;
    box-shadow: 0 0 0 3px rgba(25, 78, 158, 0.15);
}

.svg-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.svg-events-cat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.svg-cat-filter-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

.svg-cat-filter-btn:hover {
    border-color: #194e9e;
    color: #194e9e;
}

.svg-cat-filter-btn.active {
    background: #194e9e;
    color: #fff;
    border-color: #194e9e;
}

.svg-events-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.svg-stats-bar .svg-btn-subscribe {
    background: #194e9e;
    color: #fff;
    border: none;
}

.svg-stats-bar .svg-btn-subscribe:hover {
    background: #143d7a;
    color: #fff;
}

/* Table */
.svg-events-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.svg-events-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.svg-events-table th {
    background: #194e9e;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    user-select: none;
}

.svg-events-table th.svg-sortable {
    cursor: pointer;
}

.svg-events-table th.svg-sortable::after {
    content: ' ↕';
    opacity: 0.55;
    font-size: 0.8em;
}

.svg-events-table th.svg-sortable.is-asc::after {
    content: ' ↑';
    opacity: 1;
}

.svg-events-table th.svg-sortable.is-desc::after {
    content: ' ↓';
    opacity: 1;
}

.svg-events-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.svg-events-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.svg-events-row:hover {
    background-color: #f8fafc;
}

.svg-cell-date {
    white-space: nowrap;
    font-weight: 600;
    color: #0f172a;
    width: 130px;
}

.svg-cell-name {
    font-size: 15px;
}

.svg-cell-name a {
    color: #194e9e;
    text-decoration: none;
    font-weight: 600;
}

.svg-cell-name a:hover {
    text-decoration: underline;
}

.svg-cell-location {
    color: #475569;
}

.svg-cat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}

.svg-events-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 15px;
}


/* ==========================================================================
   Detail Page Styles
   ========================================================================== */

.svg-detail-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    line-height: 1.6;
    box-sizing: border-box;
}

body.single-svg_event,
body.single-svg_event #page,
body.single-svg_event #content {
    background: #fff;
}

body.single-svg_event #content {
    overflow-x: hidden;
}

.svg-detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #194e9e;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    margin: 4px 0 22px;
}

.svg-detail-back-link:hover {
    text-decoration: underline;
}

.svg-detail-header h1 {
    font-size: 2rem;
    color: #0f172a;
    margin: 0 0 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.svg-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    color: #475569;
    font-size: 16px;
    margin-bottom: 14px;
}

.svg-detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.svg-detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
}

.svg-detail-image-wrap {
    margin: 22px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.svg-detail-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.svg-detail-content {
    font-size: 17px;
    margin: 22px 0 8px;
    color: #1e293b;
}

.svg-detail-content p {
    margin: 0 0 12px;
}

.svg-detail-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 22px 0;
}

.svg-detail-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #0f172a;
}

.svg-detail-times {
    margin: 0;
}

.svg-detail-times > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
}

.svg-detail-times > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.svg-detail-times dt {
    margin: 0;
    font-weight: 600;
}

.svg-detail-times dd {
    margin: 0;
    text-align: right;
}

.svg-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.svg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s;
}

.svg-btn-primary {
    background: #194e9e;
    color: #fff !important;
}

.svg-btn-primary:hover {
    background: #153d7a;
}

.svg-btn-outline {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
}

.svg-btn-outline:hover {
    background: #f8fafc;
    border-color: #194e9e;
    color: #194e9e !important;
}

.svg-detail-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    margin-top: 28px;
}

@media (max-width: 782px) {
    .svg-category-field,
    .svg-location-field {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .svg-events-table-wrap {
        overflow: hidden;
        max-width: 100%;
    }

    .svg-events-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .svg-events-table thead {
        display: none !important;
    }

    .svg-events-table tbody,
    .svg-events-table tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .svg-events-table td {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    .svg-events-row.svg-row-hidden {
        display: none !important;
    }

    .svg-events-table tr.svg-events-row {
        padding: 12px 14px;
        border-bottom: 1px solid #e2e8f0;
    }

    .svg-events-table td {
        padding: 0;
        border: 0;
    }

    .svg-cell-date {
        white-space: normal;
        margin-bottom: 2px;
        font-size: 13px;
    }

    .svg-cell-name {
        font-size: 16px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .svg-cell-location {
        margin-top: 2px;
        font-size: 14px;
    }

    .svg-cell-categories {
        margin-top: 8px;
    }

    .svg-cat-badge {
        white-space: normal;
    }

    .svg-events-container {
        overflow-x: hidden;
        max-width: 100%;
    }

    body.svg-events-overview,
    body.svg-events-overview #page,
    body.svg-events-overview #content {
        overflow-x: hidden;
        max-width: 100%;
    }

    html:has(body.svg-events-overview) {
        overflow-x: hidden;
    }

    body.single-svg_event .svg-detail-container {
        padding: 12px 18px 36px;
    }

    body.single-svg_event .svg-detail-header h1 {
        font-size: 1.65rem;
        margin-bottom: 16px;
    }

    body.single-svg_event .svg-detail-back-link {
        margin-bottom: 18px;
    }

    body.single-svg_event .svg-detail-content {
        margin-top: 20px;
    }

    body.single-svg_event .svg-detail-section {
        padding: 16px;
        margin: 20px 0;
    }

    body.single-svg_event .svg-detail-share {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    body.single-svg_event .svg-detail-links .svg-btn,
    body.single-svg_event .svg-detail-share .svg-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
