/* /mit-brickzone: the wish list and the collection. The cards are card.css's (the wish list in its list view). */

.my-page { display: flex; flex-direction: column; gap: 22px; padding-top: 28px; padding-bottom: 64px; }
.my-head { display: flex; flex-direction: column; gap: 8px; }
.my-head__title { margin: 0; font-family: var(--font-display); font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.my-head__intro { margin: 0; font-size: 15px; color: var(--ink-3); }
.my-head__intro a { font-weight: 700; color: var(--cta); text-decoration: none; }

.my-tabs { align-self: flex-start; display: flex; gap: 4px; max-width: 100%; padding: 5px; background: var(--surface); border-radius: var(--r-lg); }

.my-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  background: transparent;
  border: 0;
  border-radius: var(--r-md);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.my-tabs__tab span { font-weight: 800; }
.my-tabs__tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.my-tabs__tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.my-panel { display: flex; flex-direction: column; gap: 18px; }
.my-panel[hidden] { display: none; }
.my-status { margin: 0; font-size: 15px; color: var(--ink-3); }

/* Totals */
.my-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.my-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px; background: var(--surface); border-radius: var(--r-lg); }
.my-stat > span:first-child { font-size: 13px; color: var(--ink-3); }
.my-stat strong { font-family: var(--font-display); font-size: 28px; font-weight: 800; }
.my-stat .my-stat--good { color: var(--green); }
.my-stat__note { font-size: 12px; color: var(--ink-3); }

/* Notes on the wish list: few shops, retiring, historically low, not for sale */
.my-notes { display: flex; flex-wrap: wrap; gap: 8px; }

.my-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
}

.my-note > span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.my-note--bad { background: var(--red-tint); color: var(--cta); }
.my-note--warn { background: var(--amber-tint); color: var(--amber); }
.my-note--good { background: var(--green-tint); color: var(--green); }
.my-note--none { background: var(--surface); color: var(--ink-2); }

/* The collection by theme */
.my-themes { display: flex; flex-direction: column; gap: 12px; overflow: hidden; padding: 16px 18px; background: var(--surface); border-radius: var(--r-lg); }
.my-themes > strong { font-size: 15px; }
.my-themes__bar { display: flex; gap: 2px; height: 14px; overflow: hidden; border-radius: 7px; }
.my-themes__bar span { flex-basis: 0; min-width: 4px; }
.my-themes ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.my-themes li { display: flex; align-items: center; gap: 8px; }
.my-themes li > span { width: 10px; height: 10px; border-radius: 3px; }

/* Mere statistik: a row along the card's bottom edge. Samlingens prisudvikling opens above it (its chart is price-chart.css) */
.my-themes__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 4px -18px -16px;
  padding: 0 18px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 700;
}

.my-themes__more:hover { background: var(--surface-2); }
.my-themes__more:focus-visible { outline-offset: -3px; }
.my-themes__more svg:last-child { transition: transform 0.15s; }
.my-themes__more[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }

/* Prisudvikling is the same small label as "Fordelt på temaer": two sections of one card */
.my-history { display: flex; flex-direction: column; gap: 18px; padding: 16px 0 10px; }
.my-history .section-head__text { flex: 1 1 320px; min-width: 0; }
.my-history__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 22px; }
.my-history__intro { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.my-history__note { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-3); }

.my-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.my-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  text-align: center;
}

.my-empty__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--red-tint); border-radius: 50%; color: var(--cta); }
.my-empty strong { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.my-empty p { max-width: 420px; margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.my-empty .btn { margin-top: 6px; }

/* A message at the top: profile deleted, created (without JavaScript), new password saved */
.my-note-box { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.my-note-box > svg { flex-shrink: 0; width: 32px; height: 32px; padding: 7px; box-sizing: border-box; background: var(--green-tint); border-radius: 50%; color: var(--green); }
.my-note-box strong { display: block; font-size: 15px; line-height: 22px; color: var(--ink); }

/* The e-mail isn't confirmed yet: the deadline, and the mail again */
.my-verify { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 16px; background: var(--amber-tint); border-radius: var(--r-lg); }
.my-verify__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; background: #ffe2b0; border-radius: var(--r-md); color: var(--amber); }
.my-verify__text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.my-verify__text strong { font-size: 15px; line-height: 22px; color: var(--ink); }
.my-verify__ok { font-weight: 700; color: var(--green); }
.my-verify__wait { font-weight: 700; color: var(--amber); }
.my-verify__btn { min-height: var(--tap); padding: 0 18px; }

/* Logged out: there are no lists without a profile */
.my-invite { display: flex; padding: 36px 40px; background: var(--surface); border-radius: var(--r-xl); }
.my-invite__text { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.my-invite__title { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
.my-invite__list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.my-invite__list li { display: flex; align-items: flex-start; gap: 12px; }
.my-invite__list li > span:first-child { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; background: var(--red-tint); border-radius: 50%; color: var(--cta); }
.my-invite__list li > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.my-invite__list strong { font-size: 16px; color: var(--ink); }
.my-invite__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.my-invite__buttons .btn { min-height: 48px; padding: 0 24px; font-size: 16px; }
.my-invite__note { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-3); }

/* Profil */
.my-profile { max-width: 720px; gap: 14px; }
.my-card { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; background: var(--surface); border-radius: var(--r-lg); }
.my-card__title { font-size: 15px; }
.my-card__text { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.my-card form { margin: 0; }
.my-profile__who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.my-profile__who > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.my-profile__who strong { font-size: 17px; color: var(--ink); overflow-wrap: anywhere; }
.my-facts { display: flex; flex-direction: column; margin: 0; }
.my-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.my-facts > div:last-child { border-bottom: 0; }
.my-facts dt { color: var(--ink-3); }
.my-facts dd { margin: 0; font-weight: 600; text-align: right; }
.my-facts .is-good { color: var(--green); }
.my-facts .is-warn { color: var(--amber); }
.my-ok { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; line-height: 20px; color: var(--green); }
.my-ok svg { flex-shrink: 0; }

.my-password > summary { list-style: none; align-self: flex-start; width: max-content; cursor: pointer; }
.my-password > summary::-webkit-details-marker { display: none; }
.my-password[open] > summary { display: none; }
.my-password .login__form { max-width: 420px; }
.my-password__save { align-self: flex-start; min-height: 48px; padding: 0 22px; }

.my-danger { align-self: flex-start; min-height: var(--tap); padding: 0 18px; background: var(--surface); border: 1px solid var(--cta); color: var(--cta); }
.my-danger:hover { background: var(--red-tint-3); color: var(--cta); }
.my-danger--solid { background: var(--cta); color: #fff; font-weight: 800; }
.my-danger--solid:hover { background: var(--cta); color: #fff; filter: brightness(0.95); }

/* Slet profil: asks first */
.my-delete { width: min(460px, calc(100% - 24px)); box-sizing: border-box; padding: 28px; border: 0; border-radius: var(--r-xl); background: var(--surface); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); color: var(--ink); }
.my-delete::backdrop { background: rgba(42, 42, 42, 0.55); }
.my-delete[open] { display: flex; flex-direction: column; gap: 14px; }
.my-delete__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--red-tint); border-radius: 14px; color: var(--cta); }
.my-delete__title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
.my-delete__text { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.my-delete__text p { margin: 0; }
.my-delete__text ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 20px; color: var(--ink); overflow-wrap: anywhere; }
.my-delete__buttons { display: flex; justify-content: flex-end; gap: 10px; margin: 6px 0 0; }
.my-delete__buttons .btn { min-height: 48px; padding: 0 22px; }

@media (max-width: 1023px) {
  .my-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .my-page { gap: 18px; padding-top: 18px; padding-bottom: 36px; }
  .my-head__title { font-size: 38px; }
  .my-tabs { align-self: stretch; }
  .my-tabs__tab { flex: 1 1 auto; gap: 6px; min-height: 44px; padding: 0 10px; font-size: 15px; }
  .my-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .my-stat strong { font-size: 22px; }
  .my-history { padding: 12px 0 8px; }
  .my-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .my-invite { padding: 22px 18px; border-radius: 18px; }
  .my-invite__title { font-size: 24px; }
  .my-invite__buttons { display: grid; grid-template-columns: minmax(0, 1fr); }
  .my-card { padding: 18px 16px; }
  .my-delete { padding: 22px 20px; }
  .my-delete__buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
