@import "./filter.css";
@import "./data.css";
@import "./collection.css";

:root {
  --bg-dark: hsl(336 0% 1%);
  --bg: hsl(330 0% 4%);
  --bg-light: hsl(0 0% 9%);
  --text: hsl(0 0% 95%);
  --text-muted: hsl(300 0% 69%);
  --text-dimmed: hsla(0, 0%, 95%, 0.35);
  --highlight: hsl(330 0% 39%);
  --border: hsl(0 0% 28%);
  --border-muted: hsl(0, 0%, 13%);
  --primary: hsl(311, 78%, 72%);
  --secondary: hsl(114, 65%, 42%);
  /* --secondary: hsl(311, 78%, 72%); */
  /* --secondary: hsl(262, 55%, 59%); */
  --danger: hsl(9 26% 64%);
  --warning: hsl(52 19% 57%);
  --success: hsl(146 17% 59%);
  --info: hsl(217 28% 65%);

  /* --green: hsl(120, 71%, 40%); */
  --green: hsl(114, 65%, 42%);
  --dark-green: hsla(120, 86%, 45%, 0.35);
  --red: hsl(0, 65%, 48%);
  --dark-red: hsla(0, 85%, 48%, 0.45);
  --yellow: hsl(46, 97%, 45%);
  --dark-yellow: hsla(41, 88%, 53%, 0.4);

  --normal-gap: 0.5rem;

  --set-color-played: hsl(0 0% 9%);
  --set-color-1: hsl(235 28% 12%);
  --set-color-2: hsl(155 28% 12%);
  --set-color-3: hsl(275 28% 12%);
  --set-color-4: hsl(25 28% 12%);
  --set-color-5: hsl(340 28% 12%);
  --set-color-6: hsl(185 28% 12%);
  --set-color-7: hsl(45 28% 12%);
  --set-color-8: hsl(205 28% 12%);

  --set-card-played: hsl(0 0% 17%);
  --set-card-1: hsl(235 28% 20%);
  --set-card-2: hsl(155 28% 20%);
  --set-card-3: hsl(275 28% 20%);
  --set-card-4: hsl(25 28% 20%);
  --set-card-5: hsl(340 28% 20%);
  --set-card-6: hsl(185 28% 20%);
  --set-card-7: hsl(45 28% 20%);
  --set-card-8: hsl(205 28% 20%);
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1.15rem;
}

h1 {
  display: flex;
  justify-content: center;
  margin: 1rem 0rem;
  font-size: 2rem;
  font-weight: 600;
}

main {
  display: grid;
  grid-template-columns: 1fr 1000px 1fr;
  align-items: start;
  gap: 2rem;
  padding: 1rem 2rem;
}

.bg-box {
  display: flex;
  background-color: var(--bg-dark);
  border-radius: 2rem;
  box-shadow: 3px 3px 3px #00000030, 9px 9px 9px #00000015;
  padding: 2rem;
}

button {
  color: var(--text);
  border-radius: var(--normal-gap);
}

#backup-btn {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 9999;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--normal-gap);
  cursor: pointer;
  padding: 0.5rem 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.27s ease-out;
}

#backup-btn img.backup-btn-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
}

#backup-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border);
}

@media (max-width: 1944px) {
  main {
    grid-template-columns: minmax(320px, 420px) minmax(650px, 1000px) minmax(320px, 420px);
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }

  section#filter {
    justify-self: end;
    width: 100%;
  }

  section#filter .bg-box {
    width: 100%;
    max-width: 420px;
  }

  section#data {
    width: 100%;
  }

  section#data .bg-box {
    width: 100%;
    max-width: 1000px;
  }

  section#collection {
    justify-self: start;
    width: 100%;
  }

  section#collection .bg-box {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 1643px) {
  html {
    font-size: 12px;
  }

  main {
    grid-template-columns: minmax(220px, 320px) minmax(450px, 800px) minmax(220px, 320px);
    gap: 1.25rem;
    padding: 1rem 1.25rem;
  }

  section#filter {
    justify-self: end;
    width: 100%;
  }

  section#filter .bg-box {
    width: 100%;
    max-width: 320px;
    padding: 1.25rem;
  }

  select {
    max-width: 170px;
  }

  section#data {
    width: 100%;
  }

  section#data .bg-box {
    width: 100%;
    max-width: 800px;
    padding: 1.25rem 1.5rem;
  }

  div#data-titles, .data-row {
    grid-template-columns: 35px minmax(140px, 180px) minmax(140px, 180px) minmax(100px, 1fr);
  }

  .data-row {
    height: 42px;
    overflow: hidden;
  }

  .notes-box {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .ow-seed, .nether-seed {
    font-size: 1rem;
  }

  section#collection {
    justify-self: start;
    width: 100%;
  }

  section#collection .bg-box {
    width: 100%;
    max-width: 320px;
    padding: 1.25rem;
    min-height: 250px;
  }

  .set-card {
    height: 56px;
  }

  #collection-sets-list {
    row-gap: 0.6rem;
  }

  div#collection-buttons {
    gap: 0.4rem;
  }

  div#collection-buttons div#btns-container {
    gap: 0.4rem;
  }

  #trash-set-btn, #add-to-set-btn, #add-set-btn {
    height: 34px;
    padding: 0 0.65rem;
    font-size: 0.85rem;
  }

  #trash-set-btn {
    width: 36px;
    min-width: 36px;
    flex-shrink: 0;
  }
}