/* CleanDetails appointment details template (CMD-847) */
.template-clean-details .cel-clean-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.template-clean-details .cel-clean-main { min-width: 0; }
.template-clean-details .cel-clean-sidebar { min-width: 0; }
.template-clean-details .cel-nowrap { white-space: nowrap; }

/* ① Headline frame (DAT title only) */
.template-clean-details .cel-clean-headline { background-color: var(--cel_primary_color); color: #ffffff; padding: 40px 30px; border-radius: 4px; margin-bottom: 25px; }
.template-clean-details .cel-clean-headline .cel-dat-heading { color: inherit; margin: 0 0 10px; font-size: calc(var(--cel_heading_font_size) * 1.4); line-height: 1.2; }
.template-clean-details .cel-clean-headline .cel-date-sub-title { color: inherit; margin: 0 0 15px; font-size: var(--cel_dtl_sut_title_font_size); font-weight: normal; }
.template-clean-details .cel-clean-headline .cel-event-teaser,
.template-clean-details .cel-clean-headline .cel-event-teaser * { color: inherit; }
.template-clean-details .cel-clean-headline .cel-event-teaser p:last-child { margin-bottom: 0; }

/* Toggle buttons (description headings + appointment tiles), Bootstrap collapse like the celanio frontend.
   The theme styles <button> elements, so everything is reset here. */
.event-detail-wrapper.template-clean-details .cel-clean-toggle,
.event-detail-wrapper.template-clean-details .cel-clean-toggle:hover,
.event-detail-wrapper.template-clean-details .cel-clean-toggle:focus,
.event-detail-wrapper.template-clean-details .cel-clean-toggle:active {
    -webkit-appearance: none; appearance: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: none;
    margin: 0; font: inherit; line-height: 1.3; text-transform: none; letter-spacing: normal; text-align: left; cursor: pointer;
}
/* No frame on click; keyboard users still see where they are (underlined text). */
.event-detail-wrapper.template-clean-details .cel-clean-toggle:focus-visible .cel-clean-toggle-text { text-decoration: underline; text-underline-offset: 3px; }
.template-clean-details .cel-clean-chevron { flex: 0 0 auto; display: inline-block; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-25%) rotate(45deg); transition: transform .35s ease; }
.template-clean-details .cel-clean-toggle[aria-expanded="true"] .cel-clean-chevron { transform: translateY(25%) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) {
    .template-clean-details .cel-clean-chevron { transition: none; }
}

/* Collapse states: the plugin only ships the Bootstrap *grid* CSS, so the rules that
   bootstrap.bundle.js (collapse) relies on are added here. The .collapsing transition is
   what makes the opening/closing smooth (same 0.35s ease as the celanio frontend). */
.template-clean-details .collapse:not(.show) { display: none; }
.template-clean-details .collapsing { height: 0; overflow: hidden; transition: height .35s ease; }
@media (prefers-reduced-motion: reduce) {
    .template-clean-details .collapsing { transition: none; }
}

/* ② Description texts (open by default) */
.template-clean-details .cel-clean-desc { margin-bottom: 15px; }
.event-detail-wrapper.template-clean-details .cel-clean-desc .cel-clean-toggle { display: inline-flex; align-items: center; gap: 12px; padding: 5px 0; color: var(--cel_primary_color); font-size: var(--cel_desc_title_font_size); }
.template-clean-details .cel-clean-desc .desc { padding: 10px 0 5px; word-break: break-word; }
.template-clean-details .cel-clean-trainers { margin: 10px 0 25px; }
.template-clean-details .cel-clean-section-heading { color: var(--cel_primary_color); font-size: var(--cel_desc_title_font_size); font-weight: normal; margin: 0 0 20px; }
.template-clean-details .cel-clean-trainers .cel-trainer-lists + .cel-resource-listing,
.template-clean-details .cel-clean-trainers .cel-resource-listing + .cel-trainer-lists { margin-top: 25px; }
.template-clean-details .trn-description h1 { margin: 0; color: var(--cel_normal_font_color); }
.template-clean-details .cel-date-sec-box.misc { margin-top: 20px; }

/* "Über mich" panel of the resource-listing trainers: on the Trainers page it is an overlay,
   here it stays in the page flow so it pushes the content down instead of covering the footer.
   'left' (set by resource-about.js) still shifts it under the clicked tile, so the arrow stays correct. */
.template-clean-details .cel-resource-listing .cel-resource-about-panel { position: relative; top: auto !important; grid-column: 1 / -1; margin-top: 16px; }

/* ③ Appointment tiles */
.template-clean-details .cel-clean-dat-list { display: flex; flex-direction: column; gap: 15px; }
.template-clean-details .cel-clean-dat { background-color: var(--cel_bg_tiles_list_color, #eef6ee); border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.event-detail-wrapper.template-clean-details .cel-clean-dat .cel-clean-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 15px; color: var(--cel_appointment_font_color); }
.template-clean-details .cel-clean-dat-body { padding: 0 15px 15px; }
.template-clean-details .cel-clean-dat-title { font-weight: 600; margin-bottom: 8px; }
/* Same fixed label column for info rows and prices, so values line up and get enough width. */
.template-clean-details .cel-clean-dat-info,
.template-clean-details .cel-clean-prices .cel-price-entry { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 10px; }
.template-clean-details .cel-clean-dat-info { row-gap: 6px; margin: 0 0 10px; }
.template-clean-details .cel-clean-dat-info dd { margin: 0; word-break: normal; overflow-wrap: anywhere; }
.template-clean-details .cel-clean-dat-info dd .cel-nowrap { overflow-wrap: normal; }
/* Labels not bold (client feedback): also beats theme / shared styles for dt and price titles. */
.event-detail-wrapper.template-clean-details .cel-clean-dat-info dt,
.event-detail-wrapper.template-clean-details .cel-clean-prices-heading,
.event-detail-wrapper.template-clean-details .cel-clean-prices .price-label { font-weight: normal; }
.template-clean-details .cel-clean-dat-info dt { margin: 0; }
.template-clean-details .cel-clean-free-places { display: flex; align-items: flex-start; gap: 8px; }
.template-clean-details .cel-clean-prices-heading { margin-bottom: 4px; }
.template-clean-details .cel-clean-prices .cel-price-entry { margin-bottom: 6px; }
.template-clean-details .cel-clean-prices .cel-price-entry > * { grid-column: 2; }
.template-clean-details .cel-clean-prices .cel-price-entry > .cel-price-entry-head { grid-column: 1; grid-row: 1 / span 3; }
.template-clean-details .cel-clean-prices .price-vat { font-size: 0.85em; white-space: nowrap; }
.template-clean-details .cel-clean-dat .actions-bottom { display: flex; flex-direction: row; justify-content: flex-end; margin-top: 15px; }

/* Free places: one coloured square like the celanio frontend detail page (module 010700) */
.template-clean-details .cel-free-square { flex: 0 0 auto; display: inline-block; width: 14px; height: 14px; border-radius: 2px; margin-top: 0.3em; }
.template-clean-details .cel-free-square.is-green { background-color: #198754; }
.template-clean-details .cel-free-square.is-yellow { background-color: #ffa500; }
.template-clean-details .cel-free-square.is-red { background-color: #dc3545; }

@media screen and (max-width: 991px) {
    .template-clean-details .cel-clean-row { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 575px) {
    .template-clean-details .cel-clean-headline { padding: 25px 15px; }
    .template-clean-details .cel-clean-dat-info,
    .template-clean-details .cel-clean-prices .cel-price-entry { grid-template-columns: 7.5em minmax(0, 1fr); }
    .template-clean-details .cel-clean-dat .actions-bottom .btn { width: 100%; text-align: center; }
}
