@import "/lib/css/base-reset.css";
@import "/lib/css/fonts/family-inter.css";
@import "./icons.css";

:root {
  --canvas: #fff;
  --gray-bg: #f5f5f5;
  --btn-hover: #bdbdbd;
  --text-gray: #424242;
  --canvas-text: #212121;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #212121;
    --gray-bg: #000;
    --btn-hover: #424242;
    --text-gray: #bdbdbd;
    --canvas-text: #fff;
  }
}

html {
  font-size: 12pt;
}
@media (min-width: 768px) {
  html {
    font-size: 14pt;
  }
}

body {
  padding: 1rem;
  font-family: var(--family-inter);
  font-weight: 500;
  color: var(--canvas-text);
  background-color: var(--gray-bg);
}

input,
button {
  font: inherit;
}

.container {
  max-width: 1280px;
  margin: auto;
}
.wrapper {
  margin-bottom: 5rem;
  padding: 0.25rem 0;
  background-color: var(--canvas);
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  border-radius: 1rem;
}
.readme {
  padding: 1rem;
  padding-bottom: 0;
}
@media (min-width: 992px) {
  .sidebar {
    width: 25%;
    margin-top: 1rem;
    margin-right: 1rem;
  }
  .readme {
    width: 75%;
  }
}

#bulk-controls {
  border-bottom: 1px solid var(--btn-hover);
}

.mobile-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.25em 1em;
  color: var(--canvas-text);
  background-color: var(--canvas);
  border: 0;
  border-top: 1px solid var(--btn-hover);

  &:hover {
    background-color: var(--btn-hover);
  }
}
.toggle-icon::before {
  font-weight: bold;
  content: "↓";
}
.is-open .toggle-icon::before {
  content: "↑";
}

.deck-list {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 16px;
  list-style: none;
}
.deck {
  line-height: 1.15;
}
.deck-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.5ch;
  width: 100%;
  margin: 0.25em 0;
  padding: 0.5rem;
  border: 0;
  font-size: inherit;
  text-align: left;
  text-wrap: balance;
  color: var(--canvas-text);
  background-color: var(--canvas);
  border-radius: 0;
  cursor: pointer;
}
.deck-btn:hover {
  background-color: var(--btn-hover);
}
@media (min-width: 992px) {
  .deck-btn {
    border-radius: 0 0.25em 0.25em 0;
  }
}
.deck-icon {
  flex: none;
}
.deck-btn.is-checked {
  color: var(--canvas);
  background-color: var(--canvas-text);
}
.deck-btn.is-checked .deck-icon::before {
  font-family: inherit;
  font-weight: 900;
  content: "\f00c";
}

h1,
h2,
h3,
dt {
  margin: 2rem 0 1rem;
  line-height: 1.15;
}
h1 {
  margin: 1rem 0;
  font-size: 2.5rem;
}
h2 {
  font-size: 1.75rem;
}
h3,
dt {
  font-size: 1.25rem;
}

button {
  cursor: pointer;
}
a {
  color: var(--canvas-text);
}
p {
  margin: 1rem 0;
  text-wrap: pretty;
}

ol,
ul {
  padding-inline-start: 1.5em;
}
li {
  text-indent: 0.5em;
}

dt {
  font-weight: bold;
}
dd {
  margin: 1rem;
  margin-bottom: 2rem;
}

blockquote,
pre {
  margin: 0;
  padding: 1rem;
  color: var(--text-gray);
  overflow-x: auto;
  background-color: var(--gray-bg);
  border: 1px solid var(--btn-hover);
  border-radius: 0.5rem;
}
blockquote {
  font-style: italic;

  :first-child {
    margin-block-start: 0;
  }
  :last-child {
    margin-block-end: 0;
  }
}
pre {
  font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.75rem;
  font-weight: bold;
}

.plea {
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
}

.checkout {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-top: 1px solid var(--canvas-text);
  background-color: var(--canvas);
}
@media (min-width: 1140px) {
  .checkout {
    font-size: 1rem;
  }
}
.checkout-btn {
  display: block;
  flex: 1 1 0%;
  height: 3rem;
  margin-bottom: 0.375em;
  color: var(--canvas-text);
  padding: 0 1em;
  border: 0.25em solid var(--canvas-text);
  border-right-width: 0;
  font-weight: bold;
  line-height: 1.15;
  background-color: var(--canvas);
  border-radius: 0;
  box-shadow: 0 0.25em 0 0 var(--canvas-text);
  cursor: pointer;
}
.checkout-btn:hover,
.checkout-btn:focus {
  margin-top: 0;
  box-shadow: 0 0.5em 0 0 var(--canvas-text);
}
.checkout-btn:focus {
  outline: none;
  color: var(--canvas);
  background-color: var(--canvas-text);
}
.checkout-btn:active {
  margin-top: 0.5em;
  margin-bottom: 0.125em;
  box-shadow: none;
}

.flex {
  display: flex;
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1 1 0%;
}
.flex-break {
  flex-basis: 100%;
  height: 0;
  content: "";
}
@media (max-width: 991px) {
  .hidden-sm {
    display: none;
  }
  .checkout-btn:first-of-type {
    border-radius: 0.5em 0 0 0.5em;
  }
  .checkout-btn:last-of-type {
    border-right-width: 0.25em;
    border-radius: 0 0.5em 0.5em 0;
  }
}
@media (min-width: 992px) {
  .flex-lg {
    display: flex;
  }
  .checkout-btn {
    flex: none;
    display: table;
    margin: 0.25em;
    border-width: 0.25em;
    border-radius: 0.5em;
  }
  .hidden-lg {
    display: none;
  }
}
.sm\:text-center {
  text-align: center;
}

/**
 * GITHUB CORNER
 * https://github.com/tholman/github-corners
 */
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-25deg);
  }
  40%,
  80% {
    transform: rotate(10deg);
  }
}
@media (max-width: 500px) {
  .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}

.hidden {
  display: none;
}

/* Screen-reader only */

@media (max-width: 991px) {
  .visually-hidden-sm {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .visually-hidden-sm:focus,
  .visually-hidden-sm:focus-within {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.visually-hidden:focus,
.visually-hidden:focus-within,
.not-visually-hidden {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}
