/* suffix.gg UI components. Needs tokens.css. */

/* Blinking underscore after a heading or label */
.sfx-cursor {
  color: var(--sfx-red);
  animation: sfx-blink var(--sfx-blink) steps(1, end) infinite;
}

/* Display heading: the logo's type, never for body text */
.sfx-display {
  font-family: var(--sfx-font-display);
  font-weight: var(--sfx-display-weight);
  font-stretch: var(--sfx-display-stretch);
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

/* Buttons: slanted ends at the logo angle */
.sfx-btn {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  gap: var(--sfx-space-2);
  padding: 12px 26px;
  border: 0;
  font: italic 800 var(--sfx-text-sm) / 1 var(--sfx-font-body);
  font-stretch: 110%;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: background var(--sfx-fast) var(--sfx-ease), transform var(--sfx-fast) var(--sfx-ease);
}

.sfx-btn:active { transform: translateY(1px); }
.sfx-btn:focus-visible { outline: 2px solid var(--sfx-ink); outline-offset: 3px; }

.sfx-btn--primary { background: var(--sfx-red); color: var(--sfx-white); }
.sfx-btn--primary:hover { background: var(--sfx-red-hot); }
.sfx-btn--primary:active { background: var(--sfx-red-deep); }

.sfx-btn--ghost { background: var(--sfx-surface-2); color: var(--sfx-ink); }
.sfx-btn--ghost:hover { background: var(--sfx-surface-3); }

.sfx-btn--text {
  clip-path: none;
  padding-inline: 0;
  background: none;
  color: var(--sfx-ink);
}
.sfx-btn--text::before { content: "_"; color: var(--sfx-red); }
.sfx-btn--text:hover { color: var(--sfx-red-hot); }

.sfx-btn[disabled] {
  background: var(--sfx-surface-2);
  color: var(--sfx-grey-500);
  cursor: not-allowed;
}

/* Tags: game or status labels, mono, lowercase, underscore prefix */
.sfx-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--sfx-surface-2);
  color: var(--sfx-grey-300);
  font: 500 var(--sfx-text-xs) / 1.4 var(--sfx-font-mono);
}
.sfx-tag::before { content: "_"; color: var(--sfx-red); }
.sfx-tag--live { background: var(--sfx-red); color: var(--sfx-white); }
.sfx-tag--live::before { color: var(--sfx-white); }

/* Cards */
.sfx-card {
  position: relative;
  padding: var(--sfx-space-6);
  background: var(--sfx-surface-1);
  border: var(--sfx-border);
  border-radius: var(--sfx-radius);
}
.sfx-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 4px;
  background: var(--sfx-red);
}

/* Inputs */
.sfx-input {
  width: 100%;
  padding: 11px 12px;
  background: var(--sfx-surface-2);
  border: 0;
  border-bottom: 2px solid var(--sfx-surface-3);
  color: var(--sfx-ink);
  font: 400 var(--sfx-text-md) / 1.3 var(--sfx-font-body);
  caret-color: var(--sfx-red);
  transition: border-color var(--sfx-fast) var(--sfx-ease);
}
.sfx-input::placeholder { color: var(--sfx-grey-400); }
.sfx-input:focus { outline: none; border-bottom-color: var(--sfx-red); }

/* Toggle */
.sfx-toggle {
  appearance: none;
  position: relative;
  width: 44px;
  height: 22px;
  background: var(--sfx-surface-3);
  cursor: pointer;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  transition: background var(--sfx-base) var(--sfx-ease);
}
.sfx-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 16px;
  height: 16px;
  background: var(--sfx-grey-300);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
  transition: transform var(--sfx-base) var(--sfx-ease), background var(--sfx-base) var(--sfx-ease);
}
.sfx-toggle:checked { background: var(--sfx-red); }
.sfx-toggle:checked::after { transform: translateX(19px); background: var(--sfx-white); }
.sfx-toggle:focus-visible { outline: 2px solid var(--sfx-ink); outline-offset: 2px; }

/* In-game overlay panel: sits on top of a game, so it stays see-through */
.sfx-overlay {
  padding: var(--sfx-space-3) var(--sfx-space-4);
  background: rgb(10 10 11 / 0.72);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--sfx-red);
  color: var(--sfx-ink);
  font: 500 var(--sfx-text-sm) / 1.45 var(--sfx-font-body);
}

/* Toast */
.sfx-toast {
  display: flex;
  align-items: center;
  gap: var(--sfx-space-3);
  padding: var(--sfx-space-3) var(--sfx-space-4);
  background: var(--sfx-surface-2);
  border-left: 3px solid var(--sfx-red);
  color: var(--sfx-ink);
  font: 500 var(--sfx-text-sm) / 1.4 var(--sfx-font-body);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
}
