/*
 * Kursplan, Filter-Widget und Wizard Styles
 * Ausgelagert aus style.css
 */

/* =============================================================================
   Kursplan Basis-Styles
   ============================================================================= */

.kursplan {
    margin: 0 auto;
    padding: 20px;
}
.kursplan .innerwrap {
    width: 100%;
}


@media all and (min-width: 1920px) {
	.kursplan {
		padding: 20px 0;
	}
	.kursplan .innerwrap {
		width: 80%;
	}
}

.kursplan a.wizard-restart {
    color: var(--color-bg-white);
}
.kursplan a.wizard-restart:hover {
    color: var(--color-primary);
}

.kursplan h2,
.kursplan .title {
    text-align: center;
    padding: 0;
}
.kursplan .time,
.kursplan span.online,
.kursplan span.neu {
    line-height: 2;
    padding: 4px 6px;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    font-weight: bold;
    font-size: 90%;
    white-space: nowrap;
	border-radius: 4px;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
}
.kursplan span.online,
.kursplan span.neu {
    font-size: 80%;
    line-height: 100%;
    background-color: var(--color-text);
    color: var(--color-bg-white);
}
.kursplan .time {
	width: 100%;
}
.kursplan .info {
    text-align: center;
}

.kursplan.color-disabled .time,
.kursplan.color-disabled span.online {
    margin-bottom: 2px;
    padding: 2px 4px;
    background-color: var(--color-border);
    color: var(--color-text);
    font-weight: bold;
    font-size: 90%;
    white-space: nowrap;
    display: inline-block;
}
.kursplan.color-disabled span.online {
    font-size: 80%;
    line-height: 100%;
    background-color: var(--color-text);
    color: var(--color-bg-white);
}

.table.kursplan {
    margin: auto;
}
.table.kursplan ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.table.kursplan ul li {
    margin-bottom: 7px;
    border-bottom: 1px dotted var(--color-text-light);
    font-size: 95%;
	border: none;
	border-left: 4px solid var(--color-border);
	padding: 2px 6px;
}
.table.kursplan,
.table.kursplan .cell {
    border: 1px solid var(--color-text);
    background-color: rgba(255, 255, 255, 0.3);
}
.table.kursplan .cell {
    padding: 5px 10px;
    text-align: left;
    width: 14%;
}
.table.kursplan li {
	border-color: var(--color-border);
}
.table.kursplan .age-label {
    display: inline-block;
    background-color: rgba(194, 4, 4, 0.1);
    color: var(--color-primary);
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
}
.table.kursplan .wellpass-label {
    display: inline-block;
    background-color: rgba(0, 100, 200, 0.12);
    color: #0064c8;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    vertical-align: middle;
}
/*
.table.kursplan li.muaythai {
	border-color: var(--color-primary);
}
.table.kursplan li.boxen {
	border-color: #e54080;
}
.table.kursplan li.kickboxen {
	border-color: #c26904;
}
.table.kursplan li.bjj {
	border-color: #0d3def;
}
.table.kursplan li.nogi, .table.kursplan li.mma {
	border-color: #00b0f1;
}
.table.kursplan li.aerokickboxing {
	border-color: #c2bc04;
}
.table.kursplan li.yoga, .table.kursplan li.kinder {
	border-color: #0ec204;
}
.table.kursplan li.sparring {
	border-color: #c204b8;
}
.table.kursplan li.selbstverteidigung {
	border-color: #8704c2;
}
.table.kursplan li.freitraining {
	border-color: #04c2c2;
}
.table.kursplan li.hema {
	border-color: #983a10;
}
*/


.table.kursplan .cell.td .day {
    display: none;
    padding-bottom: 5px;
    font-weight: bold;
}

.darkbg .table.kursplan,
.darkbg .table.kursplan .cell {
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--color-text);
}
.table.kursplan .cell.th {
    font-weight: bold;
    background-color: var(--color-text);
    color: var(--color-bg-white);
    background-color: var(--color-text);
}

.valid-from {
	font-size: 18px;
	line-height: 26px;
	text-align: center;
	margin-bottom: 20px;
}


.table.kursplan.online li.gym,
.table.kursplan.online .samstag,
.table.kursplan.online .sonntag,
.livestreams .table.kursplan.online li.gym {
    display: none;
}

.table.kursplan.gym li.online {
    display: none;
}

/* =============================================================================
   Kursplan Filter-Widget - Desktop
   ============================================================================= */

/* Kursplan Filter Styles - Jakob Nielsen: Links = natürlicher Lesefluss */
.kursplan-filter-wrapper {
    margin-bottom: 20px;
}

.kursplan-filter {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--color-text);
    border-radius: 6px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.kursplan-filter .filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-start;
}

.kursplan-filter .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kursplan-filter .filter-label {
    font-weight: bold;
    color: var(--color-text);
    font-size: 0.95em;
    white-space: nowrap;
}

.kursplan-filter .filter-separator {
    color: var(--color-text-light);
    font-size: 1.2em;
    padding: 0 5px;
    user-select: none;
}

.kursplan-filter .filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9em;
    color: var(--color-text);
    padding: 2px 0;
    white-space: nowrap;
}

.kursplan-filter .filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
    margin: 0;
}

.kursplan-filter .filter-checkbox:hover {
    color: var(--color-primary);
}

.kursplan-filter .filter-details {
    position: relative;
}

.kursplan-filter .filter-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    color: var(--color-text);
    padding: 2px 0;
    list-style: none;
    user-select: none;
}

.kursplan-filter .filter-details-toggle::-webkit-details-marker {
    display: none;
}

.kursplan-filter .filter-details-toggle::after {
    content: '▾';
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.kursplan-filter .filter-details[open] .filter-details-toggle::after {
    transform: rotate(180deg);
}

.kursplan-filter .filter-details-badge {
    font-size: 0.8em;
    font-weight: normal;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-dark);
    border-radius: 10px;
    padding: 1px 8px;
    color: var(--color-text);
}

.kursplan-filter .filter-details-content {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid var(--color-text);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    min-width: 280px;
}

.kursplan-filter .filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.kursplan-filter .filter-reset {
    background: var(--color-bg-dark);
    color: var(--color-bg-white);
    border: none;
    padding: 6px 10px;
    font-size: 1.1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    line-height: 1;
}

.kursplan-filter .filter-reset:hover {
    background: var(--color-primary);
}

.kursplan-filter .filter-reset .reset-icon {
    font-size: 1.2em;
    display: inline-block;
}

.kursplan-filter .filter-count {
    font-size: 0.95em;
    font-weight: bold;
    color: var(--color-text);
    white-space: nowrap;
}

.kursplan-filter .filter-count .count-number {
    color: var(--color-primary);
    font-size: 1.1em;
}

/* Gefilterte Kurse ausblenden */
.table.kursplan li.filtered-out {
    display: none;
}

/* Leere Tage ausblenden */
.table.kursplan .cell.td.day-hidden,
.table.kursplan .cell.th.day-hidden {
    display: none;
}

/* Smooth Transitions für Kurse */
.table.kursplan li {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.table.kursplan li.filtered-out {
    opacity: 0;
    transform: scale(0.95);
}

/* =============================================================================
   Mobile Filter & Wizard - 768px
   ============================================================================= */

/* Mobile Optimierung */
@media all and (max-width: 768px) {
    .kursplan-filter {
        padding: 12px 15px;
    }
    
    .kursplan-filter .filter-groups {
        gap: 10px;
    }
    
    .kursplan-filter .filter-group {
        width: 100%;
        justify-content: flex-start;
    }
    
    .kursplan-filter .filter-separator {
        display: none;
    }
    
    .kursplan-filter .filter-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid var(--color-border);
    }
    
    .kursplan-filter .filter-checkbox {
        font-size: 0.95em;
    }
    
    .kursplan-filter .filter-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .kursplan-filter .filter-label {
        width: 100%;
        margin-bottom: -4px;
    }
    
    .kursplan-filter .filter-details-content {
        position: static;
        border: none;
        box-shadow: none;
        padding: 8px 0;
        margin-top: 4px;
        min-width: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .kursplan-filter {
        display: none !important;
    }
    
    .mobile-filter-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        z-index: 100;
        background: white;
        border: 2px solid var(--color-text);
        border-radius: 12px;
        padding: 16px 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        cursor: pointer;
        user-select: none;
        font-weight: bold;
        color: var(--color-text);
    }
    
    .trigger-badge {
        background: var(--color-primary);
        color: white;
        padding: 4px 12px;
        border-radius: 12px;
        font-weight: bold;
        font-size: 0.9em;
    }
    
    .mobile-filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 101;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    
    .mobile-filter-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }
    
    .mobile-filter-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        background: white;
        border-radius: 20px 20px 0 0;
        z-index: 102;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
    }
    
    .mobile-filter-sheet.open {
        transform: translateY(0);
    }
    
    .sheet-handle {
        width: 40px;
        height: 4px;
        background: var(--color-border);
        border-radius: 2px;
        margin: 12px auto 8px;
    }
    
    .sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .sheet-header h3 {
        margin: 0;
        font-size: 1.2em;
        color: var(--color-text);
    }
    
    .sheet-close {
        background: none;
        border: none;
        font-size: 28px;
        color: var(--color-text-muted);
        width: 32px;
        height: 32px;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }
    
    .sheet-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-section {
        margin-bottom: 24px;
    }
    
    .section-label {
        display: block;
        font-weight: bold;
        margin-bottom: 12px;
        color: var(--color-text);
        font-size: 1em;
    }
    
    .pill-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pill {
        background: var(--color-bg-light);
        border: 2px solid var(--color-border-dark);
        border-radius: 20px;
        padding: 10px 20px;
        font-size: 0.95em;
        cursor: pointer;
        transition: all 0.2s;
        min-height: 44px;
        font-weight: normal;
        color: var(--color-text);
    }
    
    .pill.active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white;
    }
    
    .filter-accordion {
        margin-bottom: 16px;
        border: 1px solid var(--color-border-light);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .filter-accordion summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        cursor: pointer;
        background: var(--color-bg-light);
        color: var(--color-text);
        min-height: 44px;
        user-select: none;
        list-style: none;
    }
    
    .filter-accordion summary::-webkit-details-marker {
        display: none;
    }
    
    .accordion-badge {
        color: var(--color-text);
        background: var(--color-border-light);
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 0.85em;
    }
    
    .accordion-content {
        padding: 16px;
        color: var(--color-text);
    }
    
    .checkbox-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        cursor: pointer;
        min-height: 44px;
    }
    
    .checkbox-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: var(--color-primary);
        margin: 0;
        cursor: pointer;
    }
    
    .sheet-footer {
        display: flex;
        gap: 12px;
        padding: 16px 20px;
        border-top: 1px solid var(--color-border-light);
        background: white;
    }
    
    .sheet-extra {
        padding: 12px 20px;
        text-align: center;
        background: var(--color-bg-light);
        color: var(--color-text);
    }
    
    .wizard-restart {
        color: var(--color-text-muted);
        font-size: 0.9em;
        text-decoration: none;
        display: inline-block;
    }
    
    .wizard-restart:hover {
        color: var(--color-primary);
    }
    
    .btn-reset {
        flex: 0 0 auto;
        background: white;
        border: 2px solid var(--color-text);
        color: var(--color-text);
        padding: 14px 24px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
    }
    
    .btn-apply {
        flex: 1;
        background: var(--color-primary);
        border: none;
        color: white;
        padding: 14px 24px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
    }
    
    .kurs-wizard-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 200;
        align-items: center;
        justify-content: center;
    }
    
    .wizard-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .wizard-content {
        position: relative;
        background: white;
        border-radius: 12px;
        width: calc(100% - 40px);
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
        padding: 30px 20px;
        z-index: 1;
    }
    
    .wizard-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 32px;
        color: var(--color-text-muted);
        cursor: pointer;
        width: 40px;
        height: 40px;
        line-height: 1;
        padding: 0;
    }
    
    .wizard-step {
        display: none;
    }
    
    .wizard-step.active {
        display: block;
    }
    
    .wizard-step h2 {
        margin: 0 0 8px 0;
        font-size: 1.5em;
        text-align: center;
    }
    
    .wizard-subtitle {
        text-align: center;
        color: var(--color-text-muted);
        margin-bottom: 24px;
        font-size: 0.95em;
    }
    
    .wizard-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .wizard-option {
        background: var(--color-bg-light);
        border: 2px solid var(--color-text);
        border-radius: 12px;
        padding: 20px 12px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        min-height: 120px;
        text-align: center;
        color: var(--color-text);
    }
    
    .wizard-option:active {
        transform: scale(0.98);
    }
    
    .wizard-option:hover {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white;
    }
    
    .option-icon {
        font-size: 2em;
    }
    
    .option-label {
        font-weight: bold;
        font-size: 1.1em;
    }
    
    .option-sublabel {
        font-size: 0.85em;
        opacity: 0.8;
    }
    
    .wizard-progress {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin: 20px 0;
    }
    
    .progress-bar {
        display: block;
        width: 100%;
        height: 4px;
        background: var(--color-bg);
        border-radius: 2px;
        overflow: hidden;
    }
    
    .progress-fill {
        display: block;
        height: 100%;
        background: var(--color-primary);
        transition: width 0.3s;
    }
    
    .progress-text {
        font-size: 0.9em;
        color: var(--color-text-muted);
    }
    
    .wizard-skip {
        display: block;
        text-align: center;
        color: var(--color-text-muted);
        font-size: 0.9em;
        margin-top: 16px;
        text-decoration: none;
    }
    
    .wizard-back {
        background: white;
        border: 2px solid var(--color-text);
        padding: 12px 24px;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        display: block;
        margin: 20px auto 0;
    }
    
    .wizard-sports-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 24px;
    }
    
    .sport-checkbox {
        cursor: pointer;
    }
    
    .sport-checkbox input[type="checkbox"] {
        display: none;
    }
    
    .sport-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 12px 8px;
        background: var(--color-bg-light);
        border: 2px solid var(--color-border-dark);
        border-radius: 8px;
        transition: all 0.2s;
        min-height: 80px;
        justify-content: center;
        color: var(--color-text);
    }
    
    .sport-checkbox input:checked + .sport-card {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white;
    }
    
    .sport-icon {
        font-size: 1.8em;
    }
    
    .sport-name {
        font-size: 0.85em;
        font-weight: bold;
        text-align: center;
    }
    
    .sport-quick-actions {
        display: flex;
        gap: 8px;
        justify-content: center;
        margin-bottom: 16px;
    }
    
    .sport-quick-btn {
        background: white;
        border: 1px solid var(--color-border-dark);
        padding: 6px 16px;
        border-radius: 6px;
        font-size: 0.85em;
        cursor: pointer;
        color: var(--color-text-muted);
    }
    
    .sport-quick-btn:active {
        background: var(--color-bg);
    }
    
    .wizard-nav {
        display: flex;
        gap: 12px;
        justify-content: space-between;
        margin-top: 20px;
    }
    
    .wizard-nav .wizard-back {
        margin: 0;
        flex: 0 0 auto;
    }
    
    .wizard-continue {
        flex: 1;
        background: var(--color-primary);
        border: none;
        color: white;
        padding: 14px 24px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
    }
    
    .wizard-continue:disabled {
        background: var(--color-border);
        cursor: not-allowed;
    }
    
    .wizard-results {
        margin-bottom: 20px;
    }
    
    .result-card {
        background: var(--color-bg-light);
        border: 2px solid var(--color-border);
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
        position: relative;
    }
    
    .result-card.top-match {
        background: #fff8f0;
        border-color: var(--color-primary);
    }
    
    .top-badge {
        position: absolute;
        top: -10px;
        right: 12px;
        background: var(--color-primary);
        color: white;
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 0.75em;
        font-weight: bold;
    }
    
    .result-name {
        font-weight: bold;
        margin-bottom: 4px;
        font-size: 1.05em;
        color: var(--color-text);
    }
    
    .result-time {
        font-size: 0.9em;
        color: var(--color-text-muted);
    }
    
    .wizard-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .wizard-actions button {
        padding: 14px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
    }
    
    .btn-show-all {
        background: var(--color-primary);
        border: none;
        color: white;
    }
    
    .btn-adjust {
        background: white;
        border: 2px solid var(--color-text);
        color: var(--color-text);
    }
}

/* =============================================================================
   Desktop - Mobile Elemente ausblenden
   ============================================================================= */

@media (min-width: 811px) {
    .mobile-filter-trigger,
    .mobile-filter-overlay,
    .mobile-filter-sheet,
    .kurs-wizard-modal {
        display: none !important;
    }
}

/* =============================================================================
   Filter Buttons (Legacy)
   ============================================================================= */

.filter {
    margin: 15px auto 5px;
}
.filter button {
    padding: 5px 10px;
    margin: 0 5px 5px 0;
    border: none;
    font-weight: 600;
    color: var(--color-text);
}
.filter button:hover {
    cursor: pointer;
}
.filter button:active,
.filter button:focus,
.filter button.active {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* =============================================================================
   Responsive Kursplan - Media Queries
   ============================================================================= */

@media all and (max-width: 1200px) {
    .kursplan .innerwrap {
        width: 97%;
    }
}

#sidebar .kursplan {
    display: none;
}

.page-template-infodisplay .kursplan,
.page-template-infodisplay .table.kursplan {
    width: 100%;
}
.page-template-infodisplay .kursplan {
    font-size: 22px;
    line-height: 32px;
}

@media all and (max-width: 992px) {
    .kursplan .time {
        padding: 0 2px;
        margin-bottom: 5px;
        font-size: 85%;
    }
    .table.kursplan .cell {
        font-size: 90%;
        line-height: 130%;
    }
}

@media all and (max-width: 768px) {
    .table.kursplan .row,
    .table.kursplan .cell {
        display: block;
    }
    .table.kursplan .row.thead {
        display: none;
    }
    .table.kursplan,
    .table.kursplan .cell {
        width: 100%;
        display: block;
    }
    section.kursplan, .table.kursplan {
        padding: 5px;
    }
    .table.kursplan .cell.td .day {
        display: block;
        font-size: 120%;
        border-bottom: 2px solid var(--color-text);
        margin-bottom: 5px;
        text-transform: uppercase;
    }
    .kursplan .time {
        display: inline-block;
        margin-bottom: 4px;
        font-size: 14px;
        line-height: 20px;
        padding: 2px 6px;
        width: auto;
    }
    .kursplan.table ul li {
        font-size: 16px; 
        line-height: 20px;
    }

    #sidebar .kursplan {
        display: block;
        margin: 0 auto 15px;
        font-size: 110%;
        line-height: 120%;
    }
    #sidebar .kursplan .time {
        background-color: var(--color-border);
        color: var(--color-text);
        font-size: 110%;
        line-height: 120%;
    }
    #sidebar .kursplan .day {
        color: var(--color-primary);
    }
    .table.kursplan {
        width: 100%;
    }
}
