/* Shared seminar presentation; the native table and booking actions remain. */
@media (max-width: 991px) {
    body.planhof-seminar-detail .seminar-booking-column { display: none; }
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-filters { display: none !important; }
/* Butler lists upcoming dates chronologically. Keep its first entry in the
   compact slot; the full list below still exposes every date. */
body.planhof-seminar-detail #butlerTabelle .websail tr.ws-data-row ~ tr.ws-data-row,
body.planhof-seminar-detail #butlerTabelle .websail .ws-course-accordion > .ws-accordion-pane:not(:first-child),
body.planhof-seminar-detail #butlerTabelle .websail .ws-pagination { display: none; }
body.planhof-seminar-detail .seminar-booking-column > .vc_column-inner { max-height: none; overflow: visible; overscroll-behavior: auto; }
/* On short desktop windows, let the page scroll rather than trap the card
   beneath the sticky navigation. */
@media (min-width: 992px) and (max-height: 800px) {
    body.planhof-seminar-detail .seminar-booking-column > .vc_column-inner { position: static; }
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail {
    --ws-primary-color: var(--dunkelblau);
    --ws-primary-color-contrast: var(--weiss);
    --ws-link-color: var(--dunkelblau);
    --ws-input-border-radius: var(--border-radius-btn);
    --ws-input-border-color: var(--grau);
    --ws-input-bg: var(--weiss);
    font-family: var(--font-family); color: var(--dunkelgrau); font-size: 16px; line-height: 1.45;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-nothing-to-display {
    padding: 24px; border: 1px solid var(--bg-hellblau); border-radius: var(--border-radius); background: var(--weiss); color: var(--dunkelblau);
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-table-courses { overflow: visible; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail table,
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail tbody {
    display: block; width: 100%; min-width: 0; margin: 0; border: 0; background: transparent;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail colgroup { display: none; }
/* Keep column headings available to assistive technology. */
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail thead,
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail tr.ws-head-row {
    display: block !important; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail tr.ws-data-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px;
    margin: 0 0 20px; padding: 24px; border: 1px solid var(--bg-hellblau);
    border-radius: var(--border-radius); background: var(--bg-hellblau); box-shadow: 0 3px 10px rgb(0 0 0 / .04);
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-data-row > td {
    display: block; box-sizing: border-box; width: auto; min-width: 0;
    margin: 0; padding: 0 !important; border: 0 !important; font-size: 16px; vertical-align: top; overflow-wrap: anywhere;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-data-row > td::before {
    display: block; margin-bottom: 4px; color: var(--dunkelblau); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-place-cell { grid-column: 1 / -1; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-place-cell::before { content: 'Veranstaltungsort'; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-place-cell .ws-cell-span { color: var(--dunkelblau); font-size: var(--heading-butler-location-size); font-weight: 400; line-height: 1.25; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-from-cell::before { content: 'Beginn'; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-to-cell::before { content: 'Ende'; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-info-cell::before { content: 'Uhrzeit'; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-price-cell::before { content: 'Preis'; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-price-cell { grid-column: 1 / -1; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-price-cell .ws-cell-span { color: var(--dunkelblau); font-size: var(--heading-butler-price-size); font-weight: 400; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-remaining-cell { grid-column: 1 / -1; color: var(--dunkelblau); font-weight: 400; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-remaining-cell::before { content: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail td.ws-booklink-cell { grid-column: 1 / -1; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link) {
    position: relative; display: inline-block; box-sizing: border-box; max-width: 100%; padding: .9em 50px .9em 20px;
    border: 1px solid var(--orange); border-radius: var(--border-radius-btn); background: var(--orange); color: var(--weiss);
    font-family: var(--font-family); font-size: 16px; font-weight: 400; line-height: 1.2; text-decoration: none; text-transform: uppercase;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link)::after {
    content: ''; position: absolute; top: 50%; right: 10px; width: 28px; height: 28px; transform: translateY(-50%);
    border-radius: 50%; background: url('../images/planhof-akademie-arrow-or.svg') no-repeat center var(--weiss);
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link):hover { background: var(--weiss); color: var(--orange); }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link):hover::after {
    background-color: var(--orange);
    background-image: url('../images/planhof-akademie-arrow-ws.svg');
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link):focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
body.planhof-seminar-detail #butlerTabelle .websail td:has(.ws-appointment-list) { display: block; grid-column: 1 / -1; }
body.planhof-seminar-detail #butlerTabelle .websail .ws-data-row > :is(.ws-from-cell, .ws-to-cell, .ws-info-cell) { display: none; }
body.planhof-seminar-detail #butlerTabelle .websail td.ws-info-cell { grid-column: 1 / -1; }
body.planhof-seminar-detail #butlerTabelle .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link) { width: auto; justify-self: start; }
body.planhof-seminar-detail #butlerTabelle .websail tr.ws-data-row { padding: 22px; background: var(--bg-hellblau); }
/* Keep the price immediately above the booking action in the compact card. */
body.planhof-seminar-detail #butlerTabelle .websail .ws-data-row > td.ws-price-cell { order: 1; }
body.planhof-seminar-detail #butlerTabelle .websail .ws-data-row > td.ws-booklink-cell { order: 2; }
body.planhof-seminar-detail #termine > .wpb_column > .vc_column-inner { padding: 0; }
body.planhof-seminar-detail #termine .websail .ws-data-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, .85fr) minmax(0, 1fr);
    align-items: start; gap: 16px 28px; padding: 32px;
}
body.planhof-seminar-detail #termine .websail .ws-data-row > td.ws-place-cell { grid-column: 1; grid-row: 1 / 3; }
body.planhof-seminar-detail #termine .websail .ws-data-row > :is(.ws-from-cell, .ws-to-cell, .ws-info-cell) { display: none; }
body.planhof-seminar-detail #termine .websail td:has(.ws-appointment-list) { grid-column: 2; grid-row: 1 / 3; }

body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-appointment-list { margin: 0; padding: 0; list-style: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-appointment-list li { margin: 0 0 8px; white-space: normal; }
body.planhof-seminar-detail #termine .websail td.ws-price-cell { grid-column: 3; grid-row: 1 / 3; }
body.planhof-seminar-detail #termine .websail td.ws-remaining-cell { grid-column: 4; grid-row: 1; }
body.planhof-seminar-detail #termine .websail td.ws-booklink-cell { grid-column: 4; grid-row: 2; }
/* Butler omits the location column when there is just one location. */
body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) { grid-template-columns: minmax(0,1.4fr) minmax(0,.85fr) minmax(0,1fr); }
body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td:has(.ws-appointment-list) { grid-column: 1; }
body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td.ws-price-cell { grid-column: 2; }
body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > :is(td.ws-remaining-cell,td.ws-booklink-cell) { grid-column: 3; }
body.planhof-seminar-detail #butlerTabelle .websail .ws-data-row:not(:has(.ws-to-cell)) > td.ws-from-cell { grid-column: 1 / -1; }
body.planhof-seminar-detail #termine .websail .ws-course-filters { margin-bottom: 24px; }
body.planhof-seminar-detail #termine .websail .ws-course-filters > .ws-flex { gap: 20px; flex-wrap: wrap; }
body.planhof-seminar-detail #termine .websail .ws-input { font-family: var(--font-family); color: var(--dunkelblau); font-size: 16px; padding: 12px 40px 12px 18px; min-height: 48px; border: 1px solid var(--grau); border-radius: var(--border-radius-btn); background: var(--weiss); }
body.planhof-seminar-detail .butler-compact-heading h3 { margin: 0 0 20px; font-size: var(--heading-butler-compact-size); font-weight: 300; }
body.planhof-seminar-detail .butler-dates-heading h2 { margin-bottom: 28px; font-weight: 300; }
@media (max-width: 1199px) {
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td:has(.ws-appointment-list) { grid-column: 1; grid-row: 1 / 4; }
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td.ws-price-cell { grid-column: 2; grid-row: 1; }
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td.ws-remaining-cell { grid-column: 2; grid-row: 2; }
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) > td.ws-booklink-cell { grid-column: 2; grid-row: 3; }
    body.planhof-seminar-detail #termine .websail .ws-data-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.planhof-seminar-detail #termine .websail .ws-data-row > td.ws-place-cell { grid-column: 1; grid-row: 1; }
    body.planhof-seminar-detail #termine .websail td:has(.ws-appointment-list) { grid-column: 2; grid-row: 1; }
    body.planhof-seminar-detail #termine .websail td.ws-price-cell { grid-column: 1; grid-row: 2 / 4; }
    body.planhof-seminar-detail #termine .websail td.ws-remaining-cell { grid-column: 2; grid-row: 2; }
    body.planhof-seminar-detail #termine .websail td.ws-booklink-cell { grid-column: 2; grid-row: 3; }
}
@media (max-width: 767px) {
    body.planhof-seminar-detail #termine .websail .ws-data-row:not(:has(.ws-place-cell)) { grid-template-columns: minmax(0,1fr); }
    body.planhof-seminar-detail #termine .websail .ws-data-row { grid-template-columns: minmax(0, 1fr); padding: 24px; }
    body.planhof-seminar-detail #termine .websail .ws-data-row > td { grid-column: 1 !important; grid-row: auto !important; }
    body.planhof-seminar-detail #termine .websail .ws-input-group { width: 100%; }
    body.planhof-seminar-detail #termine .websail :is(.ws-book-now-link, .ws-course-info > a.ws-cell-link) { width: 100%; }
}
/* Butler switches to its own accordion on smaller viewports. Style that native
   representation too, without replacing its loading or expansion behavior. */
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-accordion .ws-accordion-pane {
    margin: 0 0 20px; border: 1px solid var(--bg-hellblau); border-radius: var(--border-radius);
    background: var(--bg-hellblau); overflow: hidden; box-shadow: 0 3px 10px rgb(0 0 0 / .04);
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-accordion .ws-accordion-header {
    padding: 20px; margin: 0; background: var(--bg-hellblau); color: var(--dunkelblau);
    font-family: var(--font-family); font-size: 18px; font-weight: 400; line-height: 1.5;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-accordion-title p { margin: 0; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-accordion-title :is(p:has(.course1),p:has(.course2),.title) { display: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-accordion-title .fromDate { display: block; font-size: var(--heading-butler-date-mobile-size); }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-accordion-open > .ws-accordion-body { padding: 20px; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info { margin: 0; padding: 0; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > div { margin-bottom: 12px; font-size: 16px; overflow-wrap: anywhere; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > div::before { content: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > .ws-place-cell { color: var(--dunkelblau); font-weight: 400; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > .ws-info-cell { display: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > .ws-price-cell { font-size: var(--heading-butler-price-mobile-size); color: var(--dunkelblau); }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info .ws-appointment-list { margin: 8px 0 0; padding: 0; list-style: none; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info .ws-appointment-list li { white-space: normal; margin-bottom: 6px; }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > .ws-remaining-cell { color: var(--dunkelblau); }
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-course-info > a.ws-cell-link { width: 100%; margin-top: 8px; }

/* Shared date-card details; the compact card matches the enquiry panel. */
body.planhof-seminar-detail #butlerTabelle .websail .ws-course-accordion .ws-accordion-pane {
    background: var(--bg-hellblau);
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail .ws-remaining-cell {
    display: none !important;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(td.ws-price-cell > .ws-cell-span, .ws-course-info > .ws-price-cell)::after {
    content: ' zzgl. MwSt.';
    font-size: .875rem;
    font-weight: 300;
    white-space: nowrap;
}
@media (min-width: 1200px) {
    body.planhof-seminar-detail #termine .websail .ws-data-row > td.ws-booklink-cell { grid-row: 1 / 3; }
}

/* Native appointment lists contain one line per seminar day. */
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(td, .ws-course-info > div):has(.ws-appointment-list)::before {
    content: 'Seminartag & Uhrzeit';
    display: block;
    margin-bottom: 4px;
    color: var(--dunkelblau);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
body.planhof-seminar-detail :is(#butlerTabelle, #termine) .websail :is(td, .ws-course-info > div):has(.ws-appointment-list li:nth-child(2))::before {
    content: 'Seminartage & Uhrzeiten';
}

/* Auch die mobile Butler-Kurskarte nutzt hier die normale Buttonbreite. */
body.planhof-seminar-detail #butlerTabelle .websail .ws-course-info > a.ws-cell-link {
    width: auto;
    align-self: flex-start;
}


/* Once Butler has rendered all appointments, keep the list open. */
body.planhof-seminar-detail .websail .ws-appointment-list-toggle.ws-appointment-list-show-less {
    display: none !important;
}
