/*
 * misticSparks — ELEMENTE GLOBALE (toate paginile în afară de checkout)
 * - asistentul „Fragen?”: butonul din dreapta jos și fereastra cu întrebări (scriptul: asistent.js). Mutat din snippet-ul 135;
 * - butonul de wishlist de pe pagina de produs, cât timp se salvează (scriptul: wunschliste.js). Mutat din snippet-ul 138.
 * Reguli:
 *  - o singură regulă pe element; !important doar la proprietățile pe care stilul general al butoanelor (tema, Elementor)
 *    le-ar suprascrie altfel — la fel ca în snippet;
 *  - asistentul are culorile lui (verde închis #0b3a28 și auriu), diferite de ale headerului.
 */

/* ---------- Asistentul: butonul „Fragen?” ---------- */

.msp-assist {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: inherit;
}

/* Butoanele din asistent nu preiau marginile, umbra și înălțimea minimă ale butoanelor din temă. */
.msp-assist button {
  margin: 0;
  min-height: 0 !important;
  box-shadow: none;
  font-family: inherit !important;
}

.msp-assist .msp-assist__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px 0 8px !important;
  border: 1px solid #c9a24a !important;
  border-radius: 999px !important;
  background: #0b3a28 !important;
  color: #f3e3b5 !important;
  box-shadow: 0 10px 28px rgba(11, 58, 40, 0.28) !important;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.msp-assist__btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8c56b, #b8892f);
}

.msp-assist__btn-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #0b3a28;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msp-assist.is-open .msp-assist__btn {
  display: none;
}

/* ---------- Asistentul: fereastra ---------- */

.msp-assist__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: none;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100vh - 40px));
  border: 1px solid #e3d6b4;
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 22px 60px rgba(20, 30, 25, 0.28);
  overflow: hidden;
}

.msp-assist.is-open .msp-assist__panel {
  display: flex;
}

.msp-assist__head {
  position: relative;
  padding: 18px 52px 16px 20px;
  background: #0b3a28;
  color: #fff;
}

.msp-assist__head strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}

.msp-assist__head span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #e4d3a2;
}

.msp-assist .msp-assist__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 20px !important;
  line-height: 34px !important;
}

.msp-assist__body {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 16px 6px;
}

/* Mesajele: ale asistentului (stânga, crem) și ale vizitatorului (dreapta, verde). */
.msp-assist__msg {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #f4ede0;
  color: #2c2a24;
  font-size: 14px;
  line-height: 1.5;
}

.msp-assist__msg--me {
  margin-left: 40px;
  border-radius: 14px 14px 4px 14px;
  background: #0b3a28;
  color: #fff;
}

.msp-assist__msg a {
  color: #8a6f3c;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Întrebările gata scrise. */
.msp-assist__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 12px;
}

.msp-assist .msp-assist__chip {
  max-width: 100% !important;
  padding: 8px 12px !important;
  border: 1px solid #d9c592 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0b3a28 !important;
  cursor: pointer;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: normal !important;
}

.msp-assist .msp-assist__chip:hover {
  background: #fbf3df !important;
  border-color: #b08d3c !important;
}

/* „Frage stellen” și „E-Mail schreiben”. */
.msp-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.msp-assist__action {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8c56b, #b8892f);
  color: #0b1a12 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
}

.msp-assist__action--ghost {
  background: #fff;
  border: 1px solid #b08d3c;
}

/* Câmpul de întrebare și butonul de trimitere. */
.msp-assist__form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid #eee2c6;
  background: #fff;
}

.msp-assist__form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d9c592;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: #222;
}

.msp-assist .msp-assist__form button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #0b3a28 !important;
  color: #e8c56b !important;
  cursor: pointer;
  font-size: 18px !important;
  line-height: 42px !important;
}

.msp-assist__note {
  padding: 0 16px 12px;
  background: #fff;
  font-size: 11px;
  line-height: 1.4;
  color: #8b8170;
}

/* ---------- Asistentul pe telefon: buton rotund, fereastra pe toată lățimea ---------- */

@media (max-width: 767px) {
  .msp-assist {
    right: 12px;
    bottom: 12px;
  }

  /* Pe pagina de produs butonul stă deasupra barei fixe „In den Warenkorb”. */
  body.single-product .msp-assist {
    bottom: 72px;
  }

  body.single-product .msp-assist.is-open {
    bottom: 12px;
  }

  .msp-assist .msp-assist__btn {
    height: 50px;
    padding: 0 6px !important;
  }

  .msp-assist__btn-text {
    display: none;
  }

  .msp-assist__btn-icon {
    width: 38px;
    height: 38px;
  }

  .msp-assist__panel {
    position: fixed;
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 16px);
  }
}

/* ---------- Wishlist pe pagina de produs: butonul cât timp se salvează ---------- */

.msp-wl .yith-wcwl-add-to-wishlist-button.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

