/* Kreatiu — la carta de una oferta y sus condiciones.
   La cargan las páginas que pintan cartas (asistente, panel, tablón, puja). Solo usa los tokens de styles.css.
   Sin estilos en línea: los colores de portada son clases (.cover-cherry … .cover-sky). */

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }

/* ---------- Colores de portada ---------- */
.cover-cherry { --c: var(--cherry); }
.cover-mint { --c: var(--mint); }
.cover-sun { --c: var(--sun); }
.cover-lilac { --c: var(--lilac); }
.cover-sky { --c: var(--sky); }

/* ---------- La carta ---------- */
.offer-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.offer-card:has(.offer-link:hover) { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 8px 8px 0 var(--ink); }
.offer-card.is-closed { box-shadow: var(--shadow-sm); }
.offer-cover {
  display: flex; align-items: flex-end; min-height: 128px; padding: 14px 16px;
  border-bottom: var(--line);
  background-color: var(--c, var(--lilac));
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
}
.offer-kind {
  position: absolute; top: 12px; left: 12px; display: grid; place-items: center;
  width: 38px; height: 38px; border: var(--line); border-radius: 50%; background: var(--paper);
}
.offer-kind .icon { width: 22px; height: 22px; }
.offer-new { position: absolute; top: 14px; right: 12px; transform: rotate(4deg); }
.offer-title {
  display: inline-block; max-width: 100%; margin: 0;
  padding: 4px 10px; background: var(--paper); border: var(--line); border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 var(--ink);
  font: 800 22px/1.1 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere;
}
.offer-link { color: inherit; text-decoration: none; }
.offer-link::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.offer-link:focus-visible { outline: 3px solid var(--lilac); outline-offset: 4px; }

.offer-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 14px 18px 18px; }
.offer-studio { margin: 0; font-size: 14px; color: var(--ink-soft); }
.seal-advertiser { align-self: flex-start; transform: rotate(-2deg); font-size: 12px; }
.seal-advertiser .icon { width: 15px; height: 15px; }
.offer-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.offer-price { margin: 0; font: 800 26px/1.05 var(--font-display); letter-spacing: -0.02em; }
.offer-cap { margin: -4px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.offer-bids { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.offer-due { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.offer-bid-button { padding: 11px 16px; font-size: 15px; }
a.offer-bid-button { position: relative; z-index: 1; } /* above the card-wide link */
.btn.is-inactive { opacity: .55; pointer-events: none; box-shadow: var(--shadow-sm); }

/* Pila de círculos «?» de las pujas */
.anon-stack { display: inline-flex; }
.anon-dot {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -8px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--lilac-soft);
}
.anon-dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.anon-dot:first-child { margin-left: 0; }
.anon-dot:nth-child(2) { background: var(--sun); }
.anon-dot:nth-child(3) { background: var(--mint-soft); }

/* ---------- Condiciones ---------- */
.offer-conditions { display: grid; margin: 0; }
.offer-conditions > div {
  display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 4px 14px;
  padding: 10px 0; border-bottom: 2px dashed var(--paper-2);
}
.offer-conditions > div:last-child { border-bottom: 0; }
.offer-conditions dt { font-weight: 700; font-size: 15px; }
.offer-conditions dd { margin: 0; overflow-wrap: anywhere; }
.offer-conditions a { text-decoration: underline; text-underline-offset: 3px; }
.offer-conditions-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 480px) {
  .offer-conditions > div { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .offer-card { transition: none; }
  .offer-card:has(.offer-link:hover) { transform: none; }
}

/* ---------- Oferta en pausa ---------- */
.sticker-paused { background: var(--sun); }
.sticker-paused .icon { width: 18px; height: 18px; }
.brief-edited { margin: 4px 0 0; font-size: 14px; }

/* ---------- Anunciante: lo que se ha comprobado (ficha pública) ---------- */
.advertiser-line { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-soft); overflow-wrap: anywhere; }
.of-studio .seal-advertiser + .advertiser-line { margin-top: 12px; }
