/* Currency symbol and field icons (moved from inline styles in index.html) */
.currency {
  position: absolute;
  left: 0.6em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #000;
  pointer-events: none;
}
.field-icon {
  position: absolute;
  left: 0.6em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
/* Clean stylesheet */
:root {
  --bg: #ffffff;
  --muted: #333333;
  --card: #ffffff;
  --border: #e6e6e6;
  --field-height: 38px;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
}
body {
  background: var(--bg);
  color: #000;
  font-size: 16px;
}
.navbar {
  background: #003399; /* EU blue */
  padding: 0.1em 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Nav inner layout: moved from inline styles in index.html */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-decoration: none;
}
h1 {
  font-size: 1.3em;
  margin-top: 1.5em;
}
h2 {
  font-size: 1.2em;
}
h3 {
  font-size: 1em;
  margin: 0;
}
/* Subtitle next to the brand inside the navbar */
.nav-subtitle {
  color: #ffcc00; /* EU yellow */
  margin-left: 10px;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

/* helper row to align brand + subtitle */
.nav-brand-row {
  display: flex;
  align-items: center;
}
.steps {
  color: var(--muted);
  margin-top: 1em;
  margin-bottom: 0.9em;
}
.steps ol {
  margin: 0;
  padding-left: 1.2em;
}
.steps ol li {
  margin-bottom: 0.6em;
  line-height: 1.2;
}

.container {
  max-width: 400px;
  margin: 0.8em auto;
  padding: 0 1em;
}
.hero {
  background: transparent;
  border-radius: 10px;
}
.top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.form {
  width: 100%;
  max-width: 320px;
}
.qrcode-wrap {
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.qr-below {
  width: 100%;
  text-align: center;
  font-size: 15px;
  margin: 4px 0 0 0;
}
.qrcode-wrap {
  flex: 0 0 calc(var(--field-height) * 3);
  height: calc(var(--field-height) * 3);
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  max-width: 260px;
}
.qrcode-wrap canvas,
#qrcode canvas {
  max-width: 100%;
  height: auto;
  display: block;
}
.form {
  flex: 1 1 auto;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  /* max-width removed to allow stretching up to QR */
}
.field {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* max-width removed to allow stretching up to QR */
}
/* position relative so the clear button can be positioned inside the field */
.field {
  position: relative;
}
input.error {
  border-color: #b00020;
  box-shadow: 0 0 0 4px rgba(176, 0, 32, 0.06);
}
label {
  display: flex;
  flex-direction: column;
  color: var(--muted);
}
input[type="text"],
input[type="number"],
input[type="search"] {
  font-size: 16px;
  padding: 0.3em 0.6em;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: 100%;
}

/* Native browser search inputs provide a clear button in many browsers */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0;
}
p {
  color: var(--muted);
  line-height: 1.5;
}
footer {
  margin-top: 26px;
  padding: 14px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 8px;
}

/* Global error area shown above QR+form */
.global-errors {
  color: #b00020;
  margin-bottom: 12px;
  min-height: 22px;
  font-size: 14px;
}

.qr-action-btn {
  width: 100%;
  margin-top: 0.4em;
  font-size: 16px;
  padding: 0.2em 0;
  background: #003399;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.qr-action-btn:hover,
.qr-action-btn:focus {
  background: #002266;
  outline: none;
}

@media (max-width: 320px) {
  .top-row {
    flex-direction: column;
  }
  .qrcode-wrap {
    align-self: center;
  }
  input[type="text"],
  input[type="number"],
  input[type="search"] {
    width: 100%;
    max-width: 100%;
  }
}
