/* ============================================================
   Promo popup - Oktobrova specialna ponuka 2026
   DOCASNE: po skonceni akcie staci odstranit <link> a <script>
   z index.html a en/index.html (pripadne zmazat tieto dva subory).
   ============================================================ */

/* ---------- prekryv ---------- */
#promo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#promo-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* dialog fokusujeme programovo - vlastny prstenec nepotrebuje */
#promo-overlay:focus { outline: none; }

/* ---------- karta ---------- */
.promo-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  border-radius: 20px;
  overflow: hidden;
  background: var(--luxury-light, #E7E4DE) url('/images/generatedBackground8.webp') center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  transform: translateY(24px) scale(.97);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

#promo-overlay.is-open .promo-card { transform: none; }

/* svetly panel nad fotkou - ako na plagate */
.promo-panel {
  background: rgba(245, 243, 238, .93);
  margin: 1rem;
  padding: 1.5rem 1.75rem 1.4rem;
  border-radius: 14px;
  text-align: center;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- zatvaracie tlacidlo ---------- */
/* sedi CELY vnutri svetleho panelu - nie na jeho hrane */
.promo-close {
  position: absolute;
  top: 2.1rem;
  right: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(52, 47, 44, .09);
  color: var(--luxury-text-dark, #645F5C);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.promo-close:hover {
  background: var(--luxury-gold-extra-dark, #3d5038);
  color: #fff;
  transform: rotate(90deg);
}
.promo-close:focus-visible {
  outline: 3px solid var(--luxury-gold-extra-dark, #3d5038);
  outline-offset: 2px;
}

/* ---------- hlavicka ---------- */
.promo-badge {
  display: inline-block;
  padding: .3rem .9rem;
  margin-bottom: .7rem;
  background: var(--luxury-gold-extra-dark, #3d5038);
  color: #fff;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.promo-title {
  margin: 0 0 .2rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.22;
  color: var(--luxury-text-darkest, #342F2C);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.promo-subtitle {
  margin: 0 0 .85rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--luxury-gold-extra-dark, #3d5038);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.promo-intro {
  margin: 0 0 1rem;
  font-size: .88rem;
  font-style: italic;
  line-height: 1.55;
  color: #4a443f;
}

/* ---------- cenove riadky ---------- */
.promo-prices {
  margin: 0 0 1rem;
  padding: .6rem .5rem;
  border-top: 1px solid rgba(61, 80, 56, .18);
  border-bottom: 1px solid rgba(61, 80, 56, .18);
}

.promo-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .7rem;
  padding: .28rem 0;
  flex-wrap: wrap;
}

.promo-duration {
  min-width: 6.5rem;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--luxury-text-darkest, #342F2C);
}

.promo-old {
  font-size: 1rem;
  color: var(--luxury-text-light, #9B938B);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.promo-new {
  min-width: 4.5rem;
  text-align: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--luxury-copper, #984216);
}

/* ---------- pokyn + kod ---------- */
.promo-howto {
  margin: 0 0 .8rem;
  font-size: .85rem;
  line-height: 1.5;
  color: #4a443f;
}
.promo-howto strong { color: var(--luxury-gold-extra-dark, #3d5038); }

.promo-code-box {
  margin: 0 0 .85rem;
  padding: .75rem;
  background: rgba(61, 80, 56, .07);
  border: 2px dashed var(--luxury-gold-dark, #5a7a5a);
  border-radius: 12px;
}

.promo-code-label {
  display: block;
  margin-bottom: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--luxury-text-medium, #7A6E62);
}

.promo-code {
  display: block;
  margin-bottom: .5rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--luxury-gold-extra-dark, #3d5038);
}

.promo-copy {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem 1.15rem;
  border: 2px solid var(--luxury-gold-dark, #5a7a5a);
  border-radius: 50px;
  background: transparent;
  color: var(--luxury-gold-extra-dark, #3d5038);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
}
.promo-copy:hover { background: var(--luxury-gold-dark, #5a7a5a); color: #fff; }
.promo-copy:focus-visible { outline: 3px solid var(--luxury-gold-extra-dark, #3d5038); outline-offset: 2px; }
.promo-copy.is-copied {
  background: var(--luxury-gold-extra-dark, #3d5038);
  border-color: var(--luxury-gold-extra-dark, #3d5038);
  color: #fff;
}

/* ---------- platnost + podmienky ---------- */
.promo-validity {
  margin: 0 0 .7rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--luxury-text-darkest, #342F2C);
}

.promo-terms {
  margin: 0 0 .2rem;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: .75rem;
  line-height: 1.5;
  color: #595350;
}
.promo-terms li { padding-left: 1rem; position: relative; }
.promo-terms li::before {
  content: '•';
  position: absolute;
  left: .2rem;
  color: var(--luxury-gold-dark, #5a7a5a);
}

/* ---------- CTA ---------- */
/* prilepene na spodok panelu - tlacidlo je vzdy po ruke aj ked sa obsah scrolluje */
.promo-cta-wrap {
  position: sticky;
  bottom: -1.4rem;
  margin: 0 -1.75rem -1.4rem;
  padding: .7rem 1.75rem 1.4rem;
  background: linear-gradient(to bottom, rgba(245, 243, 238, 0) 0%, rgba(245, 243, 238, .97) 30%);
}

.promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .85rem 2rem;
  background: var(--luxury-copper, #984216);
  border: 3px solid var(--luxury-copper, #984216);
  border-radius: 50px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s ease;
  box-shadow: 0 6px 18px rgba(152, 66, 22, .35);
}
.promo-cta:hover { background: #7a350f; border-color: #7a350f; color: #fff; transform: translateY(-2px); }
.promo-cta:focus-visible { outline: 3px solid var(--luxury-gold-extra-dark, #3d5038); outline-offset: 3px; }

/* ---------- plavajuca bublina ---------- */
#promo-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--luxury-copper, #984216);
  color: #fff;
  cursor: pointer;
  z-index: 99998;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
  transition: transform .25s ease, box-shadow .25s ease;
  /* dycha len cez box-shadow - transform zostava volny pre :hover */
  animation: promoGlow 2.7s ease-in-out infinite;
}

/* dva rozpinajuce sa prstence = decentny pulz */
#promo-bubble::before,
#promo-bubble::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 3px solid var(--luxury-copper, #984216);
  opacity: 0;
  pointer-events: none;
  animation: promoRing 2.7s ease-out infinite;
}

#promo-bubble::after { animation-delay: 1.35s; }
#promo-bubble.is-visible { display: flex; }
#promo-bubble:hover { transform: scale(1.07); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
#promo-bubble:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.promo-bubble-icon {
  font-size: 1.75rem;
  line-height: 1;
  animation: promoBeat 2.7s ease-in-out infinite;
}

@keyframes promoBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.07); }
}
.promo-bubble-text {
  margin-top: 2px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}

@keyframes promoGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, .38), 0 0 0 0 rgba(152, 66, 22, .45); }
  50%      { box-shadow: 0 9px 28px rgba(0, 0, 0, .44), 0 0 0 9px rgba(152, 66, 22, .18); }
}

@keyframes promoRing {
  0%   { transform: scale(1);    opacity: .62; }
  80%  { transform: scale(1.78); opacity: 0; }
  100% { transform: scale(1.78); opacity: 0; }
}

/* ---------- mobil ---------- */
@media (max-width: 575px) {
  #promo-overlay { padding: .75rem .5rem; align-items: flex-start; }
  .promo-card {
    background-image: url('/images/generatedBackground-mobile-green.webp');
    border-radius: 16px;
  }
  .promo-close { top: 1.7rem; right: 1.6rem; width: 30px; height: 30px; font-size: 1.2rem; }
  .promo-cta-wrap { margin: 0 -1.1rem -1.5rem; padding: .6rem 1.1rem 1.5rem; bottom: -1.5rem; }
  .promo-panel { margin: .7rem; padding: 1.75rem 1.1rem 1.5rem; max-height: calc(100vh - 2.6rem); }
  .promo-badge { margin-bottom: .5rem; padding: .25rem .8rem; }
  .promo-title { font-size: 1.22rem; }
  .promo-subtitle { font-size: 1.15rem; margin-bottom: .6rem; }
  /* kod a platnost stiahnute - priestor pre vacsie texty vyssie */
  .promo-code-box { padding: .6rem; margin-bottom: .7rem; }
  .promo-code { margin-bottom: .4rem; }
  .promo-validity { margin-bottom: .5rem; font-size: .88rem; }
  /* vacsie pismo pre citatelnost, vyska sa drzi uzsim riadkovanim a odsadenim */
  .promo-intro {
    font-size: .95rem;
    line-height: 1.42;
    margin-bottom: .75rem;
  }
  .promo-howto {
    font-size: .92rem;
    line-height: 1.4;
    margin-bottom: .7rem;
  }
  .promo-terms {
    font-size: .82rem;
    line-height: 1.38;
  }
  .promo-terms li { padding-left: .95rem; }

  /* cenovy blok: vyraznejsie cisla, tesnejsie riadky a okraje */
  .promo-prices {
    padding: .4rem .15rem;
    margin-bottom: .75rem;
  }
  .promo-price-row { padding: .18rem 0; gap: .55rem; }
  .promo-duration { min-width: 6rem; font-size: 1.05rem; }
  .promo-old { font-size: 1rem; }
  .promo-new { font-size: 1.5rem; min-width: 4.2rem; }
  .promo-code { font-size: 1.55rem; letter-spacing: 2px; }
  .promo-cta { padding: .9rem 1.2rem; font-size: .85rem; }
  #promo-bubble { width: 80px; height: 80px; right: 16px; bottom: 16px; }
  .promo-bubble-icon { font-size: 1.6rem; }
  .promo-bubble-text { font-size: .6rem; letter-spacing: .6px; }
}

/* ---------- pouzivatelia s obmedzenym pohybom ---------- */
@media (prefers-reduced-motion: reduce) {
  #promo-overlay, .promo-card, .promo-close, .promo-cta, #promo-bubble,
  #promo-bubble::before, #promo-bubble::after, .promo-bubble-icon { transition: none; animation: none; }
  #promo-bubble::before, #promo-bubble::after { display: none; }
}
