/* ==========================================================================
   LAICASHOP.HU – KOSÁR OLDAL ÜNNEPI AJÁNDÉKVÁLASZTÓ CTA MÓDOSÍTÓ CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS HOUDINI @PROPERTY A 2 MP-ES KÖRBEFUTÓ ARANY KERETHEZ
   -------------------------------------------------------------------------- */
@property --gift-border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* --------------------------------------------------------------------------
   1. ÜNNEPI VÁLTOZÓK (SZINKRONBAN AZ ADVENTI KALENDÁRIUMMAL)
   -------------------------------------------------------------------------- */
tbody.free-gift-chooser {
  --gift-calendar-bg: #d95137;
  --gift-cta-bg: #d95137;
  --gift-cta-fg: #ffffff;
  --gift-green: #438300;
  --gift-gold: #f5c55a;
  --gift-gold-light: #fff3c4;
  --gift-gold-deep: #c48a1e;
  --gift-ink: #1e2a24;
  --gift-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. KOSÁR AJÁNDÉKVÁLASZTÓ SOR HÁTTERE ÉS KERETE
   -------------------------------------------------------------------------- */
tbody.free-gift-chooser tr.free-gift-chooser {
  background: transparent !important;
}

___tbody.free-gift-chooser tr.free-gift-chooser > td {
  padding: 16px 12px !important;
  border: none !important;
  background: transparent !important;
}

tbody.free-gift-chooser .sr-cart-special-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 22px 28px;
  border-radius: 18px;
  border: 2px solid rgba(245, 197, 90, 0.65);
  background-color: #fff8e8;
  /* Kalendárium ünnepi háttérképe + finom meleg áttetsző fátyol az olvashatóságért */
  background-image:
    linear-gradient(
      135deg,
      rgba(255, 253, 248, 0.88) 0%,
      rgba(255, 249, 234, 0.80) 52%,
      rgba(255, 253, 248, 0.88) 100%
    ),
    var(--gift-calendar-bg);
  background-size: cover, 340px auto;
  background-position: center, center;
  background-repeat: no-repeat, repeat;
  box-shadow:
    0 12px 30px rgba(15, 32, 20, 0.12),
    0 3px 10px rgba(196, 138, 30, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: visible;
}

/* Felső ünnepi arany-zöld-vörös díszcsík a sor tetején */
tbody.free-gift-chooser .sr-cart-special-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 5px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(
    90deg,
    var(--gift-green) 0%,
    var(--gift-gold) 28%,
    var(--gift-cta-bg) 52%,
    var(--gift-gold) 76%,
    var(--gift-green) 100%
  );
  background-size: 200% 100%;
  animation: giftGoldShimmer 8s linear infinite;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. FELHÍVÓ SZÖVEG (.sr-cart-special-row-title)
   -------------------------------------------------------------------------- */
tbody.free-gift-chooser .sr-cart-special-row .sr-cart-special-row-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gift-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Finom arany ünnepi csillag a szöveg előtt */
tbody.free-gift-chooser .sr-cart-special-row .sr-cart-special-row-title::before {
  /* content: "✦"; */
  /* content: "\1F381\00a0"; /* ajándék doboz */
  content: "\1F380\00a0"; /* ajándék masni */
  display: inline-flex;
  align-items: center;
  justify-content: left;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  /* font-size: 0.95rem; */
  font-size: 1.5rem;
  color: #4a2d00;
  background: linear-gradient(135deg, var(--gift-gold-light), var(--gift-gold));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(196, 138, 30, 0.28);
}

/* --------------------------------------------------------------------------
   4. CTA GOMB – KINYITOTT NAPI KÁRTYA SZÍNE, 2 MP-ES ARANY KERET,
      ÁRNYÉK, 3 MP-ENKÉNTI RÁZKÓDÁS & AJÁNDÉKDOBOZ SVG IKON
   -------------------------------------------------------------------------- */
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px !important;
  border-radius: 14px !important;
  border: 2px solid transparent !important;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--gift-cta-fg) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
  background-color: var(--gift-cta-bg) !important;
  background-image:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 240, 189, 0.26) 0%,
      transparent 58%
    ),
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--gift-cta-bg) 92%, #ffffff) 0%,
      var(--gift-cta-bg) 48%,
      color-mix(in srgb, var(--gift-cta-bg) 78%, #1e0500) 100%
    ) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--gift-gold) 65%, transparent),
    0 0 20px rgba(245, 197, 90, 0.52),
    0 12px 26px rgba(155, 42, 20, 0.34),
    0 4px 10px rgba(0, 0, 0, 0.16) !important;
  cursor: pointer;
  z-index: 1;
  transition:
    transform 0.3s var(--gift-ease-spring),
    box-shadow 0.3s ease,
    filter 0.25s ease;
  animation: giftPeriodicShake 3s ease-in-out 1s infinite;
}

/* Ajándékdoboz SVG ikon a gomb szövege előtt */
tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present::before,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23fff3c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13'/%3E%3Cpath d='M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7'/%3E%3Cpath d='M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8'/%3E%3Cpath d='M16.5 8a2.5 2.5 0 0 0 0-5C14 3 12 8 12 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
  transition: transform 0.3s var(--gift-ease-spring);
}

/* Folyamatosan körbefutó arany fénykeret (2s animáció) a gomb élén */
tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present::after,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 3px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--gift-border-angle),
    rgba(245, 197, 90, 0.34) 0deg,
    rgba(245, 197, 90, 0.34) 240deg,
    #f5c55a 292deg,
    #fff4c2 332deg,
    #ffffff 348deg,
    #f5c55a 357deg,
    rgba(245, 197, 90, 0.34) 360deg
  );
  -webkit-mask:
    linear-gradient(#ffffff 0 0) content-box,
    linear-gradient(#ffffff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#ffffff 0 0) content-box,
    linear-gradient(#ffffff 0 0);
  mask-composite: exclude;
  animation: giftBorderOrbit 2s linear infinite;
}

/* Hover, focus és active állapotok */
tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present:hover,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present:hover {
  animation: none;
  text-decoration: none !important;
  transform: translateY(0px) scale(1.05);
  /* filter: brightness(1.06); */
  opacity: 1 !important;
  cursor:hand;
  /* box-shadow:
    0 0 0 1.5px var(--gift-gold-light),
    0 0 30px rgba(245, 197, 90, 0.8),
    0 16px 32px rgba(155, 42, 20, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.2) !important; */
}

tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present:hover::before,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present:hover::before {
  transform: scale(1.14) rotate(-8deg);
}

tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present:active,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present:active {
  transform: translateY(0) scale(0.98);
}

tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present:focus-visible,
tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present:focus-visible {
  outline: 3px solid var(--gift-gold);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   5. ANIMÁCIÓK (KEYFRAMES)
   -------------------------------------------------------------------------- */
@keyframes giftGoldShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* 2 másodperces folyamatos körbefutó arany keret */
@keyframes giftBorderOrbit {
  0% {
    --gift-border-angle: 0deg;
  }
  100% {
    --gift-border-angle: 360deg;
  }
}

/* 3 másodpercenkénti rázkódás – megegyezik az adventi kártya ritmusával */
@keyframes giftPeriodicShake {
  0%, 78%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  81% {
    transform: translate3d(-4px, -2px, 0) rotate(-2.4deg);
  }
  85% {
    transform: translate3d(4px, -2px, 0) rotate(2.4deg);
  }
  89% {
    transform: translate3d(-3px, -1px, 0) rotate(-1.7deg);
  }
  93% {
    transform: translate3d(3px, -1px, 0) rotate(1.7deg);
  }
  96% {
    transform: translate3d(-1.5px, 0, 0) rotate(-0.8deg);
  }
}

/* --------------------------------------------------------------------------
   6. RESZPONZÍV FINOMHANGOLÁS (TABLET & MOBIL)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  tbody.free-gift-chooser .sr-cart-special-row {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
    gap: 14px;
  }

  tbody.free-gift-chooser .sr-cart-special-row .sr-cart-special-row-title {
    justify-content: center;
    font-size: 1rem;
  }

  tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper {
    width: 100%;
  }

  tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present,
  tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present {
    width: 100%;
    max-width: 320px;
    padding: 13px 20px !important;
  }
}

/* --------------------------------------------------------------------------
   7. AKADÁLYMENTESSÉG (REDUCED MOTION)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  tbody.free-gift-chooser .sr-cart-special-row::before,
  tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present,
  tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present,
  tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present::after,
  tbody.free-gift-chooser .sr-cart-special-row .fancy-box-button-wrapper .ac-present::after {
    animation: none !important;
  }

  tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present,
  tbody.free-gift-chooser .sr-cart-special-row button.btn.ac-present::before {
    transition: none !important;
  }
}