/* Hummingbird Editor — Frontend block styles */

:root {
    --hbe-black: var(--c-black, #242424);
    --hbe-white: var(--c-white, #fff);
}

/* Lora loaded via theme SCSS (_fonts.scss @fontsource/lora) */

/* ── Block wrapper ──────────────────────────────────────────────────────────── */
.hbe-block {
  width: 100%;
}

/* ── Images ─────────────────────────────────────────────────────────────────── */
.hbe-picture {
  display: block;
  line-height: 0;
}
.hbe-img {
  max-width: 100%;
  height: auto;
}
.hbe-img-link {
  display: inline-block;
}

/* ── Responsive content switch (CSS-only, no JS) ──────────────────────────── */
.hbe-content--mobile {
  display: none;
}

@media (max-width: 767px) {
  .hbe-content--desktop {
    display: none;
  }
  .hbe-content--mobile {
    display: block;
  }
}

/* ── Text link wrapper ───────────────────────────────────────────────────────── */
.hbe-link {
  display: block;
  text-decoration: none;
  color: inherit;
}


/* ── Top promo bar ───────────────────────────────────────────────────────── */
.hbe-topbar {
  background: var(--bs-primary);
  color: #fff;
  font-size: var(--fs-body-xs);
  line-height: 1.2;
  padding: 6px 10px;
  text-align: center;
  letter-spacing: 0.2px;
}

.hbe-topbar a,
.hbe-topbar a:hover,
.hbe-topbar a:focus {
  color: #fff;
  text-decoration: underline;
}


/* ── Search overlay ──────────────────────────────────────────────────────── */

/* header needs relative positioning for the overlay */
#header {
  position: relative;
  overflow: visible !important;
}

/* Full-width overlay — position:absolute on #header, height auto so
   the suggestions row below the input bar is not clipped */
.ps-search-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--bs-body-bg, #fff);
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  box-sizing: border-box;
}

.ps-search-overlay.is-open {
  display: flex;
}

/* Row 1: form with input + close button, same height as the header */
.ps-search-overlay__form {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  padding: 0 1.5rem;
  min-height: 60px;
  box-sizing: border-box;
}

.ps-search-overlay__input {
  flex: 1;
  border: none;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: var(--fs-body-l);
  padding: 0.4rem 0.25rem;
}

.ps-search-overlay__input:focus {
  outline: none;
}

.btn-search-open,
.btn-search-close {
  line-height: normal;
  padding: 0;
  cursor: pointer !important;
  color: inherit;
}

.btn-search-close .material-icons {
  font-size: 1.5rem;
  vertical-align: middle;
}

/* Dropdown — full viewport width, fixed below the overlay */
.ps-search-overlay .ps-searchbar__dropdown {
  position: fixed;
  top: var(--search-dropdown-top, 80px);
  left: 0;
  width: 100vw;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 10001;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}

/* Dimmer — covers everything below the header */
.search-page-dimmer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.search-page-dimmer.is-visible {
  display: block;
  pointer-events: auto;
}

.search-page-dimmer.is-active {
  opacity: 1;
}

/* ── Search synonym suggestions (Row 2 of overlay) ───────────────────────── */
.ps-search-suggestions {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.5rem 0.75rem;
  border-top: 1px solid var(--bs-border-color, #e9ecef);
  width: 100%;
  box-sizing: border-box;
}

.ps-search-suggestions__label {
  font-size: var(--fs-body-xs);
  color: var(--bs-secondary-color, #6c757d);
  white-space: nowrap;
  margin-right: 0.15rem;
}

.ps-search-suggestions__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border: 1px solid var(--bs-border-color, #ccc);
  border-radius: 50rem;
  background: var(--bs-body-bg, #fff);
  font-size: var(--fs-body-xs);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.ps-search-suggestions__chip:hover,
.ps-search-suggestions__chip:focus {
  background: var(--bs-dark, #212529);
  color: #fff;
  border-color: var(--bs-dark, #212529);
  outline: none;
}


/* ── Rosenthal Care promo (cart, displayShoppingCartFooter) ──────────────── */
/* Figma: plain text block below the cart — no card, no boxed button. */
.hbe-care {
  margin-top: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.hbe-care__body {
  margin-bottom: 0.75rem;
}

.hbe-care__heading {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.hbe-care__text {
  margin: 0;
  max-width: 64ch;
}

.hbe-care__line {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-grey-5, #5a5a5a);
}

.hbe-care__line:last-child {
  margin-bottom: 0;
}

.hbe-care__actions {
  margin-top: 0.5rem;
}

.hbe-care__form {
  margin: 0;
}

/* Login variant ("zaloguj się") reads as an inline text link, not a button. */
.hbe-care__btn.btn-outline-primary {
  display: inline;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-black, #242424);
  text-decoration: underline;
  background: transparent;
  border: 0;
}

.hbe-care__btn.btn-outline-primary:hover {
  color: var(--c-grey-5, #5a5a5a);
  background: transparent;
}

/* ─────────────────────────────────────────────────────────────────────────
   Karta podarunkowa — footer promo block + floating pill button
   ───────────────────────────────────────────────────────────────────────── */

/* Gift icon (CSS mask → follows currentColor) shared by the menu placements. */
.ps-mainmenu__tree-item.type-giftcard .ps-mainmenu__tree-link::before,
.ps-mainmenu .menu__list > .type-giftcard > .menu__link::before {
  content: "";
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  margin-inline-end: 0.45em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7'/%3E%3Cpath d='M12 8S10.5 3.5 8 4.2C6.3 4.7 6 7 8 8h4zM12 8s1.5-4.5 4-3.8C17.7 4.7 18 7 16 8h-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7'/%3E%3Cpath d='M12 8S10.5 3.5 8 4.2C6.3 4.7 6 7 8 8h4zM12 8s1.5-4.5 4-3.8C17.7 4.7 18 7 16 8h-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Desktop menu — a deliberate accent pill instead of a stray link that wraps. */
.ps-mainmenu__tree-item.type-giftcard .ps-mainmenu__tree-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.05rem;
  color: var(--bs-white, #fff);
  background: var(--bs-primary, #242424);
  border-radius: 999px;
  font-size: var(--fs-body-xs, 0.8125rem);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.ps-mainmenu__tree-item.type-giftcard:hover .ps-mainmenu__tree-link,
.ps-mainmenu__tree-item.type-giftcard .ps-mainmenu__tree-link:hover,
.ps-mainmenu__tree-item.type-giftcard .ps-mainmenu__tree-link:focus {
  color: var(--bs-white, #fff);
  opacity: 0.85;
}

/* Mobile drawer — accent the row with the gift icon + brand colour. */
.ps-mainmenu .menu__list > .type-giftcard > .menu__link {
  display: inline-flex;
  align-items: center;
  color: var(--bs-primary, #242424);
  font-weight: 600;
}

/* Footer column: title + one muted line + a text link that matches the
   sibling footer link columns (the footer is dark — no dark-on-dark button). */
.hbe-giftcard-footer__desc {
  margin: 0 0 0.6rem;
  font-size: var(--fs-body-s, 0.875rem);
  color: var(--bs-gray-300, #dee2e6);
  line-height: 1.5;
}

.hbe-giftcard-footer__cta {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-body-s, 0.875rem);
  font-weight: 500;
  color: var(--bs-gray-300, #dee2e6);
  text-decoration: none;
}

.hbe-giftcard-footer__cta::after {
  content: "→";
  margin-inline-start: 0.4em;
  transition: transform 0.15s ease;
}

.hbe-giftcard-footer__cta:hover,
.hbe-giftcard-footer__cta:focus {
  color: var(--bs-white, #fff);
  text-decoration: none;
}

.hbe-giftcard-footer__cta:hover::after {
  transform: translateX(0.2em);
}

/* Floating pill — fixed to a bottom corner, dismissible. */
.hbe-giftcard-float {
  position: fixed;
  bottom: 1.25rem;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--hbe-white, #fff);
  background: var(--bs-primary, #242424);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  animation: hbe-giftcard-float-in 0.35s ease both;
}

.hbe-giftcard-float[hidden] { display: none; }

.hbe-giftcard-float--right { right: 1.25rem; }
.hbe-giftcard-float--left  { left: 1.25rem; }

.hbe-giftcard-float__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.35rem 0.15rem 0.25rem;
  color: var(--hbe-white, #fff);
  text-decoration: none;
}

.hbe-giftcard-float__link:hover,
.hbe-giftcard-float__link:focus { color: var(--hbe-white, #fff); text-decoration: none; }

.hbe-giftcard-float__icon { flex: 0 0 auto; }

.hbe-giftcard-float__label {
  font-size: var(--fs-body-s, 0.875rem);
  font-weight: 600;
  white-space: nowrap;
}

.hbe-giftcard-float__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 0.35rem;
  padding: 0;
  color: var(--hbe-white, #fff);
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hbe-giftcard-float__close:hover { background: rgba(255, 255, 255, 0.32); }

@keyframes hbe-giftcard-float-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .hbe-giftcard-float { bottom: 0.85rem; }
  .hbe-giftcard-float--right { right: 0.85rem; }
  .hbe-giftcard-float--left  { left: 0.85rem; }
  .hbe-giftcard-float__label { font-size: var(--fs-body-xs, 0.8125rem); }
}

@media (prefers-reduced-motion: reduce) {
  .hbe-giftcard-float { animation: none; }
}
