/* =============================================
   TTC Events Display — Styles
   ============================================= */

.ttc-events-wrapper {
    font-family: inherit;
    max-width: 100%;
}

/* --- Category Filter Tabs --- */

.ttc-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
    padding-bottom: 0;
}

.ttc-cat-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.ttc-cat-btn.active {
    border-bottom-color: var(--cat-color, #6b7280);
    color: #111827;
}

.ttc-cat-btn.inactive {
    opacity: 0.45;
}

/* Checkmark als umrandetes Kästchen */
.ttc-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 2px solid var(--cat-color, #6b7280);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--cat-color, #6b7280);
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.ttc-cat-btn.inactive .ttc-checkmark {
    opacity: 0;
}

/* --- Heading --- */

.ttc-events-heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
    padding: 0;
}

/* --- Events List --- */

.ttc-events-list {
    display: flex;
    flex-direction: column;
}

.ttc-no-events {
    color: #6b7280;
    font-style: italic;
}

.ttc-event-item {
    border-bottom: 1px solid #e5e7eb;
}

.ttc-event-item.ttc-hidden {
    display: none;
}

/* --- Event Row --- */

.ttc-event-row {
    display: grid;
    grid-template-columns: 270px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 13px 4px;
    cursor: pointer;
    user-select: none;
}

.ttc-event-row:hover .ttc-event-name {
    text-decoration: underline;
}

.ttc-event-date {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.ttc-event-date strong {
    font-weight: 700;
}

.ttc-event-title-col {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    min-width: 0;
}

.ttc-cat-bar {
    display: inline-block;
    width: 4px;
    min-width: 4px;
    height: 20px;
    border-radius: 2px;
}

.ttc-event-cat-label {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.ttc-event-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ttc-event-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ttc-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ttc-arrow {
    display: block;
    transition: transform 0.2s ease;
}

.ttc-toggle-btn[aria-expanded="true"] .ttc-arrow {
    transform: rotate(180deg);
}

/* --- Event Details (Accordion) --- */

.ttc-event-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 8px 4px 28px;
}

.ttc-event-details[hidden] {
    display: none;
}

.ttc-event-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.ttc-event-info {
    padding-top: 4px;
}

.ttc-detail-row {
    margin: 0 0 8px;
    font-size: 15px;
    color: #374151;
}

.ttc-detail-row strong {
    font-weight: 600;
}

.ttc-detail-desc {
    margin: 10px 0 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .ttc-event-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .ttc-event-date {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    .ttc-event-details {
        grid-template-columns: 1fr;
    }

    .ttc-category-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
