/* Brain & Soul Solutions – Kontaktleisten und Suche, nach BBS-Vorlage. */

.side-quick-actions {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 115;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: translateY(-50%);
}

.side-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 168px;
  min-height: 54px;
  padding: 10px 13px 10px 12px;
  color: var(--color-white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 42%),
    linear-gradient(135deg, var(--color-aubergine), var(--color-violet));
  border: 1px solid rgba(255, 255, 255, .82);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  box-shadow:
    0 15px 36px rgba(51, 34, 56, .25),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 780;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition:
    box-shadow .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.side-quick-action--gold {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 42%),
    linear-gradient(135deg, #b68448, #956331);
}

.side-quick-action--search {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .17), transparent 42%),
    linear-gradient(135deg, #80617f, #5d405f);
  border-color: rgba(232, 214, 168, .78);
}

.side-quick-action svg,
.mobile-action-link svg {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-quick-action:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, .96);
  box-shadow:
    0 19px 42px rgba(51, 34, 56, .31),
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 4px 0 0 rgba(232, 214, 168, .72);
}

.side-quick-action--plum:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 42%),
    linear-gradient(135deg, #44304a, #704a79);
}

.side-quick-action--gold:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .25), transparent 42%),
    linear-gradient(135deg, #c39458, #9b6834);
}

.side-quick-action--search:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(135deg, #8e6b8c, #674568);
}

.side-quick-action:focus-visible {
  outline: 3px solid rgba(199, 168, 107, .58);
  outline-offset: 3px;
}

.mobile-action-bar {
  display: none;
}

@media (max-width: 520px) {
  .floating-contact {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .floating-contact-btn {
    width: 52px;
    height: 52px;
    border-width: 2px;
  }

  .floating-contact-btn svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .side-quick-actions {
    display: none;
  }

  .floating-contact {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 130;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--color-text-dark);
    border-top: 1px solid rgba(232, 214, 168, .62);
    box-shadow:
      0 -18px 45px rgba(36, 24, 39, .25),
      inset 0 1px 0 rgba(255, 255, 255, .12);
    isolation: isolate;
  }

  .mobile-action-bar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 17%;
    right: 17%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, #ead8a8, transparent);
    box-shadow: 0 0 16px rgba(232, 214, 168, .5);
  }

  .mobile-action-link {
    display: flex;
    min-width: 0;
    min-height: 64px;
    padding: 6px 4px 5px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    color: var(--color-white);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 44%),
      linear-gradient(135deg, var(--color-aubergine), var(--color-violet));
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .24);
    border-radius: 0;
    font-family: inherit;
    font-size: clamp(.65rem, 3vw, .76rem);
    font-weight: 790;
    letter-spacing: .012em;
    line-height: 1.12;
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    transition:
      color .2s ease,
      background .2s ease,
      box-shadow .2s ease;
  }

  .mobile-action-link:last-child {
    border-right: 0;
  }

  .mobile-action-link > span {
    display: block;
    max-width: 100%;
    text-wrap: balance;
  }

  .mobile-action-link svg {
    width: 21px;
    height: 21px;
    padding: 0;
    color: #ead8a8;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-action-link--plum {
    color: var(--color-white);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 44%),
      linear-gradient(135deg, var(--color-aubergine), var(--color-violet));
  }

  .mobile-action-link--plum svg {
    color: #ead8a8;
  }

  .mobile-action-link--gold {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 44%),
      linear-gradient(135deg, #b68448, #956331);
  }

  .mobile-action-link--gold svg {
    color: var(--color-white);
  }

  .mobile-action-link--search {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 44%),
      linear-gradient(135deg, #80617f, #5d405f);
  }

  .mobile-action-link:hover,
  .mobile-action-link:focus-visible {
    color: var(--color-white);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .22),
      inset 0 0 0 999px rgba(255, 255, 255, .075);
  }

  .mobile-action-link--plum:hover,
  .mobile-action-link--plum:focus-visible {
    color: var(--color-white);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .2), transparent 44%),
      linear-gradient(135deg, #44304a, #704a79);
  }

  .mobile-action-link:focus-visible {
    outline: 2px solid #ead8a8;
    outline-offset: -3px;
  }
}

body.site-search-open {
  overflow: hidden;
}

.search-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(75, 47, 85, .18);
  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(36, 24, 39, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.search-input-shell:focus-within {
  border-color: rgba(199, 168, 107, .88);
  box-shadow:
    0 20px 46px rgba(36, 24, 39, .17),
    0 0 0 4px rgba(199, 168, 107, .18);
}

.search-input-shell input {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 14px 54px;
  color: var(--color-text-dark);
  background: transparent;
  border: 0;
  border-radius: inherit;
  outline: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  appearance: none;
}

.search-input-shell--large input {
  min-height: 68px;
  font-size: 1.06rem;
}

.search-input-shell input::placeholder {
  color: rgba(75, 47, 85, .58);
  font-weight: 560;
  opacity: 1;
}

.search-input-shell input::-webkit-search-cancel-button {
  display: none;
}

.search-input-icon {
  position: absolute;
  left: 19px;
  width: 23px;
  height: 23px;
  color: var(--color-aubergine);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.search-clear-button,
.site-search-close {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--color-aubergine);
  background: rgba(75, 47, 85, .075);
  border: 1px solid rgba(75, 47, 85, .12);
  border-radius: 999px;
  font-family: var(--font-stack);
  line-height: 1;
  cursor: pointer;
  transition:
    color .2s ease,
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.search-clear-button {
  position: absolute;
  right: 14px;
  width: 34px;
  height: 34px;
}

.search-clear-button svg,
.site-search-close svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-clear-button:hover,
.site-search-close:hover {
  color: var(--color-white);
  background: var(--color-aubergine);
  border-color: var(--color-aubergine);
}

.search-clear-button:focus-visible,
.site-search-close:focus-visible {
  outline: 3px solid rgba(199, 168, 107, .5);
  outline-offset: 3px;
}

.search-clear-button[hidden],
.search-results[hidden],
.site-search-overlay[hidden] {
  display: none;
}

.search-status {
  min-height: 1.4em;
  margin: 10px 3px 0;
  color: rgba(255, 255, 255, .72);
  font-size: .87rem;
  line-height: 1.4;
}

.search-results {
  display: grid;
  gap: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, .99);
  border: 1px solid rgba(75, 47, 85, .14);
  border-radius: 20px;
  box-shadow: 0 24px 58px rgba(36, 24, 39, .2);
}

.search-result {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  color: var(--color-text-dark);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.search-result + .search-result::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 14px;
  left: 14px;
  height: 1px;
  background: rgba(75, 47, 85, .15);
  pointer-events: none;
  transition: opacity .18s ease;
}

.search-result:hover::before,
.search-result:focus-visible::before {
  opacity: 0;
}

.search-result:hover,
.search-result:focus-visible {
  color: var(--color-text-dark);
  background:
    linear-gradient(135deg, rgba(242, 235, 242, .78), rgba(248, 243, 236, .9));
  border-color: rgba(199, 168, 107, .34);
  outline: 0;
  transform: translateX(2px);
}

.search-result-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 6px 9px;
  color: var(--color-aubergine);
  background: rgba(75, 47, 85, .075);
  border: 1px solid rgba(75, 47, 85, .1);
  border-radius: 999px;
  font-size: .71rem;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1;
  text-transform: uppercase;
}

.search-result-copy {
  min-width: 0;
}

.search-result-title,
.search-result-description {
  display: block;
}

.search-result-title {
  color: var(--color-text-dark);
  font-weight: 850;
  line-height: 1.3;
}

.search-result-description {
  margin-top: 3px;
  color: var(--color-text-light);
  font-size: .84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.search-result-price {
  color: var(--color-aubergine);
  font-weight: 900;
  white-space: nowrap;
}

/* Preissuche direkt unter dem Hero */

.price-search-section {
  position: relative;
  z-index: 8;
  padding: 96px 0;
  background: var(--color-white);
}

.price-search-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 5vw, 66px);
  align-items: center;
  padding: clamp(31px, 4vw, 46px);
  color: var(--color-white);
  background:
    radial-gradient(circle at 92% 0%, rgba(232, 214, 168, .2), transparent 35%),
    radial-gradient(circle at 2% 100%, rgba(97, 64, 106, .58), transparent 36%),
    linear-gradient(135deg, var(--color-text-dark), var(--color-aubergine));
  border: 1px solid rgba(232, 214, 168, .32);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(36, 24, 39, .2);
}

.price-search-card::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(232, 214, 168, .13);
  border-radius: 23px;
  pointer-events: none;
}

.price-search-copy,
.price-search-control {
  position: relative;
  z-index: 1;
}

.price-search-copy .eyebrow {
  margin-bottom: 11px;
  color: #ead8a8;
}

.price-search-copy h2 {
  margin-bottom: 13px;
  color: var(--color-white);
  font-size: clamp(1.75rem, 2.7vw, 2.65rem);
}

.price-search-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  line-height: 1.6;
}

.price-search-control {
  min-width: 0;
}

.price-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  max-height: min(480px, 58vh);
  overflow-y: auto;
}

.price-card[data-price-item] {
  scroll-margin-top: calc(var(--top-notice-height) + var(--site-header-height) + 24px);
  transition:
    border-color .28s ease,
    box-shadow .28s ease,
    transform .28s ease,
    background .28s ease;
}

.price-card[data-price-item].is-search-target {
  background:
    radial-gradient(circle at 96% 12%, rgba(232, 214, 168, .24), transparent 32%),
    linear-gradient(135deg, #fffdf8, #f7eef8);
  border-color: rgba(199, 168, 107, .82);
  box-shadow:
    0 20px 48px rgba(51, 34, 56, .14),
    0 0 0 5px rgba(199, 168, 107, .15);
  transform: translateY(-2px);
}

.price-card[data-price-item]:focus {
  outline: 0;
}

/* Overlay der seitenweiten Suche */

.site-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: start center;
  padding: clamp(28px, 7vh, 78px) 18px 24px;
  overflow-y: auto;
}

.site-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 16, 27, .76);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity .2s ease;
}

.site-search-dialog {
  position: relative;
  width: min(890px, 100%);
  max-height: calc(100dvh - clamp(52px, 14vh, 130px));
  padding: clamp(30px, 5vw, 54px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 88% 0%, rgba(199, 168, 107, .13), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, .995), #faf6f2);
  border: 1px solid rgba(232, 214, 168, .52);
  border-radius: 32px;
  box-shadow: 0 38px 100px rgba(18, 11, 20, .42);
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.site-search-overlay.is-open .site-search-backdrop,
.site-search-overlay.is-open .site-search-dialog {
  opacity: 1;
}

.site-search-overlay.is-open .site-search-dialog {
  transform: translateY(0) scale(1);
}

.site-search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
}

.site-search-close svg {
  width: 20px;
  height: 20px;
}

.site-search-heading {
  padding-right: 52px;
}

.site-search-heading .eyebrow {
  margin-bottom: 10px;
}

.site-search-heading h2 {
  margin-bottom: 12px;
}

.site-search-heading p:not(.eyebrow) {
  max-width: 670px;
  margin-bottom: 25px;
  color: var(--color-text-light);
}

.site-search-control {
  position: relative;
}

.site-search-control .search-status {
  color: var(--color-text-light);
}

.site-search-results {
  max-height: min(430px, 48vh);
  margin-top: 14px;
  overflow-y: auto;
  box-shadow: 0 18px 42px rgba(36, 24, 39, .12);
}

.floating-contact {
  transition:
    opacity .18s ease,
    transform .18s ease;
}

body.site-search-open .floating-contact {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

body.site-search-open .side-quick-actions,
body.site-search-open .mobile-action-bar {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 980px) {
  .price-search-section {
    padding: 66px 0;
  }
}

@media (max-width: 860px) {
  .price-search-card {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 640px) {
  .price-search-card {
    padding: 28px 21px 24px;
    border-radius: 25px;
  }

  .price-search-card::before {
    inset: 9px;
    border-radius: 19px;
  }

  .search-input-shell input,
  .search-input-shell--large input {
    min-height: 56px;
    padding: 12px 46px;
    font-size: .94rem;
  }

  .search-input-icon {
    left: 16px;
    width: 21px;
    height: 21px;
  }

  .search-clear-button {
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .search-result {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 12px;
  }

  .search-result-type {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 0;
  }

  .search-results .search-result-description {
    display: block;
  }

  .price-search-results {
    position: relative;
    top: auto;
    max-height: 400px;
    margin-top: 12px;
  }

  .site-search-overlay {
    padding: 12px;
  }

  .site-search-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 27px 18px 22px;
    border-radius: 24px;
  }

  .site-search-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .site-search-heading {
    padding-right: 43px;
  }

  .site-search-heading h2 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .site-search-heading p:not(.eyebrow) {
    margin-bottom: 20px;
    font-size: .94rem;
    line-height: 1.55;
  }

  .site-search-results {
    max-height: 44vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-search-backdrop,
  .site-search-dialog,
  .floating-contact,
  .side-quick-action,
  .mobile-action-bar,
  .search-result,
  .price-card[data-price-item] {
    transition: none;
  }

  .price-card[data-price-item].is-search-target,
  .search-result:hover,
  .search-result:focus-visible {
    transform: none;
  }
}


/* Integration in die BSS-Seitenstruktur. */
.site-search-heading .eyebrow,
.price-search-copy .eyebrow {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-search-heading .eyebrow { color: var(--color-aubergine); }
.site-search-dialog { overscroll-behavior: contain; }
.search-result { text-decoration: none; }
.search-result-price { text-align: right; }
.price-card[data-price-item] { scroll-margin-top: calc(var(--top-notice-height, 0px) + var(--site-header-height, 78px) + 24px); }
.site-search-results, .price-search-results { overscroll-behavior: contain; }

@media (max-width: 760px) {
  /* Auf Rechtstextseiten darf die bisherige Sonderregel WhatsApp nicht versetzen. */
  :is(.legal-page, .page-legal) .floating-contact {
    position: fixed;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    padding: 0;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  /* 16px verhindert automatisches Vergrößern des Eingabefelds auf iPhones. */
  .search-input-shell input, .search-input-shell--large input { font-size: 1rem; }
  .search-result { grid-template-columns: minmax(0, 1fr); }
  .search-result-price { justify-self: start; white-space: normal; }
}

@media print {
  .side-quick-actions, .mobile-action-bar, .floating-contact,
  .site-search-overlay, .price-search-section { display: none !important; }
  body { padding-bottom: 0; }
}
