/* The OpenPallet page (src/components/pages/OpenPallet.astro), linked by its view only. Nothing jumps:
   the list of what the e-mail brings keeps every variant of a slot in one grid cell, the chosen one
   visible, so a slot is as tall as its tallest variant from the start; the cards' place has the same
   frame with or without the cards. */

/* the cards of the standard */
.op-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.op-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.op-card:hover { border-color: var(--sky); box-shadow: var(--shadow-soft); }
.op-card:focus-visible { outline: 2px solid var(--sky-bright); outline-offset: 2px; }
.op-card-img {
  display: block;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.op-card-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.op-card-title {
  display: block;
  padding: 12px 14px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.op-pdf { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.op-edition { font-size: 0.9rem; color: var(--ink-soft); }
.op-card-nr {
  display: inline-block;
  min-width: 1.6em;
  margin-right: 8px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--sky-deep);
}
.op-cards-slot {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 24px;
  border: 2px dashed var(--sky-soft);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink-faded);
  font-weight: 600;
  text-align: center;
}

/* a package per brand */
.op-pack .op-kind {
  display: block;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-deep);
}
.op-pack .op-test { margin-top: auto; }
.op-pack p { margin-bottom: 14px; }
.op-pack-core { background: var(--sky-haze); }
.op-paid {
  margin-top: 26px;
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}
.op-paid a {
  color: var(--sky-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted var(--sky-deep);
}

/* the form with the list of the e-mail beside the choices: one column on a phone (the list under
   the choices, above the button), two from 901 px (the list on the right, beside every row) */
.op-box { max-width: 1040px; }
@media (min-width: 901px) {
  .fm[data-fm='openpallet'] {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    /* the list spans the six rows; a list taller than the form grows the last row only */
    grid-template-rows: repeat(5, auto) 1fr;
    column-gap: 40px;
    align-items: start;
  }
  .fm[data-fm='openpallet'] > * { grid-column: 1; }
  .fm[data-fm='openpallet'] > .fm-submit { justify-self: start; }
  .fm[data-fm='openpallet'] > .op-mail { grid-column: 2; grid-row: 1 / span 6; }
}
.op-mail {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sky-haze);
  padding: 18px 20px 8px;
  margin: 0 0 18px;
}
.op-mail-h {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin: 0 0 10px;
}
.op-mail-list { list-style: none; margin: 0; padding: 0; }
.op-slot {
  display: grid;
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--line);
  position: relative;
}
.op-slot:first-child { border-top: 0; }
/* the package mark: filled for a package in the e-mail, an empty frame while nothing is chosen */
.op-slot::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--sky-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 6.5v11L12 22l9-4.5v-11L12 2Zm0 2.2 6.6 3.3L12 10.8 5.4 7.5 12 4.2ZM5 9.1l6 3v7.6l-6-3V9.1Zm8 10.6v-7.6l6-3v7.6l-6 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 6.5v11L12 22l9-4.5v-11L12 2Zm0 2.2 6.6 3.3L12 10.8 5.4 7.5 12 4.2ZM5 9.1l6 3v7.6l-6-3V9.1Zm8 10.6v-7.6l6-3v7.6l-6 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.op-slot:has(.op-pick.op-on)::before, .op-slot:has(.op-other.op-on)::before { background: var(--ink-faded); }
.op-v { grid-area: 1 / 1; min-width: 0; visibility: hidden; display: flex; flex-direction: column; gap: 2px; }
.op-v.op-on { visibility: visible; }
.op-v b { font-weight: 600; font-size: 0.95rem; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.op-v small { font-size: 0.82rem; line-height: 1.4; color: var(--ink-soft); }
.op-pick b, .op-other b { font-weight: 500; color: var(--ink-soft); }

@media (max-width: 420px) {
  .op-mail { padding: 14px 14px 4px; }
}
