/* ---------------------------------------------------------
   QR Code Scanner App – Mobile-First Touch Design
   Frimley Health Brand-Aligned Styles
--------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Istok+Web:wght@400;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg, #F7F8FA);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════ */
.app-header {
  background: var(--color-surface, #fff);
  padding: 24px 16px 20px;
  border-bottom: 1px solid var(--color-border, #e3e7ed);
}

.header-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.header-title {
  font-family: "Istok Web", Arial, sans-serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  color: var(--nhs-pink, #AE2573);
  margin: 0;
  line-height: 1.2;
  word-wrap: break-word;
  padding: 10px 0;
}

/* ══════════════════════════════════════════════════════
   MAIN CONTENT - Centered Mobile-First
   ══════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

/* Status message */
.status-message {
  font-size: 1.1rem;
  color: var(--color-muted, #5a6772);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════ */
.alert {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1rem;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

.alert-error {
  background: #fef2f2;
  color: #b42318;
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--tint-green-20, #cce7d6);
  color: #155724;
  border: 1px solid var(--nhs-green, #008834);
}

/* ══════════════════════════════════════════════════════
   SUBMIT BUTTON - Large Touch Target, Light Green
   ══════════════════════════════════════════════════════ */
.btn {
  width: 100%;
  padding: 20px 24px;
  border-radius: 12px;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  min-height: 64px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

.btn-submit {
  background: var(--nhs-green, #008834);
  color: #fff;
}

.btn-submit:hover {
  background: #006628;
}

.btn:disabled {
  background: #ccc !important;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* ══════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════ */
.btn:focus-visible {
  outline: 3px solid var(--focus-ring, #0b63ce);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE - Larger screens
   ══════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .main-content {
    padding: 40px 24px;
  }

  .btn {
    max-width: 320px;
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}
