/**
 * Buy-pack page styles
 * Shared by /buy-pack/<pack>/index.html — previously inlined in each page.
 *   1. Pack-page brand override (green)
 *   2. শর্তাবলি link + offer modal component
 */

/* Pack-page brand override: config.js sets these as inline styles on <html>,
   so !important is required for a stylesheet rule to win. Scoped to buy-pack only. */
:root {
  --color-primary: #00af66 !important;
  --color-primary-hover: #008a50 !important;
}
/* Minimal custom CSS - Only for properties Tailwind can't handle */
/* Placeholder: buy-pack.js sets hero + same gradient when landing_banner API returns */
.login {
  background-color: #f5f9fc;
  background-image: linear-gradient(180deg, #e8f4fa 0%, #ffffff 60%);
  background-size: 100% auto;
  background-position: center top;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* On smaller mobile screens, ensure top of image is visible */
@media (max-width: 480px) {
  .login {
    background-position: top center;
  }
}

/* Ensure form elements remain interactive (override select-none) */
.login-body *,
input,
button,
form {
  -webkit-user-select: auto !important;
  user-select: auto !important;
  touch-action: auto !important;
}

/* ---------- শর্তাবলি link + offer modal ---------- */
.terms-link {
  display: inline;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--color-primary, #EA2158);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

.terms-link:hover {
  opacity: 0.8;
  text-decoration-thickness: 2px;
}

.terms-link:active {
  opacity: 0.65;
}

.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  /* visibility must flip instantly on open (a hidden element cannot take
     focus); on close it is delayed so the fade-out stays visible. */
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.offer-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.offer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.offer-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.offer-modal.is-open .offer-modal__dialog {
  opacity: 1;
  transform: none;
}

.offer-modal__header {
  position: relative;
  padding: 22px 22px 24px;
  background: linear-gradient(135deg, #00af66 0%, #008a50 100%);
  color: #ffffff;
  text-align: left;
  overflow: hidden;
}

.offer-modal__header::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.offer-modal__icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.offer-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.offer-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.offer-modal__title {
  position: relative;
  z-index: 1;
  margin: 18px 0 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.offer-modal__highlight {
  position: relative;
  z-index: 1;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.4;
  color: #A7F3D0;
}

.offer-modal__badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 600;
}

.offer-modal__body {
  padding: 20px 22px 22px;
  overflow-y: auto;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.offer-modal__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.offer-modal__section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #00af66;
}

.offer-modal__text {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #F0FBF6;
  border: 1px solid #CDEFE0;
  color: #374151;
  font-size: 14px;
  line-height: 1.95;
}

@media (max-width: 380px) {
  .offer-modal__highlight {
    font-size: 22px;
  }

  .offer-modal__title {
    font-size: 16px;
  }
}
