/* Release gifts-site (spec 045; LAUNCH-0067): the gift card in the guide and on the page /dwro, the Revmas Club view
   of /dwro and the partner's welcome in the guide. Own rules only, with the site's tokens (the kept stylesheet is a
   purged build). Nothing here touches an element that exists today: every class starts with «gift-», «club-» or «pw-»,
   and the one state class (html.mr-partner) is set only by /dwro's own script. */

/* ---- the guide ---- */
.gift-block {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
}

.gift-block p {
  margin: 0 0 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.55;
}

.gift-block a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gift-block .gift-note {
  margin-bottom: 0;
  font-size: 0.8rem;
}

/* The owner's layout (15/11/2026): the businesses stand in ONE row, each as a banner, in equal parts — however many
   the switch's read gives. On a phone five in a row would leave each mark about 58px wide, too small to read, so
   there the row breaks in threes (the rule at the end of this file). */
.gift-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}

.gift-option,
.gift-card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: oklch(100% 0 0); /* logos and banners are drawn for a white ground */
  color: oklch(21% 0.025 255);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.gift-option {
  cursor: pointer;
}

/* A banner fills its tile edge to edge; a logo or a name keeps the tile's padding. */
.gift-option:has(> .gift-banner),
.gift-card:has(> .gift-banner) {
  padding: 0;
  overflow: hidden;
}

.gift-option:hover {
  border-color: var(--foreground);
}

.gift-option[aria-pressed="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.gift-option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Every banner takes the same shape (1200:628), so the row has one height; an image of another shape shows whole. */
.gift-banner {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 628;
  object-fit: contain;
}

.gift-logo {
  display: block;
  max-width: 96px;
  max-height: 44px;
  object-fit: contain;
}

.gift-name {
  overflow-wrap: anywhere;
}

.gift-result {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}

/* Staging only: a text that waits for the owner's approval. */
.gift-review {
  padding: 0 6px;
  border-radius: 4px;
  background: oklch(90% 0.15 95);
  color: oklch(25% 0.05 95);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---- the page /dwro (inside .legal-wrap, which sets the text) ---- */
.gift-page .gift-lead {
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.55;
}

.gift-page .gift-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: gift-step;
}

.gift-page .gift-steps li {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  font-weight: 700;
  line-height: 1.4;
  counter-increment: gift-step;
}

.gift-page .gift-steps li::before {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  content: counter(gift-step);
}

.gift-page .gift-start {
  min-height: 44px;
  font-weight: 800;
  text-decoration: none;
}

.gift-page .gift-start,
.gift-page .gift-start:hover {
  color: var(--primary-foreground);
}

/* The approved card (LAUNCH-0067, drafts v2 and v3 of 15/11/2026): high in the guide's step and right under the
   title of /dwro. The title with its amount, the businesses, one line, one small trademark line. */
.gift-block.gift-hook,
.gift-page .gift-hook {
  border: 1px solid oklch(85% 0.06 50);
  border-radius: 16px;
  background: oklch(97.5% 0.012 60);
}

.gift-block.gift-hook {
  margin: 0.5rem 0 1.75rem;
  padding: 1.25rem 1.25rem 1rem;
}

.gift-page .gift-hook {
  margin: 0 0 28px;
  padding: 20px 20px 16px;
}

.gift-hook .gift-title {
  margin: 0 0 1rem;
  color: var(--foreground);
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
}

.gift-hook .gift-amount {
  color: var(--primary);
}

.gift-hook .gift-list {
  margin-bottom: 0.9rem;
}

.gift-hook p.gift-line {
  margin: 0 0 0.4rem;
  color: var(--foreground);
  font-size: 0.95rem;
  font-weight: 400;
}

.gift-hook p.gift-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  line-height: 1.45;
}

.gift-page .gift-hook .gift-start-wrap {
  margin: 14px 0 0;
}

/* The selection circle sits on the tile's top-right corner, outside the logo (the owner, 15/11/2026: inside, it covered
   a mark). The tile lets it out; the banner keeps the tile's rounded corners itself. */
.gift-hook .gift-option {
  position: relative;
}

.gift-hook .gift-option:has(> .gift-banner) {
  overflow: visible;
}

.gift-hook .gift-option .gift-banner {
  border-radius: calc(var(--radius) - 1px);
}

.gift-hook .gift-radio {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border: 2px solid oklch(55% 0.01 255);
  border-radius: 50%;
  background: oklch(100% 0 0);
  box-shadow: 0 0 0 2px oklch(100% 0 0);
}

.gift-hook .gift-option[aria-pressed="true"] .gift-radio {
  border-color: var(--primary);
  background: radial-gradient(var(--primary) 0 45%, oklch(100% 0 0) 50%);
}

/* ---- /dwro for a partner visitor: Revmas Club (LAUNCH-0067 points 4 and 4α) ---- */
/* Set by /dwro's script before the page is drawn: a partner visitor never sees the gift view, not even for a moment. */
html.mr-partner [data-dwro-view="gift"] {
  display: none !important;
}

.club-box {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.club-box h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.club-box p {
  margin: 0 0 14px;
}

.club-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  margin: 0 0 14px;
  border-radius: 12px;
  object-fit: cover;
}

/* ---- the guide for a partner visitor: his welcome (LAUNCH-0067 point 4β, the approved variant C-short-offer) ---- */
.pw-card {
  margin: 0.25rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 6px 20px oklch(0% 0 0 / 0.07);
  text-align: left;
}

/* The banner on top; on a desktop its height is limited, so the step itself stays in view. */
.pw-banner {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1133 / 486;
  object-fit: cover;
}

@media (width >= 700px) {
  .pw-banner {
    height: 200px;
    aspect-ratio: auto;
  }
}

.pw-name {
  margin: 0;
  padding: 1.4rem 1.25rem 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pw-hook {
  margin: 0;
  padding: 1rem 1.25rem 0.3rem;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.35;
}

.pw-sub {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.pw-sub a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pw-strip {
  margin: 0.25rem 0 1.25rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(97% 0.01 60);
  font-size: 0.92rem;
  text-align: left;
}

/* No banner: a card in the partner's colours (set on the element from his two checked colours; black and white when
   the read gives none). Text and link take the partner's text colour, so they read on his ground. */
.pw-colour {
  border-color: oklch(0% 0 0);
  background: oklch(0% 0 0);
  color: oklch(100% 0 0);
}

.pw-colour .pw-sub,
.pw-colour .pw-sub a {
  color: inherit;
}

.gift-page .gift-businesses .gift-list {
  list-style: none;
  padding: 0;
}

.gift-page .gift-businesses .gift-note {
  font-size: 0.8125rem;
}

.gift-page .gift-terms {
  margin: 0 0 14px;
  padding-left: 22px;
  list-style: decimal;
}

.gift-page .gift-terms li {
  margin-bottom: 10px;
}

/* The link «όρους της προσφοράς» lands on the terms title, below the fixed header. */
.gift-page h2[id] {
  scroll-margin-top: 96px;
}

@media (width <= 740px) {
  .gift-page .gift-steps {
    grid-template-columns: 1fr;
  }
}

/* A phone: the row of businesses breaks in threes (two gaps of 10px between three tiles). */
@media (width <= 560px) {
  .gift-list {
    flex-wrap: wrap;
  }

  .gift-option,
  .gift-card {
    flex: 0 0 calc((100% - 20px) / 3);
  }
}
