/* ---------- Locker room (/me) + the favorite heart ----------
   Page chrome reuses the roster page's head/tab pills (roster.css); this file
   only adds the page body, the favorites grid, saved-search rows, and the
   heart control that appears on gallery cards and in the photo modal. */

.me-body { max-width: 1400px; margin: 0 auto; padding: 18px 26px 60px; }
.me-panel { }
.me-empty { color: var(--muted); font-size: 15px; padding: 28px 0; }
.me-more { display: block; margin: 22px auto 0; }
.me-card { max-width: 440px; margin: 0 0 28px; }
/* Username field that only exists so a password manager pairs the saved login with the password
   fields below it. Must stay rendered (display:none fields are ignored); just invisible and inert. */
.pw-username-shim { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }

/* favorites grid: uniform square thumbs, same family as the main gallery */
.me-fav-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.me-fav-card {
  position: relative; aspect-ratio: 1; padding: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color .16s, box-shadow .16s, opacity .16s;
}
.me-fav-card:hover { border-color: var(--coral); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.me-fav-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-fav-card.is-removed { opacity: .45; }
.me-fav-card.is-removed img { filter: grayscale(1); }

/* uploads */
.me-card-title { margin: 0 0 8px; font-size: 18px; }
.me-textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; padding: 10px 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.me-access-status { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--coral) 10%, var(--surface)); border: 1px solid var(--border); }
.me-up-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.me-up-head .field-note { margin: 0; flex: 1; min-width: 200px; }
.me-up-grid { display: grid; gap: 10px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.me-up-card { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.me-up-card.is-open { cursor: pointer; }
.me-up-card.is-open:hover { border-color: var(--coral); }
.me-up-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-up-rejected { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 12px; text-align: center; color: #e0707e;
  background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px,
              color-mix(in srgb, var(--surface) 88%, #e0707e) 10px, color-mix(in srgb, var(--surface) 88%, #e0707e) 20px); }
.me-up-rejected svg { width: 44px; height: 44px; }
.me-up-rejected-label { font-weight: 700; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.me-up-rejected-name { max-width: 100%; font-size: 12px; color: var(--muted); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.me-up-chip { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px; background: rgba(10,10,16,.72); color: #fff; }
.me-up-chip.is-live { background: color-mix(in srgb, var(--mint, #4ad9a0) 78%, #000); color: #04140d; }
.me-up-chip.is-pending { background: color-mix(in srgb, var(--coral) 80%, #000); color: #fff; }
.me-up-name { position: absolute; left: 8px; right: 8px; top: 8px; font-size: 11.5px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* playground creations */
.me-pg-grid { display: grid; gap: 14px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.me-pg-card { border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.me-pg-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  background: var(--ink); cursor: pointer; }
.me-pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-pg-meta { padding: 10px 12px 4px; min-width: 0; }
.me-pg-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-pg-sub { color: var(--muted); font-size: 12.5px; }
.me-pg-actions { display: flex; gap: 8px; padding: 8px 12px 12px; }

/* saved searches */
.me-search-list { list-style: none; margin: 14px 0 0; padding: 0; max-width: 720px; }
.me-search-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 8px;
}
.me-search-run {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0;
  font: inherit; color: var(--text); cursor: pointer;
}
.me-search-run:hover .me-search-title { color: var(--coral); }
.me-search-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-search-q { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The heart / star icons: outline by default, filled (currentColor) when the
   control is .is-on. The symbols carry no fill of their own (see svg-sprite). */
.ic-heart, .ic-star {
  width: 1em; height: 1em; display: block; flex: none;
  fill: none; stroke: currentColor;
}
.is-on > .ic-heart, .is-on > .ic-star,
.is-on .ic-heart, .is-on .ic-star { fill: currentColor; }

/* the heart: a round chip over a thumbnail ... */
.fav-heart {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; font-size: 19px; line-height: 1;
  background: rgba(10,10,16,.55); color: #fff; backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .15s, transform .12s, background .15s;
}
.photo-card:hover .fav-heart, .me-fav-card:hover .fav-heart,
.fav-heart.is-on, .fav-heart:focus-visible { opacity: 1; }
.fav-heart:hover { transform: scale(1.1); background: rgba(10,10,16,.75); }
.fav-heart.is-on { color: var(--coral); }
/* no hover on touch: show an outline heart all the time so it is discoverable */
@media (hover: none) { .fav-heart { opacity: .85; } }
/* hearts / save-search only where there is an account to keep them in */
body:not(.can-favorite) .photo-card .fav-heart,
body:not(.can-favorite) .show-tile .fav-heart,
body:not(.can-favorite) .fav-btn,
body:not(.can-favorite) .save-search-btn { display: none !important; }
/* ... and the icon button in the photo modal's action row */
.fav-btn.is-on { color: var(--coral); border-color: var(--coral); }

/* save-search toggle above the results */
.save-search-btn { display: inline-flex; align-items: center; gap: 6px; }
.save-search-btn .ic-star { font-size: 15px; }
.save-search-btn.is-on { color: var(--coral); border-color: var(--coral); }

/* Favorites: Photos | Shows | Matches switcher. Pills, not more top-level tabs -- the Locker
   room's own tab row is already full. */
.me-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.me-subtab {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border-radius: var(--radius-pill); border: var(--bw) solid var(--border);
  background: var(--surface); color: var(--muted);
  transition: color .15s, background .15s, border-color .15s;
}
.me-subtab:hover { border-color: var(--coral); color: var(--text); }
.me-subtab.is-active { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.me-subtab .roster-tab-count { color: inherit; opacity: .75; }

/* favorited shows reuse the Shows listing's tiles; an un-hearted one dims in place, like photos */
.me-fav-shows .show-tile.is-removed { opacity: .45; }
.me-fav-shows .show-tile.is-removed .show-cover img { filter: grayscale(1); }

/* favorited matches: a compact row per match */
.me-match-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.me-match-card {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .16s, opacity .16s;
}
.me-match-card:hover { border-color: var(--coral); }
.me-match-card.is-removed { opacity: .45; }
.me-match-art { flex: none; width: 92px; height: 66px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.me-match-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-match-text { flex: 1; min-width: 0; }
.me-match-label { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.me-match-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-match-card .fav-btn { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 17px; cursor: pointer; border: var(--bw) solid var(--border);
  border-radius: var(--radius-pill); color: var(--muted); }
.me-match-card .fav-btn.is-on { color: var(--coral); border-color: var(--coral); }

@media (max-width: 600px) {
  .me-body { padding: 14px 16px 50px; }
  .me-fav-grid, .me-up-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
}

/* ---- shelves: chips that filter Favorites, and select mode ---- */
.me-shelves { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 14px; }
.me-shelf-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.me-shelf-chip { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 5px 13px; border-radius: var(--radius-pill);
  background: none; border: var(--bw) solid var(--border); color: var(--muted); transition: color .15s, background .15s, border-color .15s; }
.me-shelf-chip:hover { border-color: var(--coral); color: var(--text); }
.me-shelf-chip.is-active { background: var(--surface-2); border-color: var(--coral); color: var(--coral); }
.me-shelf-chip.is-new { border-style: dashed; }
.me-shelf-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* select mode: a tap ticks (hearts go inert so a mis-tap cannot un-favorite), ticked cards get a coral ring + tick */
.me-selecting [data-fav-kind], .me-selecting .fav-heart { pointer-events: none; }
.me-selecting [data-sel-kind] { cursor: pointer; position: relative; }
[data-sel-kind].is-selected { outline: 3px solid var(--coral); outline-offset: -3px; }
.me-selecting [data-sel-kind].is-selected::after { content: "\2713"; position: absolute; top: 6px; left: 6px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--coral); color: #fff; font-size: 13px; font-weight: 700; z-index: 3; }
.me-selbar { position: sticky; bottom: 12px; z-index: 20; margin: 16px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--coral); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.me-selbar.hidden { display: none; }
.me-sel-count { flex: 1 1 140px; font-weight: 700; font-size: 14px; }
@media (max-width: 480px) { .me-selbar { bottom: 70px; } }   /* clear the phone tab bar */
