/* ================================================
   SHAILSTACK POPUP MODALS — v2.1
   https://cdn.shailstack.com/shailstack-modal.css
   Developer: Shailendra Kumar Patel

   Drop-in popups for any website. Rules are either prefixed
   (.shail-*) or scoped to a modal, so your page's own buttons,
   forms and inputs are never touched. Needs shailstack.js.

   Overlay:   .shail-modal  (or .side-modal for a drawer)
   Variants:  .fullscreen-modal  .Animated-modal  .multistep-modal
              .shail-top  .shail-corner  .shail-lightbox
              .side-modal.shail-left
   Sizes:     .shail-modal-content.shail-sm / .shail-lg / .shail-xl
   Theme:     :root { --shail-accent: #ff1654; --shail-accent-dark: #7f0b2a; }
================================================ */

/* === Overlay === */
.shail-modal,
.side-modal,
.fullscreen-modal,
.Animated-modal,
.multistep-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
}

.shail-modal.active,
.fullscreen-modal.active,
.Animated-modal.active,
.multistep-modal.active { display: flex; align-items: center; justify-content: center; }
.side-modal.active { display: flex; justify-content: flex-end; }

/* added to <body> by shailstack.js while a modal is open */
.ss-modal-open { overflow: hidden; }

/* === Content box === */
.shail-modal-content {
  position: relative;
  width: 99%;
  max-width: 500px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 30px;
  border-radius: 12px;
  background: radial-gradient(circle, #fff 66%, #eeaeca 107%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: shail-fade-in-scale 0.3s ease-in-out;
}
.shail-modal-content.shail-sm { max-width: 360px; }
.shail-modal-content.shail-lg { max-width: 720px; }
.shail-modal-content.shail-xl { max-width: 960px; }
/* typography of their own, so popups look the same on any website */
:where(.shail-modal-content, .shail-modal-content-side) { color: #1f2937; font: 15px/1.6 'Roboto', system-ui, sans-serif; text-align: start; }
/* one class of specificity beats a host page's "h3 { margin: 0 }" reset; only the bottom
   margin is set, so utility classes like .ss-mt-4 on the same element still apply */
:is(.shail-modal-content, .shail-modal-content-side) :where(h2, h3, h4) { margin-block-end: 10px; color: #1a1a2e; font-weight: 700; line-height: 1.3; }
:is(.shail-modal-content, .shail-modal-content-side) :where(h3) { font-size: 22px; }
:is(.shail-modal-content, .shail-modal-content-side) :where(h4) { font-size: 18px; }
:is(.shail-modal-content, .shail-modal-content-side) :where(p, ul) { margin-block-end: 14px; }
:where(.shail-modal-content, .shail-modal-content-side) > :is(h3, h4):first-of-type { padding-inline-end: 36px; } /* clear of the close button */

.shail-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--shail-accent-dark, #7f0b2a);
  font: 28px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.shail-modal-close:hover { background: rgba(127, 11, 42, 0.08); }

/* === Side drawer (right, or left with .shail-left) === */
.shail-modal-content-side {
  position: relative;
  width: 400px;
  max-width: 90%;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 30px;
  border-radius: 12px 0 0 12px;
  background: #fff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  animation: shail-slide-in-right 0.3s ease-in-out;
}
.side-modal.shail-left.active { justify-content: flex-start; }
.shail-left .shail-modal-content-side { border-radius: 0 12px 12px 0; box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2); animation-name: shail-slide-in-left; }

/* === Fullscreen === */
.fullscreen-modal .fullscreen-content {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  max-width: 100%;
  max-height: none;
  border-radius: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* === Animated (the misspelt class is kept for old markup) === */
.Aninmated-modal-content,
.animated-modal-content {
  width: 90%;
  max-width: 600px;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: shail-bounce-in 0.7s ease forwards;
}

/* === Top announcement === */
.shail-top.active { align-items: flex-start; }
.shail-top .shail-modal-content { margin-top: 24px; animation: shail-slide-down 0.4s ease-out; }

/* === Corner popup (cookies, newsletter) — the page stays usable === */
.shail-corner { background: none; pointer-events: none; }
.shail-corner.active { align-items: flex-end; justify-content: flex-end; padding: 20px; }

.shail-corner .shail-modal-content {
  max-width: 360px;
  pointer-events: auto;
  animation: shail-slide-up-in 0.5s ease-out;
}

/* === Lightbox (images, video) === */
.shail-lightbox { background: rgba(0, 0, 0, 0.85); }

.shail-lightbox .shail-modal-content {
  width: auto;
  max-width: min(92vw, 1100px);
  overflow: visible;
  padding: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  animation: shail-zoom-in 0.4s ease-out;
}

.shail-lightbox img,
.shail-lightbox video { max-height: 85vh; margin-inline: auto; border-radius: 8px; }
.shail-lightbox .shail-modal-close { top: -48px; right: 0; color: #fff; }

/* === Bottom sheet === */
.shail-bottom-sheet {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  max-height: 70vh;
  border-radius: 12px 12px 0 0;
  padding: 20px;
  animation: shail-sheet-up 0.3s ease-out;
}

/* === Search (command palette) === */
.shail-search-modal { max-width: 600px; padding: 20px; animation: shail-zoom-in 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.shail-search-box { margin: 10px 0 15px; }

.shail-search-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
}
.shail-search-results { list-style: none; margin: 0; padding: 0; }

.shail-search-results li {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}
.shail-search-results li:hover { background: #f9f9f9; }

.shail-btn-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

/* === Buttons inside modals === */
:where(.shail-modal, .side-modal) .btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 45px;
  margin-top: 1rem;
  border: 2px solid #e90844;
  border-radius: 0;
  background-color: var(--shail-accent, #ff1654);
  color: #fff;
  font: 500 16px/20px 'Roboto', sans-serif;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
}
.shail-modal .btn { background: var(--shail-accent-dark, #7f0b2a); }

:where(.shail-modal, .side-modal) .btn:is(.modal-next, .modal-prev, .modal-cta) {
  min-width: 120px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: var(--shail-accent-dark, #7f0b2a);
  transition: 0.3s;
}
:where(.shail-modal, .side-modal) .btn:hover { background: #a0103b; }

/* secondary action: "Previous", and the second button of a pair (Cancel, Close…) */
:where(.shail-modal, .side-modal) :is(.btn.modal-prev, .shail-btn-group .btn + .btn) {
  border: 2px solid var(--shail-accent-dark, #7f0b2a);
  background: transparent;
  color: var(--shail-accent-dark, #7f0b2a);
}
:where(.shail-modal, .side-modal) :is(.btn.modal-prev, .shail-btn-group .btn + .btn):hover { background: rgba(127, 11, 42, 0.08); }
.shail-modal-content.login-content .btn { width: 100%; }

/* === Form fields inside modals === */
:where(.shail-modal, .side-modal) form { overflow: hidden; }

:where(.shail-modal, .side-modal) :is(input:not([type]), input[type=email], input[type=tel], input[type=text], input[type=password], input[type=number]):not(.browser-default),
:where(.shail-modal, .side-modal) textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: 2px solid transparent; /* visible as a ring in Windows High Contrast */
  background: #fff;
  color: #292929;
  font: 14px 'Roboto', sans-serif;
  transition: border-color 0.2s ease;
}
:where(.shail-modal, .side-modal) textarea { min-height: 96px; resize: vertical; }
:where(.shail-modal, .side-modal) :is(input, textarea):focus { border-color: var(--shail-accent, #ff1654); box-shadow: 0 0 0 3px rgba(255, 22, 84, 0.15); }
:where(.shail-modal, .side-modal) .d-flex-form { display: flex; gap: 12px; }
:where(.shail-modal, .side-modal) .d-flex-form input { flex: 1; }

/* 2FA code */
:where(.shail-modal, .side-modal) .verification-code-text { margin-top: 8px; text-align: center; font-size: 13px; color: #6b7280; }
:where(.shail-modal, .side-modal) .verification-inputs { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
:where(.shail-modal, .side-modal) .verification-inputs input:not(.browser-default) { width: 40px; height: 48px; margin: 0; padding: 0; border-radius: 6px; font-size: 20px; text-align: center; }
:where(.shail-modal, .side-modal) .qr-img { margin: 16px auto; }
:where(.shail-modal, .side-modal) .qr-img img { max-width: 120px; margin: 0 auto; border-radius: 8px; }

/* search palette input */
input.shail-search-input:not(.browser-default) { padding: 12px 16px; border-color: #e5e7eb; font-size: 15px; }

/* === Multi-step === */
.multistep-modal-content { position: relative; padding: 30px; }
:where(.shail-modal, .side-modal) .step-indicators { display: flex; gap: 11px; margin-bottom: 15px; padding-top: 10px; }

:where(.shail-modal, .side-modal) .step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
:where(.shail-modal, .side-modal) .step.active { background: var(--shail-accent, #ff1654); color: #fff; }
:where(.shail-modal, .side-modal) .modal-steps { min-height: 200px; }
:where(.shail-modal, .side-modal) .step-content { display: none; }
:where(.shail-modal, .side-modal) .step-content.active { display: block; animation: shail-fade-in-scale 0.3s ease-in-out; }
:where(.shail-modal, .side-modal) .step-content p { padding-bottom: 14px; }
:where(.shail-modal, .side-modal) .step-btns { display: flex; justify-content: space-between; margin-top: 20px; }
:where(.shail-modal, .side-modal) .step-content.step-3 .btn { display: inline-flex; margin: 40px 6px 0 0; }

/* === Login / offer / media helpers === */
.shail-modal-content.login-content { max-width: 450px; animation: shail-slide-up-in 0.5s ease-out; }
:where(.shail-modal, .side-modal) .login-width { margin: 12px 0 8px; text-align: center; font-size: 13px; color: #6b7280; }
:where(.shail-modal, .side-modal) .login-social-icon { display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; }
:where(.shail-modal, .side-modal) .login-social-icon span { cursor: pointer; }
:where(.shail-modal, .side-modal) :is(.center, .center-align) { text-align: center; }

:where(.shail-modal, .side-modal) .link-group { display: flex; flex-direction: column; gap: 8px; }
:where(.shail-modal, .side-modal) .modal-link { display: block; padding: 8px 12px; border-radius: 6px; background: #f3f4f6; color: #374151; font-size: 14px; font-weight: 500; transition: background 0.15s; }
:where(.shail-modal, .side-modal) .modal-link:hover { background: #ffe4ec; color: var(--shail-accent-dark, #7f0b2a); text-decoration: none; }

:where(.shail-modal, .side-modal) .inner-modal-deisn { display: flex; align-items: center; justify-content: center; gap: 20px; }
:where(.shail-modal, .side-modal) .modal-item { flex: 1; }
:where(.shail-modal, .side-modal) .modal-img { max-width: 558px; padding: 10px; }
:where(.shail-modal, .side-modal) .modal-img img { width: 100%; border-radius: 8px; }
:where(.shail-modal, .side-modal) .video-contnt-outer { max-width: 425px; padding: 15px; }
:where(.shail-modal, .side-modal) .modal-video video { max-height: 300px; }
:where(.shail-modal, .side-modal) .reward-icon { max-width: 80px; }
:where(.shail-modal, .side-modal) .success-modal h3 { padding-top: 25px; }

/* === Star rating (feedback popup) === */
:where(.shail-modal, .side-modal) .shail-rating { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin: 4px 0 16px; border: 0; padding: 0; }
:where(.shail-modal, .side-modal) .shail-rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
:where(.shail-modal, .side-modal) .shail-rating label { font-size: 34px; line-height: 1; color: #d1d5db; cursor: pointer; transition: color 0.15s, transform 0.15s; }
:where(.shail-modal, .side-modal) .shail-rating label:hover,
:where(.shail-modal, .side-modal) .shail-rating label:hover ~ label,
:where(.shail-modal, .side-modal) .shail-rating input:checked ~ label { color: #f59e0b; }
:where(.shail-modal, .side-modal) .shail-rating label:hover { transform: scale(1.12); }
:where(.shail-modal, .side-modal) .shail-rating input:focus-visible + label { outline: 3px solid var(--shail-accent, #ff1654); outline-offset: 2px; border-radius: 4px; }

/* === Pricing plans === */
:where(.shail-modal, .side-modal) .select-outer { max-width: 600px; }
:where(.shail-modal, .side-modal) .plan-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
:where(.shail-modal, .side-modal) .plan-card { padding: 16px; border: 2px solid #e5e7eb; border-radius: 12px; transition: border-color 0.2s; }
:where(.shail-modal, .side-modal) .plan-card.active { border-color: var(--shail-accent, #ff1654); background: #fff1f5; }
:where(.shail-modal, .side-modal) .plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
:where(.shail-modal, .side-modal) .plan-price { font-size: 22px; font-weight: 800; color: #1a1a2e; }
:where(.shail-modal, .side-modal) .plan-price span { font-size: 13px; font-weight: 400; color: #6b7280; }
:where(.shail-modal, .side-modal) .plan-name { margin-bottom: 2px; font-size: 15px; font-weight: 700; color: #1a1a2e; }
:where(.shail-modal, .side-modal) .plan-billing { margin-bottom: 10px; font-size: 12px; color: #6b7280; }
:where(.shail-modal, .side-modal) .plan-list { list-style: none; padding: 0; }
:where(.shail-modal, .side-modal) .plan-list li { padding-bottom: 6px; font-size: 13px; line-height: 1.5; color: #374151; }
:where(.shail-modal, .side-modal) .plan-selected { position: relative; }

:where(.shail-modal, .side-modal) .plan-selected::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  width: 22px;
  height: 22px;
  background: url("https://cdn.shailstack.com/popup-img/check-item.svg") no-repeat;
}
:where(.shail-modal, .side-modal) .plan-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; }
:where(.shail-modal, .side-modal) .plan-checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #6b7280; cursor: pointer; }
:where(.shail-modal, .side-modal) .right-align { justify-content: right; }

/* === Small screens === */
@media (max-width: 600px) {
  .shail-modal-content { width: 95%; padding: 20px 16px; }
  :where(.shail-modal, .side-modal) .inner-modal-deisn { flex-direction: column-reverse; }
  :where(.shail-modal, .side-modal) .plan-wrapper { grid-template-columns: 1fr; }
  :where(.shail-modal, .side-modal) .verification-inputs input:not(.browser-default) { width: 36px; height: 42px; font-size: 18px; }
  :where(.shail-modal, .side-modal) .right-align { justify-content: left; }
}

/* === Keyboard focus === */
.shail-modal-close:focus-visible,
:where(.shail-modal, .side-modal) .btn:focus-visible,
.shail-search-results li:focus-visible { outline: 3px solid var(--shail-accent, #ff1654); outline-offset: 2px; }

/* === Animations === */
@keyframes shail-fade-in-scale {
  from { opacity: 0; transform: scale(0.95); }
}

@keyframes shail-zoom-in {
  0%  { opacity: 0; transform: scale(0.85); }
  70% { opacity: 1; transform: scale(1.05); }
}

@keyframes shail-bounce-in {
  0%  { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.1); }
  70% { transform: scale(0.9); }
}

@keyframes shail-slide-up-in {
  0%  { opacity: 0; transform: translateY(40px) scale(0.95); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.02); }
}

@keyframes shail-slide-down    { from { opacity: 0; transform: translateY(-40px); } }
@keyframes shail-sheet-up      { from { transform: translateY(100%); } }
@keyframes shail-slide-in-right { from { transform: translateX(100%); } }
@keyframes shail-slide-in-left  { from { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
  :where(.shail-modal, .side-modal),
  :where(.shail-modal, .side-modal) * { animation: none !important; transition: none !important; }
}
