/* Shared components used by the game, leaderboard and admin pages. */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-md);
  border: 1.5px solid transparent; font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast);
  -webkit-tap-highlight-color: transparent; text-decoration: none; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-press); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--blue); min-height: 44px; padding: 0 12px; }
.btn-ghost:hover:not(:disabled) { background: var(--blue-soft); }
.btn-danger { background: var(--danger-strong); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.92rem; border-radius: var(--r-sm); }
.btn:disabled { background: var(--disabled); color: #fff; cursor: not-allowed; border-color: transparent; box-shadow: none; }
.btn-secondary:disabled, .btn-ghost:disabled { background: var(--surface-dim); color: var(--muted-2); border-color: var(--line); }
.btn .spinner { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }

/* Form fields */
.field { display: grid; gap: 8px; }
.label { font-weight: 700; font-size: 0.95rem; }
.input {
  width: 100%; min-height: 56px; padding: 0 18px; border-radius: var(--r-md);
  border: 1.5px solid var(--border); background: var(--surface); font-size: 1.1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:hover { border-color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 31, 208, 0.15); }
.input[aria-invalid='true'] { border-color: var(--danger-strong); }
.field-error { color: var(--danger-strong); font-size: 0.92rem; font-weight: 600; }
.field-error:empty { display: none; }

/* Cards */
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); }

/* Avatar */
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
  background: var(--blue-soft); color: var(--blue);
}
.avatar-solid { background: var(--blue); color: #fff; }

/* Value icons, dots and chips */
.value-icon { width: 26px; height: 26px; object-fit: contain; }
.values-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.values-row .value { display: grid; justify-items: center; gap: 8px; font-weight: 700; font-size: 0.92rem; }
.values-row .value-icon { width: 36px; height: 36px; }
.value-dots { display: flex; gap: 6px; }
.value-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--border); background: var(--surface);
  transition: background var(--t-med) var(--ease), border-color var(--t-med);
}
.value-dot img { width: 18px; height: 18px; object-fit: contain; }
.value-dot.is-current { background: var(--blue); border-color: var(--blue); }
.value-dot.is-current img { filter: brightness(0) invert(1); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--r-pill); background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 0.95rem;
}
.chip img { width: 20px; height: 20px; object-fit: contain; }

/* Progress bar */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width 250ms linear; }

/* Values Day wordmark (replaces the "Values Day" text label). */
.vd-logo { display: block; height: 2rem; width: auto; max-width: 100%; }
.brand-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.adm-top .brand .vd-logo { height: 26px; }
