/* Mini timeline de um anúncio, partilhada pelos quatro drawers.
   O `<details>` está fechado por omissão: o número que interessa em quase todas
   as aberturas vive no `<summary>`, e o drawer já é comprido no telemóvel. */

.offer-timeline-box {
  margin: 14px 0 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  overflow: hidden;
}

/* `flex-wrap` e o `min-width:0` abaixo existem por causa do telemóvel: com a
   linha inteira numa só ("Esteve no ar 43 dias · na base há 34 dias"), um
   drawer de 320 px transbordava e punha a página a deslizar na horizontal. */
.offer-timeline-box > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.offer-timeline-box > summary::-webkit-details-marker { display: none; }

.offer-timeline-box > summary::after {
  content: "▾";
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform .18s ease;
}

.offer-timeline-box[open] > summary::after { transform: rotate(180deg); }

.offer-timeline-box > summary:hover { background: rgba(255, 255, 255, .04); }

.offer-timeline-box > summary:focus-visible {
  outline: 2px solid var(--brand-color, #0a84ff);
  outline-offset: -2px;
}

.offer-timeline-summary-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* O valor cresce e empurra a seta para a direita; `flex:1` evita que uma linha
   curta ("Sem datas registadas") deixe a seta a meio do cabeçalho. */
.offer-timeline-summary-value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.offer-timeline-body {
  padding: 2px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.offer-timeline {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 11px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.offer-timeline li { position: relative; display: grid; gap: 2px; }

.offer-timeline li::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .3);
  border: 2px solid var(--card-bg);
}

.offer-timeline li.tone-good::before { background: #30d158; }
.offer-timeline li.tone-gold::before { background: #ffd60a; }
.offer-timeline li.tone-warn::before { background: #ff9f0a; }
.offer-timeline li.tone-bad::before { background: #ff453a; }

/* Um evento sem data não é escondido, é atenuado: aconteceu, só não ficou
   registado quando. Ver a regra 2 no cabeçalho de js/offer-timeline.js. */
.offer-timeline li.is-undated { opacity: .7; }

.offer-timeline time {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .3px;
}

.offer-timeline strong { font-size: 12.5px; font-weight: 800; }

.offer-timeline span {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.offer-timeline-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Uma leitura que falhou não pode passar por uma lista vazia. */
.offer-timeline-note.is-warn { color: #ff9f0a; }

.offer-timeline-more {
  margin: 10px 0 0;
  font-size: 10.5px;
  color: var(--text-muted);
}

.offer-timeline-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-color, #0a84ff);
  text-decoration: none;
}

.offer-timeline-link:hover { text-decoration: underline; }
