/* Local stylesheet. Tailwind CDN provides utilities; this file holds
   tokens, base styles, and brand-aware overrides that need to react to
   the runtime --brand variable. */

:root {
  /* Brand color is overwritten at runtime from tenant.primary_color. */
  --brand: #b8261c;
  --on-brand: #ffffff;
  /* Ozturk-inspired neutrals: deep navy ink, warm off-white paper. */
  --ink: #0a1628;
  --ink-2: #142238;
  --paper: #fbfaf7;
  --paper-2: #f3efe8;
  --line: #e6e2da;
  --muted: #5b6b7f;
}

html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display heading: fluid sizing so a long tenant name like
   "Ozturk Holding" fits at 320px AND scales up on desktop without
   a dozen Tailwind breakpoint utilities. clamp(min, fluid, max).
   Uses !important to win over Tailwind text-* utilities, which the
   CDN injects after our <link> and would otherwise dominate the
   cascade. */
.display {
  font-size: clamp(1.65rem, 5.5vw + 0.6rem, 4rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.08 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand);
}

/* Top "ribbon" — a thin brand-colored accent line under the dark nav. */
.brand-ribbon { background: var(--brand); height: 3px; }

.ink-bg { background: var(--ink); color: #f6f7fb; }
.ink-2-bg { background: var(--ink-2); color: #f6f7fb; }

/* Brand button: flat, confident, large tap target. */
.btn-brand {
  background: var(--brand);
  color: var(--on-brand);
  border: 1px solid var(--brand);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: filter 120ms ease, transform 120ms ease;
}
.btn-brand:hover:not(:disabled) { filter: brightness(0.92); }
.btn-brand:active:not(:disabled) { transform: translateY(1px); }
.btn-brand:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
.btn-ghost:hover { background: var(--paper-2); }

/* Inputs */
.input {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

/* Brand-colored inline link */
.brand-link { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.brand-link:hover { text-decoration-color: var(--brand); }

/* Result panels */
.panel {
  border-radius: 14px;
  padding: 1.25rem 1.25rem;
  border: 1px solid;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.panel .icon {
  flex: 0 0 auto;
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.panel-ok { background: #ecfdf5; border-color: #a7f3d0; color: #064e3b; }
.panel-ok .icon { background: #10b981; color: #fff; }
.panel-bad { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.panel-bad .icon { background: #dc2626; color: #fff; }
.panel-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.panel-warn .icon { background: #d97706; color: #fff; }
.panel-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.panel-info .icon { background: #2563eb; color: #fff; }

/* Channel list rows */
.channel-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.channel-group-title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  z-index: 50;
}

/* Spinner */
.spinner {
  width: 1.05rem; height: 1.05rem;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--on-brand) 35%, transparent);
  border-top-color: var(--on-brand);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hairline divider */
.hairline { background: var(--line); height: 1px; width: 100%; }

/* Hero gradient overlay for the dark band */
.hero-dark {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(800px 300px at 0% 110%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    var(--ink);
}

/* Focus ring for keyboard users (links/buttons) */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
