/* egwishlist — the heart, the header counter, the list page.
   The heart is drawn with a CSS mask so the templates only carry an empty
   <button class="eg-wl-heart" data-id-product="…">; .is-on (set by
   egwishlist.js from localStorage) swaps the outline for a filled heart.
   All class names are eg-wl-*: the old novblockwishlist still loads its own
   script on every page and toggles .wishlist / .addToWishlist / .checked. */

:root {
  --eg-wl-red: #e5484d;
  --eg-wl-heart: 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1.1L12 21l7.8-7.5 1-1.1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E");
  --eg-wl-heart-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1.1L12 21l7.8-7.5 1-1.1a5.5 5.5 0 0 0 0-7.8z'/%3E%3C/svg%3E");
}

/* ── The heart button ─────────────────────────────────────────── */
.eg-wl-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(26, 18, 10, .18);
  cursor: pointer;
  transition: transform .15s ease, color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.eg-wl-heart::before {
  content: "";
  display: block;
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: var(--eg-wl-heart) center / contain no-repeat;
  mask: var(--eg-wl-heart) center / contain no-repeat;
}
.eg-wl-heart:hover { color: var(--eg-wl-red); box-shadow: 0 2px 8px rgba(26, 18, 10, .22); }
.eg-wl-heart:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.eg-wl-heart.is-on { color: var(--eg-wl-red); }
.eg-wl-heart.is-on::before {
  -webkit-mask-image: var(--eg-wl-heart-on);
  mask-image: var(--eg-wl-heart-on);
}
.eg-wl-heart.eg-wl-pop { animation: egWlPop .35s ease; }
@keyframes egWlPop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Listing card (catalog, search, brand, "Liknande produkter", the list page):
   bottom-right corner of the picture. The hover strip "Designa nu" spans the
   picture's bottom, so it stops short of the heart. */
.product-miniature .thumbnail-container { position: relative; }
.product-miniature .thumbnail-container .eg-wl-heart {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
}
.product-miniature .thumbnail-container .thumbnail::after { right: 58px; }

/* Home page blocks (egstartpage): the card is one <a>, so the heart sits
   next to it in a wrapper, over the picture's top-right corner. */
.eg-wl-cardwrap { position: relative; display: flex; flex-direction: column; }
.eg-wl-cardwrap > .eg-prod-card { flex: 1; }
.eg-wl-cardwrap > .eg-wl-heart { position: absolute; top: 10px; right: 10px; z-index: 2; }
.eg-wl-cardwrap:hover > .eg-wl-heart { transform: translateY(-4px); }

/* Product page: top-right corner of the main picture, the magnifier
   (product-redesign.css .pgr-zoom-btn) left of it in the same row. */
.pgr-gallery-main .eg-wl-heart { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; }
.pgr-gallery-main .eg-wl-heart::before { width: 22px; height: 22px; }

/* ── Header icon + counter ────────────────────────────────────── */
.header-5 .eg-wl-head { position: relative; color: var(--eg-ink, #1a1a1a); text-decoration: none; }
.header-5 .eg-wl-head:hover { color: var(--eg-accent, #f5a623); }
.header-5 .eg-m-right .eg-wl-head svg { width: 21px; height: 21px; }
.header-5 .eg-wl-count {
  position: absolute;
  top: -7px;
  right: -9px;
  background: var(--eg-wl-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  border-radius: 99px;
  padding: 2px 5px;
  min-width: 17px;
  text-align: center;
}
.header-5 .eg-wl-count[hidden] { display: none; }
/* With the heart there are six icons right of the logo: on phones up to
   400px the theme's 14px gaps pushed the cart 10px past the edge (375px). */
@media (min-width: 360px) and (max-width: 400px) {
  body .header-5 .eg-m-right { gap: 10px; }  /* header-redesign.css loads later: needs the extra weight */
}
/* Six icons do not fit next to the logo on the narrowest phones: there the
   list is reached from the toast after saving and from the account menu. */
@media (max-width: 359px) {
  .header-5 .eg-m-right .eg-wl-head { display: none; }
}

/* ── Toast after saving ───────────────────────────────────────── */
.eg-wl-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px 12px 18px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.eg-wl-toast.open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.eg-wl-toast { flex-wrap: wrap; width: 460px; }
.eg-wl-toast__text { flex: 1 1 220px; }
.eg-wl-toast__text b { color: #fff; }
.eg-wl-toast__btns { display: flex; gap: 8px; flex: none; }
.eg-wl-toast__btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  color: #fff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .7);
}
.eg-wl-toast__btn:hover { color: #fff; border-color: #fff; text-decoration: none; }
.eg-wl-toast__btn--mail { color: #1a1a1a; background: #ffbc38; border-color: #ffbc38; }
.eg-wl-toast__btn--mail:hover { color: #1a1a1a; background: #ffc85c; }
@media (max-width: 520px) {
  .eg-wl-toast { left: 12px; right: 12px; width: auto; max-width: none; transform: translate(0, 12px); }
  .eg-wl-toast.open { transform: translate(0, 0); }
  .eg-wl-toast__btns { width: 100%; }
  .eg-wl-toast__btn { flex: 1; text-align: center; }
}

/* "Mejla listan" opened from the toast: a sheet over the current page
   (bottom sheet on phones, centred box on wider screens). */
.eg-wl-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100002;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .25s ease;
}
.eg-wl-mask.open { opacity: 1; }
.eg-wl-sheet {
  position: fixed;
  z-index: 100003;
  left: 50%;
  top: 50%;
  width: 460px;
  max-width: calc(100vw - 24px);
  max-height: 88vh;
  overflow: auto;
  box-sizing: border-box;
  padding: 18px 20px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%);
  transition: opacity .2s ease, transform .25s ease;
}
.eg-wl-sheet.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
@media (max-width: 767px) {
  .eg-wl-sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; border-radius: 16px 16px 0 0; transform: translateY(24px); }
  .eg-wl-sheet.open { transform: none; }
}
.eg-wl-sheet__head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.eg-wl-sheet__title { font-size: 1.8rem; font-weight: 700; color: #1a1a1a; }
.eg-wl-sheet__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f0eeea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23363a41' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 14px no-repeat;
  cursor: pointer;
}
.eg-wl-sheet .eg-wl-mail__lead { margin: 0 0 12px; }
.eg-wl-sheet .eg-wl-mail__row { flex-direction: column; }
.eg-wl-sheet .eg-wl-mail__btn { width: 100%; }

/* Already mailed: the form is one click away for another address. */
.eg-wl-mail__again {
  padding: 0;
  border: 0;
  background: none;
  color: #8c4e08;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.eg-wl-mail__formwrap[hidden] { display: none; }

/* ── The list page (/onskelista) ──────────────────────────────── */
.eg-wl-page .eg-wl-sub { margin: 6px 0 0; font-size: 1.4rem; color: #5c5c5c; }
.eg-wl-notice {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #eef7ee;
  border: 1px solid #cfe6cf;
  font-size: 1.4rem;
}
.eg-wl-notice.is-error { background: #fdf0ef; border-color: #f2cfcc; }
.eg-wl-notice[hidden], .eg-wl-mail[hidden], .eg-wl-empty[hidden], .eg-wl-loading[hidden] { display: none; }
.eg-wl-loading { padding: 40px 0; text-align: center; color: #6b6a63; font-size: 1.4rem; }
.eg-wl-empty { padding: 40px 16px; text-align: center; }
.eg-wl-empty__title { font-size: 2rem; font-weight: 700; color: #1a1a1a; margin: 0 0 8px; }
.eg-wl-empty p { font-size: 1.5rem; color: #5c5c5c; margin: 0 0 18px; }
.eg-wl-heart-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  background: var(--eg-wl-red);
  -webkit-mask: var(--eg-wl-heart) center / contain no-repeat;
  mask: var(--eg-wl-heart) center / contain no-repeat;
}
.eg-wl-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 99px;
  background: #ffbc38;
  border: 2px solid #8c4e08;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
}

/* "Skicka listan till min e-post" — same look as the designer's
   "Spara design" form (tshirtecommerce/assets/js/eg-save-email.js). */
.eg-wl-mail {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 0 0 24px;
  padding: 18px 20px;
  background: #f9f2e8;
  border: 1px solid #f0ddb8;
  border-radius: 12px;
  color: #363a41;
}
.eg-wl-mail__text { flex: 1 1 280px; }
.eg-wl-mail__title { font-size: 1.8rem; font-weight: 700; color: #1a1a1a; margin: 0 0 4px; }
.eg-wl-mail__lead { font-size: 1.4rem; line-height: 1.45; margin: 0; }
.eg-wl-mail__formwrap { flex: 1 1 360px; }
.eg-wl-mail__row { display: flex; gap: 8px; }
.eg-wl-mail__email {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  font-size: 16px;
  border: 1px solid #d8cfc0;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
}
.eg-wl-mail__btn {
  flex: none;
  height: 46px;
  padding: 0 18px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  background: #ffbc38;
  border: 2px solid #8c4e08;
  border-radius: 6px;
  cursor: pointer;
}
.eg-wl-mail__btn[disabled] { opacity: .6; cursor: default; }
.eg-wl-mail__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #f0ddb8;
  border-radius: 8px;
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 400;
  cursor: pointer;
}
.eg-wl-mail__consent input { margin: 1px 0 0; width: 20px; height: 20px; flex: none; accent-color: #8c4e08; cursor: pointer; }
.eg-wl-mail__consent b { color: #1a1a1a; }
.eg-wl-mail__note { margin: 8px 0 0; font-size: 1.2rem; line-height: 1.4; color: #6b6a63; }
.eg-wl-mail__note a { color: #8c4e08; text-decoration: underline; }
.eg-wl-mail__status { margin: 8px 0 0; font-size: 1.3rem; font-weight: 600; }
.eg-wl-mail__status.is-error { color: #b3261e; }
.eg-wl-mail__done { font-size: 1.5rem; font-weight: 600; color: #1a1a1a; }
.eg-wl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 767px) {
  .eg-wl-mail { flex-direction: column; gap: 12px; padding: 16px; }
  .eg-wl-mail__formwrap, .eg-wl-mail__text { flex: none; width: 100%; }
  .eg-wl-mail__row { flex-direction: column; }
  .eg-wl-mail__btn { width: 100%; }
}

/* "Ta bort från önskelistan?" over the card's picture on /onskelista. */
.eg-wl-confirm {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, .95);
  text-align: center;
}
.eg-wl-confirm__q { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.eg-wl-confirm button {
  width: 100%;
  max-width: 180px;
  height: 40px;
  border-radius: 99px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}
.eg-wl-confirm__yes { background: var(--eg-wl-red); border: 0; color: #fff; }
.eg-wl-confirm__no { background: #fff; border: 1.5px solid #d8cfc0; color: #1a1a1a; }
.eg-wl-mail__hint { margin: 0 0 8px; font-size: 1.3rem; color: #5c5c5c; }

/* Stacked (panel, and the list page on phones): flex:1 in a column would
   size the field by flex-basis and squash it to the text height — fixed
   height instead. Box model and border set explicitly so theme input
   styles do not leak in. */
.eg-wl-mail__email {
  box-sizing: border-box;
  border: 1px solid #d8cfc0;
  box-shadow: none;
  outline: none;
  line-height: normal;
}
.eg-wl-mail__email:focus { border-color: #8c4e08; box-shadow: 0 0 0 2px rgba(255, 188, 56, .45); }
.eg-wl-sheet .eg-wl-mail__email,
.eg-wl-sheet .eg-wl-mail__btn { flex: none; width: 100%; height: 48px; }
@media (max-width: 767px) {
  .eg-wl-mail__email, .eg-wl-mail__btn { flex: none; width: 100%; height: 48px; }
}
