/* Tokens come from brand/tokens.css (synced from mtgkubbur.is).
   This file styles skrá's tournament components against those shared tokens,
   theme-aware (light + dark). */
* {
  box-sizing: border-box;
}
#app {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}
h1,
h2 {
  margin: 0.4em 0;
}
label {
  display: block;
  margin: 0.5rem 0;
}
input,
select,
button {
  font: inherit;
}
input,
select {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-body);
}
button {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text-body);
  cursor: pointer;
}
button.primary {
  background: var(--mtg-blue);
  color: #fff;
  border-color: var(--mtg-blue);
  font-weight: 600;
}
button:disabled {
  opacity: 0.45;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  width: auto;
  margin: 0;
}
.chip input {
  width: auto;
}
.addrow {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0;
}
.addrow input {
  flex: 1;
}
.bar {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-default);
}
.warn {
  background: color-mix(in srgb, var(--mtg-red) 12%, var(--body-bg));
  border: 1px solid var(--mtg-red);
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  margin: 0.6rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.warn button {
  padding: 0.4rem 0.7rem;
}
.bye {
  color: var(--text-muted);
}
.matches {
  list-style: none;
  padding: 0;
}
.match {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 0.7rem;
  margin: 0.6rem 0;
}
.match.done {
  opacity: 0.7;
}
.vs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vs .pick {
  flex: 1;
  text-align: center;
}
.pick.lead {
  outline: 2px solid var(--mtg-green);
}
.row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  color: var(--text-muted);
}
.row2 .undo,
.row2 .finish {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border-default);
}
.actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
  padding: 12px;
  background: var(--body-bg);
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .actions {
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.35);
}
.actions button {
  flex: 1;
}
.standings {
  width: 100%;
  border-collapse: collapse;
}
.standings th,
.standings td {
  padding: 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}
.err {
  color: var(--mtg-red);
  min-height: 1.2em;
}
.hint {
  color: var(--text-muted);
}
code {
  background: var(--surface-soft);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.pods {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.pods .pod {
  width: auto;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  opacity: 0.55;
}
.pods .pod.active {
  opacity: 1;
  font-weight: 600;
  border-color: var(--mtg-blue);
}
.mode {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
}
.mode label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
}
.mode input {
  width: auto;
}
.podlist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.podlist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-default);
}
.podlist .rmpod {
  width: auto;
  padding: 0.2rem 0.5rem;
  background: transparent;
}
.seating {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}
.seating li {
  padding: 0.25rem 0;
}
.pairlist {
  list-style: none;
  padding: 0;
}
.pairlist li {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.7rem;
  margin: 0.4rem 0;
  text-align: center;
}
.pairlist li span {
  color: var(--text-muted);
  margin: 0 0.4rem;
}
.linkbtn {
  width: auto;
  background: transparent;
  border: none;
  color: var(--mtg-blue);
  padding: 0 0 0 0.4rem;
  font-size: 0.85em;
}
.row2 .reopen {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border-default);
}
.share {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}
.sharelink {
  color: var(--mtg-blue);
}
.linkbtn.danger {
  color: var(--mtg-red);
}
.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0;
  min-height: 1.4rem;
  align-items: center;
}
.token {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.3rem 0.4rem 0.3rem 0.7rem;
}
.token .x {
  width: auto;
  padding: 0 0.15rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15em;
  line-height: 1;
  cursor: pointer;
}
.combo {
  position: relative;
}
.suggest {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.suggest li {
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-default);
}
.suggest li:last-child {
  border-bottom: none;
}
.suggest li:hover {
  background: var(--surface-soft);
}
.suggest li.new {
  color: var(--mtg-blue);
}
