/* ============================================================
   Inactivity Popup 
   ============================================================ */

/* Overlay / backdrop  */
.inactivity-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  z-index: 100001;
  animation: inactivityFadeIn 0.25s ease forwards;
}

/* Modal card */
.inactivity-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 100002;

  width: min(780px, calc(100vw - 32px));

  background: linear-gradient(95deg, var(--color-green) 0%, #3f8455 100%);
  border-radius: 8px;
  padding: 40px 36px;
  overflow: hidden;
  color: #fff;

  display: grid;
  gap: 28px;
  align-items: center;

  animation: inactivitySlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-width: 520px;
}

/* ── Content column (left) ───────────────────────────────────── */
.inactivity-popup__content {
  width: 100%;
  min-width: 0;
}

/* Close (×) button */
.inactivity-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}

/* Title */
.inactivity-popup__title {
  margin: 0 0 10px;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 40px);
  line-height: 1.2;
  color: #fff;
  text-align: start;
}

/* Accent word in title */
.inactivity-popup__title-accent {
  color: var(--color-yellow);
}

/* Body text */
.inactivity-popup__desc {
  margin: 0 0 28px;
  font-family: var(--font-secondary);
  font-size: clamp(13px, 1.3vw, 17px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

/* ── Action buttons ──────────────────────────────────────────── */
.inactivity-popup__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.inactivity-popup__btn {
  max-width: 200px;
}

/* Primary – mirrors .cr-cta__btn exactly */
.inactivity-popup__btn--primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  background: var(--color-blue);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
  height: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.inactivity-popup__btn--primary:hover,
.inactivity-popup__btn--primary:focus-visible {
  background: #2e5caa;
  color: var(--color-white);
  text-decoration: none;
  outline: none;
}

/* Secondary – ghost on green */
.inactivity-popup__btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 14px 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.inactivity-popup__btn--secondary:hover,
.inactivity-popup__btn--secondary:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

/* Prevent body scroll when popup is open */
body.inactivity-popup-open {
  overflow: hidden;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes inactivityFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes inactivitySlideIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Tablet ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .inactivity-popup { gap: 20px; }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .inactivity-popup {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    padding: 36px 20px 28px;
  }

  .inactivity-popup__media { justify-content: center; }
  .inactivity-popup__media img { max-width: 260px; }

  .inactivity-popup__actions {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .inactivity-popup__btn--primary,
  .inactivity-popup__btn--secondary {
    width: 100%;
    min-width: unset;
  }

  .inactivity-popup__close {
    top: 8px;
    right: 8px;
  }

  .inactivity-popup {
    padding: 60px 26px 40px;
  }
}
