/* Kochloft Kurstermine – Styles */

.kochloft-kurstermine {
    margin: 1.5em 0;
    font-family: inherit;
    color: inherit;
}

/* Filter buttons */
.kochloft-kurstermine__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1em;
    align-items: center;
}
.kochloft-kurstermine .kt-filter {
    appearance: none;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}
.kochloft-kurstermine .kt-filter:hover {
    border-color: #888;
}
.kochloft-kurstermine .kt-filter.is-active {
    background: #5C4022;
    border-color: #5C4022;
    color: #fff;
}

/* Month dropdown */
.kochloft-kurstermine .kt-filter-month-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
}
.kochloft-kurstermine .kt-filter-month {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #d0d0d0;
    background-color: #fff;
    color: #333;
    padding: 8px 38px 8px 16px;
    font-size: 0.9em;
    line-height: 1.4;
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    height: auto;
    box-shadow: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23555' d='M5 6L0 0h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px 6px;
}
.kochloft-kurstermine .kt-filter-month::-ms-expand {
    display: none;
}
.kochloft-kurstermine .kt-filter-month:hover {
    border-color: #888;
}
.kochloft-kurstermine .kt-filter-month:focus,
.kochloft-kurstermine .kt-filter-month:focus-visible {
    outline: none;
    border-color: #5C4022;
    box-shadow: 0 0 0 1px #5C4022;
}

/* Table */
.kochloft-kurstermine__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.kochloft-kurstermine__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.kochloft-kurstermine__table th,
.kochloft-kurstermine__table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
    font-size: 0.95em;
}
.kochloft-kurstermine__table thead th {
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: #B08861;
    border-bottom: none;
    padding: 18px 14px;
}
.kochloft-kurstermine__table thead th:first-child {
    border-top-left-radius: 4px;
}
.kochloft-kurstermine__table thead th:last-child {
    border-top-right-radius: 4px;
}
.kochloft-kurstermine__table tbody tr {
    transition: background-color .12s ease;
}
.kochloft-kurstermine__table tbody tr:hover {
    background-color: #fafafa;
}

/* Date cell */
.kt-weekday {
    display: block;
    font-size: 0.78em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kt-date {
    display: block;
    font-weight: 600;
    font-size: 1.02em;
    color: #222;
}

.kt-course-link {
    color: #222;
    text-decoration: none;
    font-weight: 500;
}
.kt-course-link:hover {
    color: #5C4022;
    text-decoration: underline;
}

.kt-price {
    white-space: nowrap;
    font-weight: 600;
    color: #222;
}
.kt-price .woocommerce-Price-amount {
    color: inherit;
}

/* Status badge */
.kt-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.kt-status.is-available {
    background: #e6f4ea;
    color: #237a3c;
}
.kt-status.is-soldout {
    background: #f5e6e6;
    color: #a02828;
}

/* Sold-out row dim */
.kochloft-kurstermine__table tbody tr.is-soldout {
    opacity: 0.65;
}

/* Button */
.kt-button {
    display: inline-block;
    background: #5C4022;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color .15s ease;
    white-space: nowrap;
}
.kt-button:hover {
    background: #3F2C17;
    text-decoration: none;
    color: #fff !important;
}
.kt-button--disabled {
    background: #c5c5c5;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
}

.kt-action {
    text-align: right;
}

/* Empty state */
.kochloft-kurstermine--empty,
.kochloft-kurstermine__empty-state {
    padding: 2em 1em;
    text-align: center;
    color: #777;
    background: #fafafa;
    border-radius: 6px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

/* ===== Mobile: turn the table into stacked cards ===== */
@media (max-width: 720px) {
    .kochloft-kurstermine__filter {
        gap: 6px;
    }
    .kochloft-kurstermine .kt-filter-month-wrap {
        flex-basis: 100%;
    }
    .kochloft-kurstermine .kt-filter-month {
        width: 100%;
    }
    .kochloft-kurstermine__table thead {
        display: none;
    }
    .kochloft-kurstermine__table,
    .kochloft-kurstermine__table tbody,
    .kochloft-kurstermine__table tr,
    .kochloft-kurstermine__table td {
        display: block;
        width: 100%;
    }
    .kochloft-kurstermine__table tr {
        border: 1px solid #eaeaea;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 10px 14px;
    }
    .kochloft-kurstermine__table td {
        padding: 6px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .kochloft-kurstermine__table td::before {
        content: attr(data-label);
        font-size: 0.75em;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #888;
        font-weight: 600;
        flex-shrink: 0;
    }
    .kochloft-kurstermine__table td[data-label=""]::before {
        content: none;
    }
    .kt-action {
        text-align: left;
        margin-top: 6px;
    }
    .kt-button {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}
