/* Layout widgets: page loader, spotlight popup */

/* --- Spotlight reopen tab — vertical edge tab on all screen sizes --- */
.lw-spotlight-pill {
  position: fixed;
  top: 42%;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 10594;
  margin: 0;
  padding: 1.15rem 0.7rem;
  border: none;
  /*
   * rotate(180deg) flips corners — set radius OPPOSITE of visual intent:
   * after rotate → flat on screen edge, 8px round facing content.
   */
  border-radius: 8px 0 0 8px;
  background: var(--lw-pill-bg, #8b87fd);
  color: var(--lw-pill-fg, #ffffff);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
  max-height: min(52vh, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%) rotate(180deg);
  /* shadow also flips with rotate → negative X becomes inward (right) */
  box-shadow: -2px 0 14px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.lw-spotlight-pill:hover,
.lw-spotlight-pill:focus-visible {
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.22);
  filter: brightness(1.06);
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.lw-spotlight-pill:active {
  filter: brightness(0.96);
}

.lw-spotlight-pill[hidden] {
  display: none !important;
}

body.lw-spotlight-open .lw-spotlight-pill {
  visibility: hidden;
  pointer-events: none;
}

/* --- Page loader --- */
.lw-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483002 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lw-pl-bg, #ffffff);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lw-page-loader--hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.lw-page-loader__inner {
  padding: 24px;
  max-width: min(420px, 92vw);
  width: 100%;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
}

.lw-page-loader--hide .lw-page-loader__inner {
  transform: translateY(-20px) scale(0.9);
  opacity: 0;
}

.lw-page-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

/* Logo / image with dots directly underneath */
.lw-page-loader__content:has(.lw-page-loader__image) {
  gap: 18px;
}

.lw-page-loader__image {
  display: block;
  margin: 0 auto;
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: lw-image-zoom 1.85s ease-in-out infinite;
  transform-origin: center;
}

@keyframes lw-image-zoom {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

.lw-page-loader__animation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

/* Five small dots — staggered pulse (~3 “lit” at a time) */
.lw-page-loader__animation--dots {
  gap: 5px;
  min-height: 20px;
  width: auto;
  background: none;
  clip-path: none;
  animation: none;
}

.lw-pl-dot {
  display: block;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lw-pl-loader-color, var(--primary-color, #3d0b17));
  animation: lw-pl-dot-wave 1s ease-in-out infinite;
  opacity: 0.35;
  transform: scale(0.65);
}

.lw-pl-dot:nth-child(1) {
  animation-delay: 0ms;
}
.lw-pl-dot:nth-child(2) {
  animation-delay: 80ms;
}
.lw-pl-dot:nth-child(3) {
  animation-delay: 160ms;
}
.lw-pl-dot:nth-child(4) {
  animation-delay: 240ms;
}
.lw-pl-dot:nth-child(5) {
  animation-delay: 320ms;
}

@keyframes lw-pl-dot-wave {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.65);
  }
  35%,
  65% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Spotlight popup — Figma 41:9747.
   Physical LTR shell so Arabic pages do not mirror the card:
   image on the left, 583px copy on the right, 100px end padding. */
body.lw-spotlight-open {
  overflow: hidden;
}

.lw-spotlight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: block;
  background: rgba(0, 0, 0, 0.75);
  animation: lw-fade-in 0.3s ease;
}

.lw-spotlight-backdrop[hidden] {
  display: none !important;
}

.lw-spotlight {
  position: fixed;
  z-index: 99996;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  direction: ltr;
  width: min(calc(100vw - 24px), 400px);
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: block;
  animation: lw-pop-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
  font-family: var(--ath-body-font-family, "Thmanyah Sans", sans-serif);
}

.lw-spotlight[hidden] {
  display: none !important;
}

.lw-spotlight__close {
  position: absolute;
  z-index: 10;
  top: 16px;
  left: 16px;
  right: auto;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lw-spotlight__close:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.lw-spotlight__banner {
  position: relative;
  display: flex;
  flex-direction: column;
  direction: ltr !important;
  width: 100%;
  overflow: hidden;
  border-radius: var(--lw-radius, 24px);
  background: var(--lw-fallback, #8b87fd);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.lw-spotlight__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  padding: 56px 20px 20px;
  gap: 20px;
  order: 1;
  margin: 0;
}

.lw-spotlight__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.lw-spotlight__heading {
  display: flex;
  flex-direction: row;
  direction: ltr !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 0;
}

.lw-spotlight__icon {
  display: block;
  width: 36px;
  height: 35px;
  max-width: none;
  object-fit: contain;
  flex: 0 0 auto;
}

.lw-spotlight__kicker {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--lw-kicker-color, #ffffff);
  direction: rtl;
  text-align: center;
}

.lw-spotlight__title {
  margin: 0;
  padding: 0;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--lw-title-color, #fff);
  direction: rtl;
  text-align: center;
}

.lw-spotlight--title-compact .lw-spotlight__title {
  font-size: 20px;
  line-height: 1.3;
}

.lw-spotlight--title-medium .lw-spotlight__title {
  font-size: 22px;
  line-height: 1.3;
}

.lw-spotlight--title-large .lw-spotlight__title {
  font-size: 24px;
  line-height: 1.25;
}

.lw-spotlight__description {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.53;
  color: var(--lw-desc-color, #fff);
  direction: rtl;
  text-align: center;
  white-space: pre-line;
}

.lw-spotlight__media {
  position: relative;
  z-index: 1;
  order: 2;
  width: 100%;
  flex-shrink: 0;
  min-height: 180px;
  height: 210px;
  overflow: hidden;
  pointer-events: none;
}

.lw-spotlight__bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  opacity: var(--lw-img-opacity, 1);
}

.lw-spotlight__bg--desk {
  display: none;
}

.lw-spotlight__bg--mob {
  display: block;
}

.lw-spotlight__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 55%
  );
}

.lw-offer-countdown {
  width: auto;
  max-width: 100%;
  margin: 0;
  align-self: center;
  direction: ltr !important;
}

.lw-offer-countdown__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  direction: ltr !important;
  width: auto;
}

.lw-offer-countdown__ended {
  margin: 0;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--lw-cd-lbl, #ffffff);
  text-align: center;
  direction: rtl;
}

.lw-offer-countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 78px;
  width: 78px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-sizing: border-box;
}

.lw-offer-countdown__digits {
  display: flex;
  flex-direction: row;
  direction: ltr !important;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 78px;
}

.lw-offer-countdown__box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  background: var(--lw-cd-bg, #ffffff);
  border: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

.lw-offer-countdown__box span {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--lw-cd-digit, var(--lw-accent, #b1afff));
  font-variant-numeric: tabular-nums;
}

.lw-offer-countdown__unit {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--lw-cd-lbl, #ffffff);
  text-align: center;
  direction: rtl;
  letter-spacing: 0;
  text-transform: none;
}

.lw-offer-countdown__sep {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  flex: 0 0 6px;
  width: 6px;
  height: 36px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.lw-offer-countdown__colon {
  display: block;
  width: 6px;
  height: 18px;
  background:
    radial-gradient(circle closest-side, #ffffff 99%, transparent 100%) 0 0 / 6px 6px no-repeat,
    radial-gradient(circle closest-side, #ffffff 99%, transparent 100%) 0 12px / 6px 6px no-repeat;
}

.lw-spotlight__cta-wrap {
  margin: 0;
  width: auto;
  align-self: center;
  display: flex;
  justify-content: center;
}

.lw-spotlight .lw-spotlight__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 148px;
  height: 48px;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 47px;
  background: var(--lw-btn-bg, #ffffff);
  color: var(--lw-btn-fg, var(--lw-accent, #b1afff));
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.53;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lw-spotlight .lw-spotlight__btn:hover,
.lw-spotlight .lw-spotlight__btn:focus-visible {
  opacity: 0.92;
  color: var(--lw-btn-fg, var(--lw-accent, #b1afff));
  text-decoration: none;
  transform: translateY(-1px);
}

@media (min-width: 992px) {
  .lw-spotlight {
    width: min(calc(100vw - 48px), 1333px);
    max-height: calc(100dvh - 32px);
  }

  .lw-spotlight__banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 583px;
    grid-template-rows: minmax(440px, auto);
    align-items: stretch;
    column-gap: 0;
    min-height: 440px;
    padding: 0 100px 0 0;
  }

  .lw-spotlight__banner--no-img {
    grid-template-columns: minmax(0, 1fr);
  }

  .lw-spotlight__content {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    align-self: center;
    justify-self: stretch;
    width: 583px;
    max-width: 100%;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    padding: 0;
    gap: 31px;
  }

  .lw-spotlight__banner--no-img .lw-spotlight__content {
    grid-column: 1;
    justify-self: end;
    width: min(583px, 100%);
  }

  .lw-spotlight__copy {
    align-items: flex-end;
    gap: 16px;
  }

  .lw-spotlight__heading {
    align-self: flex-end;
    justify-content: flex-end;
    gap: 15px;
  }

  .lw-spotlight__icon {
    width: 48px;
    height: 47px;
  }

  .lw-spotlight__kicker {
    text-align: right;
    font-size: 16px;
  }

  .lw-spotlight--title-compact .lw-spotlight__title {
    font-size: 24px;
    line-height: 1.25;
    text-align: right;
  }

  .lw-spotlight--title-medium .lw-spotlight__title {
    font-size: 28px;
    line-height: 1.25;
    text-align: right;
  }

  .lw-spotlight--title-large .lw-spotlight__title {
    font-size: 32px;
    line-height: 1.25;
    text-align: right;
  }

  .lw-spotlight__description {
    font-size: 20px;
    line-height: 1.53;
    text-align: right;
  }

  .lw-spotlight__media {
    grid-column: 1;
    grid-row: 1;
    order: 0;
    align-self: stretch;
    width: auto;
    min-height: 440px;
    height: auto;
    max-height: none;
  }

  .lw-spotlight__bg {
    object-position: center bottom;
  }

  .lw-spotlight__bg--desk {
    display: block;
  }

  .lw-spotlight__bg--mob {
    display: none;
  }

  .lw-offer-countdown {
    width: 412px;
    min-height: 81px;
    align-self: flex-end;
  }

  .lw-offer-countdown__grid {
    justify-content: flex-start;
    gap: 16px;
    width: 412px;
  }

  .lw-offer-countdown__item {
    flex-basis: 112px;
    width: 112px;
    gap: 7px;
  }

  .lw-offer-countdown__digits {
    gap: 8px;
    width: 112px;
  }

  .lw-offer-countdown__box {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
  }

  .lw-offer-countdown__box span {
    font-size: 20px;
  }

  .lw-offer-countdown__unit {
    font-size: 16px;
  }

  .lw-offer-countdown__sep {
    height: 52px;
  }

  .lw-offer-countdown__ended {
    text-align: right;
    font-size: 20px;
  }

  .lw-spotlight__cta-wrap {
    align-self: flex-end;
    justify-content: flex-end;
  }

  .lw-spotlight .lw-spotlight__btn {
    width: 184px;
    min-width: 184px;
    height: 63px;
    min-height: 63px;
    padding: 0 24px;
    border-radius: 47px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.53;
  }

  .lw-spotlight[lang^="en"] .lw-spotlight__content,
  .lw-spotlight[lang^="en"] .lw-spotlight__copy {
    align-items: flex-start;
    text-align: left;
  }

  .lw-spotlight[lang^="en"] .lw-spotlight__title,
  .lw-spotlight[lang^="en"] .lw-spotlight__description,
  .lw-spotlight[lang^="en"] .lw-spotlight__kicker {
    direction: ltr;
    text-align: left;
  }
}

@keyframes lw-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lw-pop-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lw-spotlight,
  .lw-spotlight-backdrop,
  .lw-spotlight__btn,
  .lw-spotlight-pill {
    animation: none !important;
    transition: none !important;
  }
}

