/* ==========================================================================
   Horizonte3 — QR Generator — Light Theme Only (with purple accents)
   ========================================================================== */

/* Adjust these hex values to match your exact brand tones */
:root {
  --brand: #0aa84f; /* green from your current palette */
  --brand-ink: #0b6b35;

  --accent: #6b4cd6; /* primary purple accent */
  --accent-ink: #4a35a3; /* darker purple for text and hovers */
  --accent-soft: #f4f1ff; /* very light purple for subtle backgrounds */

  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1e1f22;
  --text-strong: #111318;
  --muted: #6b6f76;
  --line: #e6e7ea;
}

/* Base */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Rubik',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layout */
.container {
  max-width: 760px;
  padding: 0 20px 64px;
  margin: 0 auto;
}

/* Header */
.site-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  border: 2px solid color-mix(in srgb, var(--brand) 50%, transparent);
  box-shadow: 0 1px 0 rgba(18, 20, 23, 0.06);
  flex: none;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 45%, var(--muted));
}

h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 1px 2px rgba(18, 20, 23, 0.05);
}

.intro {
  margin-top: 0;
  color: var(--muted);
}

/* Form */
.field {
  margin-bottom: 14px;
}
.field-grid {
  display: grid;
  gap: 12px;
}
.field-grid--datetime {
  grid-template-columns: 1fr;
}
.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .field-group {
    grid-template-columns: 1fr;
  }
}

label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* Inputs */
input[type='text'],
input[type='date'],
input[type='time'] {
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border: 1px solid #c8ccd1;
  border-radius: 6px;
  background: #fff;
  color: var(--text-strong);
  caret-color: var(--text-strong);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

input::placeholder {
  color: #5a5f66;
  opacity: 1;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
  background: #fff;
}

input:invalid {
  border-color: #d9534f;
}

/* Buttons */
button {
  font: inherit;
  line-height: 1;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.02s ease,
    filter 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.actions {
  margin-top: 6px;
}

/* Primary action now uses purple to emphasize brand mark */
button[type='submit'] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

button[type='submit']:hover {
  filter: brightness(0.96);
}
button[type='submit']:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Status */
#status {
  margin: 8px 2px 0;
  font-size: 13px;
  color: var(--muted);
}

/* Result Card */
.result-card h2 {
  margin: 4px 0 12px;
  font-size: 18px;
  font-weight: 600;
}

#qr-canvas {
  display: block;
  margin: 8px auto 12px;
  image-rendering: pixelated;
}

/* Keep download button neutral, add subtle purple hover */
.download-button {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.download-button:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

/* Link Preview */
.link-preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 6px;
  background: var(--accent-soft);
}

.link-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: color-mix(in srgb, var(--accent) 50%, var(--muted));
}

/* Make the share link purple, sober underline */
#wa-link {
  word-break: break-all;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-ink) 40%, transparent);
}
#wa-link:hover {
  text-decoration: underline;
}

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

/* Footer */
.site-footer {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 12px 20px 32px;
  color: var(--muted);
}

/* Optional helper classes if you ever want to use green for success actions */
.button--success {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.text--success {
  color: var(--brand-ink);
}
.border--success {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}
