/* Browse decks (/decks). Builds on styles.css and home.css: the masthead and buttons come from there. */

/* ---------- hero: title and the search form ---------- */
.ds-hero { width: min(860px, 100%); margin: 0 auto; padding: 40px 24px 52px; text-align: center; }
.ds-hero h1 { font: 700 clamp(2.2rem, 5vw, 3.6rem)/1.05 var(--serif); letter-spacing: -0.02em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.ds-sub { margin-top: 10px; color: rgba(247, 245, 240, 0.75); font-size: 1.05rem; }
.ds-form { margin-top: 26px; }
.ds-searchrow { display: flex; gap: 8px; }
.ds-input {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 99px;
  background: rgba(247, 245, 240, 0.96); border: 1px solid transparent; color: #141414; font-size: 1.05rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.ds-input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 6px 20px rgba(0, 0, 0, 0.3); }
.ds-go { min-height: 50px; padding: 0 24px; border-radius: 99px; }
.ds-hero .btn.primary { background: #fbf5eb; color: #141414; border-color: #fbf5eb; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
.ds-hero .btn.primary:hover { background: #fff; border-color: #fff; }
.ds-filters { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; margin-top: 16px; }
.ds-flabel { font: 700 0.68rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247, 245, 240, 0.6); }
.ds-colors { display: flex; align-items: center; gap: 4px; }
.ds-colors .ds-flabel { margin-right: 6px; }
.ds-pip {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; cursor: pointer;
  background: transparent; border: 2px solid transparent; opacity: 0.5; transition: opacity 0.15s, border-color 0.15s;
}
.ds-pip:hover { opacity: 0.85; }
.ds-pip[aria-pressed="true"] { opacity: 1; border-color: #fbf5eb; }
.ds-pip .pip { font-size: 0.72rem; }
.ds-select { display: flex; align-items: center; gap: 8px; }
.ds-select select {
  height: 34px; padding: 0 10px; border-radius: 10px; font: inherit; font-size: 0.9rem;
  background: rgba(247, 245, 240, 0.08); color: #fbf5eb; border: 1px solid rgba(247, 245, 240, 0.35);
}
.ds-select select option { color: #141414; }

/* ---------- results: a grid of deck tiles with the commander's art on top ---------- */
.ds-main { padding-top: 28px !important; padding-bottom: 56px !important; }
.ds-status { margin-bottom: 16px; color: var(--ink-soft); }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ds-tile > a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.ds-tile > a:hover, .ds-tile > a:focus-visible { border-color: #141414; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1); }
.ds-art {
  position: relative; display: block; aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 30% 30%, #3a3835, #161514) center / cover no-repeat;
}
.ds-art.has-art { background-position: center 25%; background-size: cover; }
.ds-pips { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 3px; padding: 4px 6px; border-radius: 99px; background: rgba(20, 20, 20, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ds-pips .pip { font-size: 0.62rem; }
.ds-body { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 16px; }
.ds-name { font: 700 1.12rem/1.25 var(--serif); }
.ds-cmd { color: var(--ink-soft); font-size: 0.9rem; }
.ds-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 8px; font-size: 0.8rem; color: var(--ink-soft); }
.ds-meta strong { color: var(--ink); font-weight: 600; }
.ds-likes { color: #b8402f; font-weight: 600; }
.ds-more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Your Decks, Liked Decks, Followed Decks: the same tiles, with the deck's actions along the bottom ---------- */
.md-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 99px; background: rgba(247, 245, 240, 0.08); border: 1px solid rgba(247, 245, 240, 0.18); }
.md-tabs a { padding: 6px 16px; border-radius: 99px; color: rgba(247, 245, 240, 0.75); font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: background 0.15s, color 0.15s; }
.md-tabs a:hover { color: #fff; background: rgba(247, 245, 240, 0.1); }
.md-tabs a[aria-current="page"] { background: #fbf5eb; color: #141414; }
.md-tools { margin-top: 26px; }
.md-tools .ds-input { width: 100%; }
.md-tools .ds-filters .btn.primary { min-height: 34px; padding: 0 16px; border-radius: 99px; box-shadow: none; }
/* Banner tiles: a wide strip of the commander's art, and one slim strip below with the name, a line of details
   and the ⋯ menu. */
#md-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.md-tile {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.md-tile:hover, .md-tile:focus-within { border-color: #141414; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1); }
.md-art { aspect-ratio: 2 / 1; }
.md-strip { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 11px 12px; }
.md-cmd { margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; color: var(--ink-soft); }
.md-title { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.md-title:hover .ds-name { text-decoration: underline; text-underline-offset: 3px; }
.md-title .ds-name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; line-height: 1.5; color: var(--ink-soft); }
.md-more { flex: none; }
.md-vis { position: absolute; top: 8px; left: 8px; margin: 0; background: rgba(20, 20, 20, 0.6); border-color: transparent; color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.md-vis.on { background: #fbf5eb; border-color: #fbf5eb; color: #141414; }
.card-menu .cm-danger { color: var(--bad); }
.md-actions .btn { justify-content: center; text-align: center; }
.md-actions .md-delete { color: var(--bad); }
.ds-status .btn { margin-right: 4px; }

@media (max-width: 600px) {
  .ds-hero { padding: 28px 16px 40px; }
  .ds-go { padding: 0 18px; }
  .ds-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ds-tile > a, .md-tile, .md-tabs a { transition: none; } }
