/* Checkout offers — a centered popup with one book per slide.
   Also loaded in the admin, where .sella-offers--preview shows one slide in place. */
.sella-offers {
  --sella-offers-accent: #746fed;
  --sella-offers-accent-dark: #5f5ae0;
  --sella-offers-ink: #171717;
  --sella-offers-muted: #5f6368;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sella-offers[hidden],
.sella-offers [hidden] {
  display: none !important;
}

.sella-offers.is-open {
  opacity: 1;
}

html.sella-offers-lock {
  overflow: hidden;
}

.sella-offers__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
}

.sella-offers__dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 30px 28px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  color: var(--sella-offers-ink);
  text-align: start;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}

.sella-offers.is-open .sella-offers__dialog {
  transform: none;
}

.sella-offers__dialog:focus {
  outline: none;
}

/* Extra specificity beats the Hello/Elementor button reset throughout. */
.sella-offers .sella-offers__close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8a8a8a;
  background: transparent;
  box-shadow: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sella-offers .sella-offers__close:hover,
.sella-offers .sella-offers__close:focus-visible {
  color: var(--sella-offers-ink);
  background: #f2f2f5;
}

.sella-offers.is-open .sella-offers__slide.is-swapping {
  animation: sella-offers-swap 0.3s ease;
}

@keyframes sella-offers-swap {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sella-offers .sella-offers__headline {
  margin: 0 0 18px;
  padding-inline-end: 36px;
  color: var(--sella-offers-accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.sella-offers__body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* No fixed ratio and no object-fit — the cover shows whole, at its own proportions. */
.sella-offers .sella-offers__cover {
  flex: 0 0 auto;
  width: 120px;
  max-width: none;
  height: auto;
  border-radius: 7px;
  box-shadow: rgb(0 0 0 / 16%) 0 18px 24px -18px, rgb(0 0 0 / 8%) 0 2px 10px 0;
}

.sella-offers__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sella-offers .sella-offers__name {
  margin: 0 0 8px;
  color: var(--sella-offers-ink);
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.sella-offers .sella-offers__text {
  margin: 0 0 14px;
  color: var(--sella-offers-muted);
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-line;
}

.sella-offers .sella-offers__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.sella-offers__price-now {
  color: var(--sella-offers-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.sella-offers .sella-offers__price-was {
  color: #9a9a9a;
  font-size: 17px;
  text-decoration: line-through;
}

/* Display-only countdown between the book and the button. */
.sella-offers .sella-offers__timer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--sella-offers-accent-dark);
  background: rgba(116, 111, 237, 0.1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.sella-offers__timer-clock {
  min-width: 5ch;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.sella-offers .sella-offers__timer:not([hidden]) + .sella-offers__add {
  margin-top: 12px;
}

.sella-offers .sella-offers__add {
  display: block;
  width: 100%;
  margin: 24px 0 0;
  padding: 15px 24px;
  border: 0;
  border-radius: 50px;
  color: #fff;
  background: var(--sella-offers-accent);
  box-shadow: none;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.25s ease, opacity 0.25s ease;
}

.sella-offers .sella-offers__add:hover:not(:disabled),
.sella-offers .sella-offers__add:focus-visible {
  color: #fff;
  background: var(--sella-offers-accent-dark);
}

.sella-offers .sella-offers__add:disabled {
  opacity: 0.8;
  cursor: default;
}

.sella-offers .sella-offers__add.is-added,
.sella-offers .sella-offers__add.is-added:disabled {
  color: #fff;
  background: #2d8a5a;
  opacity: 1;
}

.sella-offers .sella-offers__add.is-error,
.sella-offers .sella-offers__add.is-error:disabled {
  color: #d7263d;
  background: #fdecee;
  opacity: 1;
  font-size: 15px;
}

.sella-offers .sella-offers__dismiss {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 10px;
  border: 0;
  border-radius: 50px;
  color: var(--sella-offers-muted);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.sella-offers .sella-offers__dismiss:hover,
.sella-offers .sella-offers__dismiss:focus-visible {
  color: var(--sella-offers-ink);
  background: transparent;
  text-decoration: underline;
}

.sella-offers__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f3;
}

.sella-offers .sella-offers__arrow {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid #e4e4ea;
  border-radius: 50%;
  color: #555;
  background: #fff;
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.sella-offers .sella-offers__arrow:hover,
.sella-offers .sella-offers__arrow:focus-visible {
  border-color: var(--sella-offers-accent);
  color: #fff;
  background: var(--sella-offers-accent);
}

.sella-offers__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sella-offers .sella-offers__dot {
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #d9d9e3;
  box-shadow: none;
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.sella-offers .sella-offers__dot:hover,
.sella-offers .sella-offers__dot:focus-visible {
  background: #b9b7f4;
}

.sella-offers .sella-offers__dot.is-active {
  width: 22px;
  background: var(--sella-offers-accent);
}

/* Admin preview: one slide in place, no overlay. */
.sella-offers.sella-offers--preview {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
  opacity: 1;
}

.sella-offers--preview .sella-offers__dialog {
  width: 100%;
  max-height: none;
  overflow: visible;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
}

.sella-offers--preview .sella-offers__close,
.sella-offers--preview .sella-offers__add,
.sella-offers--preview .sella-offers__dismiss {
  cursor: default;
}

@media (max-width: 480px) {
  .sella-offers__dialog {
    padding: 26px 18px 16px;
    border-radius: 18px;
  }

  .sella-offers__body {
    gap: 14px;
  }

  .sella-offers .sella-offers__cover {
    width: 92px;
  }

  .sella-offers .sella-offers__name {
    font-size: 19px;
  }

  .sella-offers .sella-offers__text {
    font-size: 15px;
  }

  .sella-offers__price-now {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sella-offers,
  .sella-offers__dialog {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .sella-offers.is-open .sella-offers__slide.is-swapping {
    animation: none;
  }
}
