/* Planity service categories as milk cards that open in place.
   Planity collapses categories on phones only. Its own isCollapsed state and
   title click handler also run on desktop, so the accordion reuses them.
   js/termin.js adds role/aria-expanded, the "01 · 4 Leistungen" line
   (data-liva-meta) and the sales order (style.order) to each category. */

/* Booking list, and the Gutscheine list that shares its parent with the
   "Alle Gutscheine" heading and voucher card (they keep order 0, so stay on top). */
#planitywl [class*="services-module_servicesContainer-"],
#planitywl [class*="service_item-module_bookingCart-"]:has(> [class*="service_set-module_businessServices-"]) {
  display: grid;
  gap: 12px;
}

#planitywl [class*="service_set-module_businessServices-"] {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 26px 28px 26px 32px !important;
  border: 1px solid var(--grey-200);
  border-radius: 20px;
  background: var(--white);
  transition: border-color 0.2s ease;
}

#planitywl [class*="service_set-module_businessServices-"]:hover,
#planitywl [class*="service_set-module_businessServices-"]:not([class*="service_set-module_isCollapsed-"]) {
  border-color: var(--grey-400);
}

/* Title row: meta line on top, the name below it, the button on the right.
   The name gets the whole column, so long names wrap instead of pushing
   the button out of the card. */
#planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_title-"] {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 8px;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  font: 600 20px/1.25 var(--font-text) !important;
  letter-spacing: -0.015em !important;
  overflow-wrap: break-word;
  hyphens: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_title-"]::after {
  content: attr(data-liva-meta);
  grid-column: 1;
  grid-row: 1;
  font: 600 11px/1 var(--font-text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-200);
}

#planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_title-"]:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 8px;
  border-radius: 4px;
}

/* Planity's chevron becomes a round plus/minus button. */
#planitywl [class*="service_set-module_chevron-"] {
  position: relative;
  display: block !important;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-ink);
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--white);
  transform: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#planitywl [class*="service_set-module_chevron-"] svg {
  display: none;
}

#planitywl [class*="service_set-module_chevron-"]::before,
#planitywl [class*="service_set-module_chevron-"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  margin: -0.75px 0 0 -7px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease;
}

#planitywl [class*="service_set-module_businessServices-"][class*="service_set-module_isCollapsed-"] [class*="service_set-module_chevron-"]::after {
  transform: rotate(90deg);
}

#planitywl [class*="service_set-module_businessServices-"]:not([class*="service_set-module_isCollapsed-"]) [class*="service_set-module_chevron-"] {
  background: transparent;
  color: var(--color-ink);
}

/* Description: one line while closed, in full when open. Clicking it opens
   the category too (js/termin.js). */
#planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_description-"] {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  margin: 10px 68px 0 0 !important;
  font: 400 14px/1.5 var(--font-text) !important;
  color: var(--grey-600);
  cursor: pointer;
}

#planitywl [class*="service_set-module_businessServices-"]:not([class*="service_set-module_isCollapsed-"]) > [class*="service_set-module_description-"] {
  -webkit-line-clamp: unset;
}

#planitywl [class*="service_set-module_mobileDescription-"] {
  display: none !important;
}

/* Service list opens inside the same card, under a hairline. */
#planitywl [class*="service_set-module_businessServices-"][class*="service_set-module_isCollapsed-"] > [class*="service_set-module_card-"] {
  display: none !important;
}

#planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_card-"] {
  margin: 24px -28px -26px -32px !important;
  padding: 0 28px 0 32px !important;
  border: 0 !important;
  border-top: 1px solid var(--grey-200) !important;
  border-radius: 0 0 20px 20px !important;
  box-shadow: none !important;
  background: transparent !important;
}

@media (max-width: 767px) {
  #planitywl [class*="services-module_servicesContainer-"],
  #planitywl [class*="service_item-module_bookingCart-"]:has(> [class*="service_set-module_businessServices-"]) {
    gap: 10px;
  }

  #planitywl [class*="service_set-module_businessServices-"] {
    padding: 20px 18px 20px 20px !important;
    border-radius: 18px;
  }

  #planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_title-"] {
    column-gap: 16px;
    row-gap: 7px;
    font-size: 17px !important;
  }

  #planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_title-"]::after {
    font-size: 10px;
  }

  #planitywl [class*="service_set-module_chevron-"] {
    width: 38px;
    height: 38px;
  }

  #planitywl [class*="service_set-module_chevron-"]::before,
  #planitywl [class*="service_set-module_chevron-"]::after {
    width: 12px;
    margin-left: -6px;
  }

  #planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_description-"] {
    margin: 8px 54px 0 0 !important;
    font-size: 13px !important;
  }

  #planitywl [class*="service_set-module_businessServices-"] > [class*="service_set-module_card-"] {
    margin: 18px -18px -20px -20px !important;
    padding: 0 16px !important;
  }
}
