/* info_button.css
   One file for the placements AND ads grids. Uses its own class names (info-grid, info-button, ib-*), so it does not

/* ---------- grid ---------- */
.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  margin: 10px;
}

/* ---------- shared tile size: info tiles and the "+" tile ---------- */
.info-grid .info-button,
.info-grid .plus-button {
  width: 400px;
  height: 400px;
  max-width: 100%;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.info-grid .plus-button {
  font-size: 100px;
  background-color: lightgray;
}

/* ---------- info tile ---------- */
.info-grid .info-button {
  position: relative;
  display: flex;
  flex-direction: column;          /* picture on top, info strip below */
  padding: 0;
  overflow: hidden;
  background: #f0f0f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  font: inherit;                   /* buttons do not inherit the font by default */
  text-align: left;
  color: #222;
  transition: box-shadow .15s, transform .15s;
}
.info-button:hover { box-shadow: 0 6px 14px rgba(0, 0, 0, .25); transform: translateY(-2px); }
.info-button:focus-visible,
.plus-button:focus-visible { outline: 3px solid #008b8b; outline-offset: 2px; }

/* picture area: all the height the info strip does not use */
.ib-media { position: relative; display: block; flex: 1; min-height: 0; overflow: hidden; }
.ib-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;             /* whole picture visible */
}

/* info strip (spans, because only inline elements are allowed inside a button) */
.ib-info   { display: block; padding: 10px 12px 12px; background: #fff; border-top: 1px solid #e2e2e2; }
.ib-title  { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-period,
.ib-stat   { display: block; margin-top: 2px; font-size: 13px; color: #666; }
.ib-period.is-soon { color: #b45309; font-weight: 600; }       /* ends within 7 days */

/* badges over the picture */
.ib-badge {
  position: absolute; top: 8px; z-index: 1;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4; color: #fff;
}
.ib-badge.type   { left: 8px;  background: rgba(0, 0, 0, .65); }
.ib-badge.status { right: 8px; background: #6b7280; }

/* states: active tiles have no status badge, only the exceptions do */
.info-button[data-status="paused"]    .ib-badge.status { background: #6b7280; }
.info-button[data-status="ended"]     .ib-badge.status { background: #374151; }
.info-button[data-status="scheduled"] .ib-badge.status { background: #2563eb; }
.info-button[data-status="pending"]   .ib-badge.status { background: #d97706; }

/* paused / ended: faded picture and grey title */
.info-button[data-status="paused"] .ib-media img,
.info-button[data-status="ended"]  .ib-media img { filter: grayscale(1); opacity: .45; }
.info-button[data-status="paused"] .ib-title,
.info-button[data-status="ended"]  .ib-title { color: #777; }

/* phones: one tile per row, full width */
@media (max-width: 768px) {
  .info-grid { flex-direction: column; margin: 0; }
  .info-grid .info-button,
  .info-grid .plus-button { width: 100%; }
}