/*
 * Ignara Athletic Design System
 * Charcoal-dark, high-contrast training aesthetic with fire accents
 */

:root {
  --resolute-bg: #101113;
  --resolute-surface: #181A1E;
  --resolute-surface-low: #121417;
  --resolute-surface-highest: #343840;
  --resolute-on-surface: #F5F2EA;
  --resolute-on-surface-variant: #D8D2C7;
  --resolute-on-surface-muted: #9A9A9A;
  --resolute-primary: #F97316;
  --resolute-primary-container: #FFB020;
  --resolute-on-primary-container: #17120A;
  --resolute-success: #22C55E;
  --resolute-danger: #EF4444;
  --resolute-radius-sm: 0.125rem;
  --resolute-radius: 0.25rem;
  --resolute-radius-md: 0.375rem;
  --resolute-radius-lg: 0.5rem;
}

/* Base */
body {
  font-family: 'Lexend', sans-serif;
  background-color: var(--resolute-bg);
  color: var(--resolute-on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography utilities */
.font-lexend {
  font-family: 'Lexend', sans-serif;
}

/* Card surfaces */
.resolute-card {
  background-color: var(--resolute-surface);
  border: 1px solid rgba(255, 176, 32, 0.1);
  border-radius: var(--resolute-radius);
}

.resolute-row {
  background-color: var(--resolute-surface-low);
  border-radius: var(--resolute-radius-sm);
}

.resolute-badge {
  background-color: var(--resolute-surface-highest);
  border-radius: var(--resolute-radius-sm);
}

/* Buttons */
.resolute-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  line-height: 1;
  border-radius: var(--resolute-radius);
  transition: transform 0.1s ease, background-color 0.15s ease;
  cursor: pointer;
  border: none;
}

.resolute-btn:active {
  transform: scale(0.95);
}

.resolute-btn-primary {
  background: linear-gradient(180deg, var(--resolute-primary-container), var(--resolute-primary));
  color: var(--resolute-on-primary-container);
  box-shadow: 0 0.75rem 1.5rem rgba(249, 115, 22, 0.22);
}

.resolute-btn-primary:hover {
  background-color: var(--resolute-primary);
  color: #1a0c05;
}

.resolute-btn-success {
  background: linear-gradient(180deg, #FACC15, #F97316);
  color: #1a0c05;
}

.resolute-btn-success:hover {
  background: linear-gradient(180deg, #FDE047, #EA580C);
}

.resolute-btn-danger {
  background-color: var(--resolute-danger);
  color: #fff;
}

.resolute-btn-ghost {
  background-color: transparent;
  color: var(--resolute-on-surface-variant);
}

.resolute-btn-ghost:hover {
  color: var(--resolute-on-surface);
}

/* Inputs */
.resolute-input {
  background-color: var(--resolute-surface-low);
  border: 1px solid var(--resolute-surface-highest);
  color: var(--resolute-on-surface);
  border-radius: var(--resolute-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 16px;
  line-height: 1.5;
  width: 100%;
  transition: border-color 0.15s ease;
}

.resolute-input:focus {
  outline: none;
  border-color: var(--resolute-primary-container);
  box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.14);
}

.resolute-input::placeholder {
  color: var(--resolute-on-surface-muted);
}

/* Labels */
.resolute-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--resolute-on-surface-variant);
}

/* Numeric data */
.resolute-numeric {
  font-family: 'Lexend', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--resolute-on-surface);
}

/* Links */
.resolute-link {
  color: var(--resolute-primary-container);
  text-decoration: none;
  font-weight: 600;
}

.resolute-link:hover {
  text-decoration: underline;
}

/* Bottom nav */
.resolute-bottom-nav {
  background-color: var(--resolute-surface);
  border-top: 1px solid var(--resolute-surface-highest);
}

.resolute-bottom-nav a,
.resolute-bottom-nav button {
  color: var(--resolute-on-surface-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

.resolute-bottom-nav a:hover,
.resolute-bottom-nav a.active,
.resolute-bottom-nav button:hover {
  color: var(--resolute-primary-container);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--resolute-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--resolute-surface-highest);
  border-radius: 3px;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--resolute-surface-highest) var(--resolute-bg);
}

/* Flash messages */
.resolute-flash-alert {
  background-color: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--resolute-radius);
  font-size: 14px;
}

.resolute-flash-notice {
  background-color: rgba(34, 197, 94, 0.15);
  color: #86efac;
  padding: 0.75rem 1rem;
  border-radius: var(--resolute-radius);
  font-size: 14px;
}

/* Set state indicators */
.set-state-done {
  color: var(--resolute-success);
}

.set-state-failed {
  color: var(--resolute-danger);
}

.set-state-skipped {
  color: var(--resolute-on-surface-muted);
  text-decoration: line-through;
}

.set-state-pending {
  color: var(--resolute-on-surface-muted);
}

/* Error box */
.resolute-error-box {
  background-color: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--resolute-radius);
  font-size: 14px;
}

/* Top app bar */
.resolute-top-bar {
  background-color: var(--resolute-surface);
  border-bottom: 1px solid rgba(255, 176, 32, 0.1);
  height: 56px;
}

.resolute-set-menu {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(20rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  border: 1px solid var(--resolute-surface-highest);
  border-radius: var(--resolute-radius);
  background-color: var(--resolute-surface);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
}

.resolute-set-menu-button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--resolute-surface-highest);
  border-radius: var(--resolute-radius-sm);
  background-color: var(--resolute-surface-low);
  color: var(--resolute-on-surface);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.resolute-set-menu-button:active {
  transform: scale(0.97);
}

.resolute-plate-loader {
  display: flex;
  min-height: 11rem;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  overflow: hidden;
}

.resolute-bar-sleeve {
  width: clamp(3rem, 18vw, 5.5rem);
  height: 0.85rem;
  background: linear-gradient(90deg, transparent, #8b96a3 45%, #a8b0ba);
}

.resolute-bar-shaft {
  display: flex;
  width: clamp(4rem, 20vw, 6.5rem);
  height: 0.85rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--resolute-radius-sm);
  background-color: #a8b0ba;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.resolute-plate-stack {
  display: flex;
  min-width: 5rem;
  min-height: 8.5rem;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}

.resolute-plate {
  display: flex;
  width: clamp(1.25rem, 8vw, 2rem);
  height: clamp(4.75rem, 24vw, 7.5rem);
  align-items: center;
  justify-content: center;
  border-radius: var(--resolute-radius-sm);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

.resolute-plate-0 {
  background-color: var(--resolute-primary-container);
}

.resolute-plate-1 {
  background-color: var(--resolute-surface-highest);
}

.resolute-plate-2 {
  background-color: var(--resolute-primary);
}

.resolute-plate-3 {
  background-color: var(--resolute-on-surface-muted);
}

.resolute-bar-only {
  color: var(--resolute-on-surface-muted);
  font-size: 14px;
  font-weight: 700;
}
