/**
 * PITPAD // Remote Scorer Pad Stylesheet (Mobile & Tablet Hardware Controller)
 */

.scorer-body {
  background-color: #050507;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.scorer-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  background-color: #0b0b0f;
  border-left: 1px solid #262633;
  border-right: 1px solid #262633;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

/* Scorer Top Bar */
.scorer-header {
  background-color: #07070a;
  border-bottom: 2px solid #e11d48;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scorer-clock-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  background-color: #050507;
  border: 1px solid rgba(225, 29, 72, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phase-pill-small {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.btn-clock-trigger {
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

/* Alliance Selection Tabs */
.alliance-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.6rem;
  gap: 0.6rem;
  background-color: #07070a;
  border-bottom: 1px solid #262633;
}

.alliance-tab-btn {
  padding: 0.8rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  border: 2px solid #262633;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  color: #8e8ea0;
  background-color: #121218;
}

.alliance-tab-btn.red.active {
  background: linear-gradient(135deg, #ff1e42 0%, #9f1239 100%);
  color: #ffffff;
  border-color: #fb7185;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.45);
}

.alliance-tab-btn.blue.active {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.45);
}

/* Fast Action Tap Section */
.fast-tap-container {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hive-tip-tap-btn {
  background: linear-gradient(135deg, #ff1e42 0%, #881337 100%);
  color: #ffffff;
  border: 2px solid #fb7185;
  border-radius: 14px;
  padding: 1.85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.35);
  transition: transform 0.08s ease, filter 0.08s ease;
  position: relative;
  overflow: hidden;
}

.hive-tip-tap-btn:active {
  transform: scale(0.97);
  filter: brightness(1.2);
}

.tap-btn-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nectar-unlock-status {
  font-size: 0.82rem;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tip-count-readout {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
}

/* Foul Tap Actions */
.foul-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.foul-card {
  background-color: #13131a;
  border: 1px solid #262633;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: center;
}

.foul-card-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #d4d4d8;
  text-transform: uppercase;
}

.foul-btn-tap {
  background-color: #e11d48;
  color: #ffffff;
  border: 1px solid #fb7185;
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.foul-btn-tap:active {
  transform: scale(0.96);
  background-color: #be123c;
}

.foul-btn-undo {
  background-color: #1e1e28;
  color: #a1a1aa;
  border: 1px solid #262633;
  border-radius: 6px;
  padding: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* Post Match Audit Form */
.audit-form-container {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: #08080c;
  border-top: 2px solid #262633;
}

.audit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #262633;
  padding-bottom: 0.5rem;
}

.audit-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Robot Toggle Cards (Leave & Park) */
.robot-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.toggle-card {
  background-color: #13131a;
  border: 1px solid #262633;
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toggle-card-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fb7185;
}

.checkbox-pill-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f4f4f6;
  cursor: pointer;
  background-color: #08080c;
  border: 1px solid #262633;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
}

.checkbox-pill input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff1e42;
}

/* Stepper Control for counts */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #13131a;
  border: 1px solid #262633;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.stepper-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f4f4f6;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-stepper {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #3f3f4e;
  background-color: #1e1e28;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-stepper:active {
  background-color: #e11d48;
}

.stepper-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 26px;
  text-align: center;
}

/* 4 Flower Inspectors */
.flowers-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.flower-card {
  background-color: #13131a;
  border: 1px solid #262633;
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.flower-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ff1e42;
}

.flower-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.color-select-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.color-select-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8e8ea0;
  text-transform: uppercase;
}

.color-select {
  background-color: #08080c;
  color: #ffffff;
  border: 1px solid #262633;
  border-radius: 6px;
  padding: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Disciplinary Cards Section */
.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.card-toggle-btn {
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #262633;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  background-color: #13131a;
  color: #8e8ea0;
}

.card-toggle-btn.yellow.active {
  background-color: #facc15;
  color: #000000;
  border-color: #eab308;
}

.card-toggle-btn.red.active {
  background-color: #ff1e42;
  color: #ffffff;
  border-color: #fb7185;
}

/* Live Preview Bar & Commit */
.audit-commit-footer {
  position: sticky;
  bottom: 0;
  background-color: #07070a;
  border-top: 2px solid #e11d48;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  z-index: 50;
}

.preview-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.preview-score-text {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
}

.btn-commit-audit {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff1e42 0%, #881337 100%);
  color: #ffffff;
  border: 1px solid #fb7185;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.45);
}

.btn-commit-audit:active {
  transform: scale(0.98);
}

/* ==========================================================================
   LIGHT THEME OVERRIDES FOR REMOTE SCORER HANDHELD
   ========================================================================== */
[data-theme="light"] .scorer-body {
  background-color: #e2e8f0;
  color: #09090b;
}

[data-theme="light"] .scorer-app {
  background-color: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.12);
  color: #09090b;
}

[data-theme="light"] .scorer-header,
[data-theme="light"] .alliance-tab-bar,
[data-theme="light"] .audit-commit-footer {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #09090b;
}

[data-theme="light"] .scorer-header div[style*="color: #fff"] {
  color: #09090b !important;
}

[data-theme="light"] .scorer-clock-pill {
  background-color: #ffffff;
  color: #09090b;
  border-color: #e11d48;
}

[data-theme="light"] .alliance-tab-btn {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

[data-theme="light"] .alliance-tab-btn.red.active,
[data-theme="light"] .alliance-tab-btn.blue.active {
  color: #ffffff !important;
}

[data-theme="light"] .audit-form-container {
  background-color: #f8fafc;
  border-top-color: #cbd5e1;
  color: #09090b;
}

[data-theme="light"] .audit-section-header {
  border-bottom-color: #cbd5e1;
}

[data-theme="light"] .audit-section-title,
[data-theme="light"] .foul-card-title,
[data-theme="light"] .stepper-label,
[data-theme="light"] .stepper-val,
[data-theme="light"] .checkbox-pill {
  color: #09090b !important;
}

[data-theme="light"] .foul-card,
[data-theme="light"] .toggle-card,
[data-theme="light"] .stepper-row,
[data-theme="light"] .flower-card {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #09090b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .checkbox-pill,
[data-theme="light"] .color-select {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #09090b;
}

[data-theme="light"] .foul-btn-undo,
[data-theme="light"] .btn-stepper,
[data-theme="light"] .card-toggle-btn:not(.active) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #09090b;
}

