/* /mina-mossor/ — redesign board (Pages3 MinaMossor): the auth + import cards
   up top, "Mina designer" with the dashed new-design tile, "Från vänner",
   and the ink group meter beside the Köp-ihop card at the foot. Shares the
   design tokens with site.css (loaded first). */

.mm-status { min-height: 1.4em; font-size: 0.9rem; font-weight: 600; }
.mm-status.ok { color: var(--success); }
.mm-status.err { color: var(--red-strong); }

/* ---------- top cards: auth + code import ---------- */

.mm-top {
  display: grid;
  gap: var(--gap-cards, 1.25rem);
  margin: 1.25rem 0 2rem;
}
@media (min-width: 900px) {
  .mm-top { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
}
.mm-auth-card {
  border-radius: var(--radius-card, 28px);
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.mm-auth-card.is-import {
  background: var(--sky-50);
  box-shadow: none;
  align-content: center;
}
.mm-auth-card p { margin: 0; font-size: 0.95rem; line-height: 1.5; flex: 1 1 16rem; }
.mm-auth-card.is-signed-in p b { color: var(--ink); }
.mm-auth-actions { display: flex; gap: 0.9rem; align-items: center; }

.mm-import { display: grid; gap: 0.5rem; width: 100%; }
.mm-import label { font-weight: 700; font-size: 0.88rem; }
.mm-import-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mm-import-row input {
  flex: 1 1 8rem;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 1.05rem;
  text-align: center;
  text-transform: uppercase;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 999px;
  padding: 0.6em 1em;
  background: var(--white);
  color: var(--ink);
}
.mm-import-row input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--sky-ink); }

/* ---------- section heads ---------- */

.mm-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 1rem;
}
.mm-section-head h2 { margin: 0; font-size: var(--fs-h3, 1.5rem); }
.mm-n { color: var(--dim); font-weight: 600; font-size: 0.75em; }
.mm-friends-note { font-size: 0.85rem; color: var(--dim); }

/* ---------- the new-design tile ---------- */

.mm-newtile {
  border: 2px dashed var(--sky-200);
  border-radius: var(--radius-card, 28px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  min-height: 22rem;
  padding: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}
@media (max-width: 759px) {
  .mm-newtile { min-height: 9rem; }
}
.mm-newtile-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: var(--shadow-btn);
}
.mm-newtile-txt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

/* ---------- hat cards (board Pages3 HatCard) ---------- */

.hat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: var(--gap-cards, 1.25rem);
}
.hat-card {
  background: var(--white);
  border-radius: var(--radius-card, 28px);
  display: grid;
  align-content: start;
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 2px 10px rgba(31, 31, 35, 0.08));
  transition: box-shadow var(--ease-fast, 150ms), transform var(--ease-fast, 150ms);
}
.hat-card:hover {
  box-shadow: var(--shadow-lift, 0 10px 24px rgba(31, 31, 35, 0.14));
  transform: translateY(-2px);
}
.hat-tile {
  position: relative;
  background: var(--sky-100);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 168px;
  padding: 1rem 0.9rem 0.4rem;
  box-sizing: border-box;
}
.hat-tile.is-friend { background: var(--sky-50); }
.hat-tile .hat-cap, .hat-tile .cap-thumb-canvas { width: 132px; height: auto; display: block; }
.hat-tile-chips {
  position: absolute;
  top: 0.8rem;
  left: 0.9rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.hat-chip {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--white);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--ink);
}
.hat-chip-friend { background: var(--ink); color: var(--white); }
.hat-chip-cart {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--red-strong);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--white);
}
.hat-body { padding: 1rem 1.15rem 1.15rem; display: grid; gap: 0.25rem; }
.hat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}
.hat-name {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hat-updated { font-size: 0.75rem; color: var(--dim); white-space: nowrap; }
.hat-meta { margin: 0; color: var(--dim); font-size: 0.84rem; }

.hat-actions {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.hat-btn {
  border: 0;
  border-radius: 999px;
  background: var(--sky-100);
  color: var(--sky-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65em 1em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hat-btn:hover { background: var(--sky-200); }
.hat-btn-open { grid-column: 1 / -1; }
.hat-btn-quiet.is-on {
  background: var(--sky-50);
  box-shadow: none;
  color: var(--sky-ink);
}

/* owner field on friends' hats */
.hat-owner {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
  font-size: 0.82rem;
  color: var(--dim);
}
.hat-owner-label { font-weight: 700; white-space: nowrap; }
.hat-owner-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: var(--sky-50);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
}
.hat-owner-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hat-owner-name svg { flex: none; color: var(--sky-ink); }
.hat-owner-form { display: flex; gap: 0.35rem; flex: 1; min-width: 0; }
.hat-owner-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--sky-ink);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: var(--white);
}
.hat-owner-save {
  border: 0;
  border-radius: 999px;
  background: var(--sky-100);
  color: var(--sky-ink);
  font: inherit;
  font-weight: 700;
  padding: 0.35em 0.8em;
  cursor: pointer;
}

.hat-remove {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red-strong);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
  margin-top: 0.2rem;
}

/* ---------- empty state ---------- */

/* empty state = the board's dashed new-design tile */
.mm-empty {
  border: 2px dashed var(--sky-200);
  border-radius: var(--radius-card, 28px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  min-height: 9rem;
  max-width: 20rem;
  padding: 1.5rem;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}
.mm-empty-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: var(--shadow-btn);
}
.mm-empty-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
@media (min-width: 761px) { .mm-empty { min-height: 22rem; } }

/* ---------- the foot: meter + Köp-ihop card ---------- */

.mm-bottom { padding: clamp(2.5rem, 5cqw, 4rem) 0 clamp(2rem, 6cqw, 5rem); }
.mm-bottom-grid {
  display: grid;
  gap: var(--gap-cards, 1.25rem);
  align-items: stretch;
}
@media (min-width: 900px) {
  .mm-bottom-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.mm-meter {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-card, 28px);
  padding: 1.6rem 1.6rem 1.4rem;
  display: grid;
  align-content: center;
  gap: 0.55rem;
}
.mm-meter[hidden] { display: none; }
.mm-meter b { font-size: 0.95rem; }
.mm-meter-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  margin: 0.3rem 0;
}
.mm-meter-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--red);
  transition: width var(--ease-fast, 150ms);
}
.mm-meter p { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--sky-200); }
.mm-groupcard {
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--radius-card, 28px);
  padding: 1.6rem;
  display: grid;
  align-content: center;
  gap: 0.6rem;
}
.mm-groupcard h2 { margin: 0; font-size: var(--fs-h3, 1.5rem); }
.mm-groupcard p { margin: 0; color: var(--dim); font-size: 0.92rem; line-height: 1.55; }

.btn-sm { padding: 0.45em 1em; font-size: 0.85rem; }
.btn-quiet { background: var(--sky-100); color: var(--sky-ink); }
