/* Course Booking Public Styles */
.kubu-courses {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kubu-no-courses {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

.kubu-course-table {
    width: auto;
    border-collapse: collapse;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.kubu-course-table thead {
    background: #0073aa;
    color: white;
}

.kubu-course-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #0073aa;
    white-space: nowrap;
}

.kubu-course-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    white-space: nowrap;
}

.kubu-course-table .course-title {
    white-space: normal;
    min-width: 200px;
}

.kubu-course-table tbody tr:nth-child(odd) {
    background: #f9f9f9 !important;
}

.kubu-course-table tbody tr:nth-child(even) {
    background: #ffffff !important;
}

.kubu-course-table tbody tr:hover {
    background: #e7f3ff !important;
}

.kubu-course-table tbody tr.course-closed:nth-child(odd) {
    opacity: 0.7;
    background: #f0f0f0 !important;
}

.kubu-course-table tbody tr.course-closed:nth-child(even) {
    opacity: 0.7;
    background: #f8f8f8 !important;
}

.kubu-course-table tbody tr.course-closed:hover {
    background: #e0e0e0 !important;
}

.course-title {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.course-weekday {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.course-time {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.course-date {
    color: #666;
    white-space: nowrap;
}

.course-trainer {
    color: #555;
}

.course-price {
    font-weight: 600;
    color: #0073aa;
    white-space: nowrap;
}

.course-register {
    text-align: center;
}

.register-link {
    display: inline-block;
    background: #0073aa;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.3s ease;
}

.register-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.register-disabled {
    display: inline-block;
    background: #f0f0f1;
    color: #666;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: background 0.3s ease;
}

.register-disabled:hover {
    background: #e0e0e0;
    color: #555;
    text-decoration: none;
}

/* Category headers */
.category-header {
    background: #f8f9fa !important;
}

.category-header td {
    padding: 8px 12px 15px 12px !important;
    border-top: 2px solid #007cba !important;
    border-bottom: none !important;
}

.category-title h3 {
    margin: 0;
    font-size: 1.1em;
    color: #007cba;
    font-weight: 600;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: lowercase;
}

.status-voll {
    background: #dc3545;
    color: white;
}

.status-geschlossen {
    background: #6c757d;
    color: white;
}

.status-available {
    background: #28a745;
    color: white;
}

/* Status column styling to appear as part of title column */
.status-header {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    padding: 0 !important;
    border-left: none !important;
}

.course-status {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    padding-left: 5px !important;
    padding-right: 5px !important;
    border-left: none !important;
    text-align: left;
    vertical-align: middle;
}

/* Course title links */
.course-title-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.course-title-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Responsive Design — card layout at mobile widths */
@media (max-width: 768px) {
    .kubu-table-wrapper {
        overflow-x: visible;
        box-shadow: none;
        border-radius: 0;
    }
    .kubu-course-table,
    .kubu-course-table thead,
    .kubu-course-table tbody,
    .kubu-course-table th,
    .kubu-course-table td,
    .kubu-course-table tr {
        display: block;
    }
    .kubu-course-table thead {
        display: none; /* hide column headers — labels come from data-label */
    }
    .kubu-course-table tbody tr {
        margin-bottom: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        padding: 10px 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    .kubu-course-table tbody tr.course-closed {
        opacity: 0.7;
        background: #f8f8f8;
    }
    .category-header {
        margin-top: 16px;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .category-header td {
        padding: 4px 0 4px 0 !important;
        border: none !important;
    }
    .kubu-course-table td {
        padding: 4px 0;
        border: none;
        white-space: normal;
        display: flex;
        align-items: baseline;
        gap: 6px;
    }
    .kubu-course-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        min-width: 80px;
        flex-shrink: 0;
    }
    .kubu-course-table td[data-label=""]::before {
        display: none; /* no label for self-explanatory status badge */
    }
    .kubu-course-table td[data-label=""] {
        padding-bottom: 2px;
    }
    .course-title {
        font-size: 1em;
        min-width: unset;
    }
    .course-status {
        width: auto;
        min-width: unset;
        max-width: unset;
    }
    .register-link,
    .register-disabled {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        margin-top: 4px;
    }
}

.kubu-registration {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.kubu-courses h3,
.kubu-registration h3 {
    margin-top: 0;
    color: #333;
}