@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/*
 * Nordic Warmth & Human Clarity — design tokens
 *
 * Scope: [data-theme="nordic-warm"] on <html> activates this theme.
 * :root provides the same values as the default so plain HTML with no
 * data-theme attribute also gets Nordic Warm styling.
 *
 * To add a new theme: add a [data-theme="your-theme"] block that
 * redefines any or all of these properties.
 */

:root,
[data-theme="nordic-warm"] {
  /* ── Surfaces ─────────────────────────────────────── */
  --color-canvas:     #FAF7F2; /* page background */
  --color-surface-1:  #F4EFEB; /* inset panels, sidebars */
  --color-surface-2:  #EDE6DD; /* deep inset zones */
  --color-card:       #FFFFFF; /* elevated tactile cards only */

  /* ── Brand ────────────────────────────────────────── */
  --color-primary:          #1E3A2F; /* Forest Pine — CTAs, headers */
  --color-on-primary:       #FAF7F2;
  --color-primary-dim:      #304C41; /* active/hover state */

  /* ── Urgent / Alert ───────────────────────────────── */
  --color-secondary:          #C85A32; /* Terracotta — urgent only */
  --color-on-secondary:       #FFFFFF;
  --color-secondary-surface:  #FBECE5; /* soft terracotta chip fill */
  --color-on-secondary-surface: #C85A32;

  /* ── Success / Serving ────────────────────────────── */
  --color-success:            #3B6B55; /* Botanical Sage */
  --color-success-surface:    #E8EFE9;
  --color-on-success-surface: #1E3A2F;

  /* ── Text ─────────────────────────────────────────── */
  --color-text:           #1C1E1B; /* primary body */
  --color-text-secondary: #444742; /* warm charcoal */
  --color-text-muted:     #686C65; /* timestamps, meta */

  /* ── Borders ──────────────────────────────────────── */
  --color-border:       #E5DFD5; /* hairline dividers */
  --color-border-strong: #D8D0C4; /* secondary input borders */

  /* ── Error ────────────────────────────────────────── */
  --color-error:            #BA1A1A;
  --color-error-surface:    #FFDAD6;
  --color-on-error-surface: #93000A;

  /* ── Typography ───────────────────────────────────── */
  --font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --letter-spacing-heading: -0.02em; /* all display/section headings */

  /* ── Corner radii ─────────────────────────────────── */
  --radius-sm:      0.25rem;  /*  4px */
  --radius-default: 0.5rem;   /*  8px */
  --radius-md:      0.75rem;  /* 12px — buttons, inputs */
  --radius-lg:      1rem;     /* 16px — cards */
  --radius-xl:      1.5rem;   /* 24px — ticket pods, TV cards */
  --radius-full:    9999px;   /* pill chips */

  /* ── Spacing ──────────────────────────────────────── */
  --space-xs: 0.25rem;  /*  4px */
  --space-sm: 0.5rem;   /*  8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2.5rem;   /* 40px */

  /* ── Elevation (warm umber-tinted shadows) ────────── */
  --shadow-card:  0 4px 20px -2px rgba(44,38,30,0.05),
                  0 1px 3px 0 rgba(44,38,30,0.03);
  --shadow-modal: 0 16px 36px -4px rgba(30,58,47,0.08),
                  0 4px 12px -2px rgba(44,38,30,0.04);
}

/* ── Connection status pills ──────────────────────────
   Used on staff panel (persistent), customer view (offline only), TV display.
   ──────────────────────────────────────────────────── */
.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.conn-connected  { background: #E8EFE9; color: #1E3A2F; }
.conn-connecting { background: #F4EFEB; color: #686C65; }
.conn-offline    { background: #FBECE5; color: #C85A32; }

/* ── TV Storskærm dark variant ────────────────────────
   Apply with <html data-theme="nordic-warm" data-display="tv">
   ──────────────────────────────────────────────────── */
[data-display="tv"] {
  --color-canvas:    #15201B;
  --color-surface-1: #1E2823;
  --color-card:      #1E2823;
  --color-text:      #F4EFEB;
  --color-text-secondary: #D8D0C4;
  --color-text-muted:     #9FB8AD;
  --color-border:    #2C3D36;
  --color-secondary: #E27147; /* illuminated terracotta */
  --color-success:   #72A88E; /* high-luminance sage */
  --color-on-primary: #F4EFEB;
}
