/* =====================================================================
   Grok Bot offer pop-up (index.html only) – used with offer.js
   Small card at the bottom of the screen on phones,
   a centred box on bigger screens. Colours come from style.css.
   ===================================================================== */
.offer {
  /* phones: card along the bottom edge */
  box-sizing: border-box;
  width: calc(100% - 1.2rem); max-width: 30rem;
  max-height: calc(100% - 1.2rem); overflow-y: auto; overscroll-behavior: contain; /* scrolls inside itself on small screens */
  margin: auto auto 0.6rem; padding: 0;
  background: var(--bg); color: var(--text);
  border: 3px solid var(--brand); border-radius: var(--radius);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
  font-size: 1rem; line-height: 1.6;
}
.offer[open] { animation: offer-in 0.25s ease-out; }
.offer::backdrop { background: rgba(20, 30, 40, 0.35); }
@media (min-width: 700px) {
  .offer { margin: auto; max-height: calc(100% - 3rem); }   /* centred on bigger screens */
  .offer::backdrop { background: rgba(20, 30, 40, 0.5); }
}
@keyframes offer-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }

.offer-inner { position: relative; padding: 1.1rem 1.1rem 1rem; }
.offer h2 { margin: 0 2.8rem 0.6rem 0; font-size: 1.3rem; }
.offer p { margin: 0 0 0.8rem; }
.offer .offer-price { font-weight: 700; color: var(--brand-dark);
  background: var(--accent); border-left: 6px solid var(--accent-border);
  padding: 0.4rem 0.7rem; border-radius: 0 8px 8px 0; }
.offer-buttons { display: grid; gap: 0.6rem; margin: 0.9rem 0 0.5rem; }
.offer-buttons .btn { width: 100%; }
.offer .offer-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }
.offer-nothanks {
  display: block; width: 100%; min-height: 2.8rem; margin: 0;
  background: none; border: 0; border-radius: var(--radius);
  color: var(--brand); font: inherit; font-size: 1rem; text-decoration: underline;
  text-underline-offset: 0.15em; cursor: pointer;
}
.offer-nothanks:hover { color: var(--brand-dark); background: var(--brand-light); }
.offer-x {
  position: absolute; top: 0.6rem; right: 0.6rem;
  width: 2.75rem; height: 2.75rem; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--brand-dark); border: 2px solid var(--brand); border-radius: 50%;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.offer-x:hover { background: var(--brand-light); }

/* "What's included" fold-outs – keep the card short until opened */
.offer-more {
  margin: 0 0 0.6rem; background: #fff;
  border: 2px solid var(--line); border-radius: var(--radius);
}
.offer-more summary {
  cursor: pointer; min-height: 2.75rem; padding: 0.55rem 0.8rem;
  font-weight: 700; color: var(--brand); line-height: 1.4;
  list-style-position: inside;
}
.offer-more summary:hover { background: var(--brand-light); border-radius: var(--radius); }
.offer-more[open] summary { border-bottom: 2px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.offer-more ul { margin: 0.6rem 0 0.4rem; padding: 0 0.8rem 0 2rem; }
.offer-more li { margin-bottom: 0.35rem; }
.offer-more p { margin: 0 0.8rem 0.6rem; }

/* Phones: tighter spacing so the closed card stays short
   (text stays at 16px or more) */
@media (max-width: 699px) {
  .offer-inner { padding: 0.8rem 0.9rem 0.6rem; }
  .offer h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
  .offer p { margin-bottom: 0.55rem; font-size: 0.95rem; line-height: 1.5; }
  .offer .offer-price { padding: 0.3rem 0.6rem; }
  .offer-more { margin-bottom: 0.4rem; }
  .offer-more summary { min-height: 2.75rem; padding: 0.45rem 0.7rem; font-size: 0.95rem; }
  .offer-more li { font-size: 0.95rem; }
  .offer-buttons { gap: 0.45rem; margin: 0.6rem 0 0.4rem; }
  .offer-buttons .btn { min-height: 2.75rem; padding: 0.5rem 1rem; }
  .offer .offer-note { margin-bottom: 0.2rem; }
  .offer-nothanks { min-height: 2.75rem; }
}

/* "Works on Mac and Windows" + remote help */
.offer .offer-works { font-weight: 700; }
.offer-remote { border-top: 2px solid var(--line); padding-top: 0.6rem; margin-top: 0.2rem; }
.offer-remote .btn { width: 100%; }
.offer .offer-remote p { font-size: 0.9rem; color: var(--muted); margin: 0.4rem 0 0.3rem; }
@media (max-width: 699px) {
  .offer .offer-works { margin-top: -0.2rem; }
  .offer-remote { padding-top: 0.45rem; }
  .offer-remote .btn { min-height: 2.75rem; padding: 0.5rem 1rem; }
}

/* Phones: extra-compact so the closed card leaves page visible above it */
@media (max-width: 699px) {
  .offer-inner { padding: 0.7rem 0.8rem 0.4rem; }
  .offer h2 { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .offer p { font-size: 0.9rem; line-height: 1.45; margin-bottom: 0.45rem; }
  .offer .offer-works { margin-top: -0.15rem; }
  .offer-more { margin-bottom: 0.35rem; }
  .offer-more summary { padding: 0.4rem 0.65rem; font-size: 0.9rem; }
  .offer-buttons { margin: 0.5rem 0 0.35rem; gap: 0.4rem; }
  /* remote help: button and its note side by side */
  .offer-remote { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.6rem;
    padding-top: 0.45rem; margin-top: 0; }
  .offer-remote .btn { width: auto; padding: 0.45rem 0.8rem; font-size: 0.9rem; }
  .offer .offer-remote p { margin: 0; line-height: 1.35; }
  .offer-nothanks { min-height: 2.75rem; font-size: 0.95rem; }
}
