/* ─────────────────────────────────────────────────────────────────────────────
   src/renderer/src/assets/main.css
   Entry CSS imported first in main.tsx.
   Pulls in the base browser reset (box-sizing, margins, font stack).
   All Horizon-specific tokens and overrides live in styles/global.css,
   which is imported directly after this file in main.tsx.
───────────────────────────────────────────────────────────────────────────── */
:root {
  --ev-c-white: #ffffff;
  --ev-c-white-soft: #f8f8f8;
  --ev-c-white-mute: #f2f2f2;

  --ev-c-black: #1b1b1f;
  --ev-c-black-soft: #222222;
  --ev-c-black-mute: #282828;

  --ev-c-gray-1: #515c67;
  --ev-c-gray-2: #414853;
  --ev-c-gray-3: #32363f;

  --ev-c-text-1: rgba(255, 255, 245, 0.86);
  --ev-c-text-2: rgba(235, 235, 245, 0.6);
  --ev-c-text-3: rgba(235, 235, 245, 0.38);

  --ev-button-alt-border: transparent;
  --ev-button-alt-text: var(--ev-c-text-1);
  --ev-button-alt-bg: var(--ev-c-gray-3);
  --ev-button-alt-hover-border: transparent;
  --ev-button-alt-hover-text: var(--ev-c-text-1);
  --ev-button-alt-hover-bg: var(--ev-c-gray-2);
}
:root {
  --color-background: var(--ev-c-black);
  --color-background-soft: var(--ev-c-black-soft);
  --color-background-mute: var(--ev-c-black-mute);

  --color-text: var(--ev-c-text-1);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}
ul {
  list-style: none;
}
body {
  min-height: 100vh;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.6;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue',
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
@layer properties {
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
    *, :before, :after, ::backdrop {
      --tw-border-style: solid;
    }
  }
}

@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
    --default-transition-duration: .15s;
    --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}

@layer base {
  *, :after, :before, ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  html, :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    line-height: 1.5;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }

  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    -webkit-text-decoration: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    vertical-align: middle;
    display: block;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  ::placeholder {
    opacity: 1;
  }

  @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentColor;
    }

    @supports (color: color-mix(in lab, red, red)) {
      ::placeholder {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-year-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-month-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-day-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-hour-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-minute-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-second-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-millisecond-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button, input:where([type="button"], [type="reset"], [type="submit"]) {
    appearance: button;
  }

  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  ::-webkit-outer-spin-button {
    height: auto;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer components;

@layer utilities {
  .absolute {
    position: absolute;
  }

  .fixed {
    position: fixed;
  }

  .relative {
    position: relative;
  }

  .block {
    display: block;
  }

  .flex {
    display: flex;
  }

  .hidden {
    display: none;
  }

  .inline-block {
    display: inline-block;
  }

  .table {
    display: table;
  }

  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }

  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
}

:root {
  --horizon-bg-deep: #07070d;
  --horizon-bg: #0b0b14;
  --horizon-bg-surface: #10101c;
  --horizon-bg-elevated: #16162a;
  --horizon-bg-hover: #1a1a2e;
  --horizon-bg-active: #20203a;
  --horizon-border: #ffffff0f;
  --horizon-border-bright: #a855f738;
  --horizon-border-focus: #a855f799;
  --horizon-accent: #a855f7;
  --horizon-accent-dim: #7c3aed;
  --horizon-accent-muted: #a855f71f;
  --horizon-glow: #a855f761;
  --horizon-glow-strong: #a855f7a6;
  --horizon-text: #fffff5e6;
  --horizon-text-dim: #ebebf58c;
  --horizon-text-faint: #ebebf54d;
  --horizon-text-accent: #a855f7;
  --horizon-green: #22c55e;
  --horizon-green-bg: #22c55e1f;
  --horizon-green-glow: #22c55e61;
  --horizon-yellow: #eab308;
  --horizon-yellow-bg: #eab3081f;
  --horizon-yellow-glow: #eab30861;
  --horizon-red: #ef4444;
  --horizon-red-bg: #ef44441f;
  --horizon-red-glow: #ef444461;
  --pin-execute: #fff;
  --pin-number: #22c55e;
  --pin-string: #eab308;
  --pin-bool: #ef4444;
  --pin-object: #3b82f6;
  --pin-array: #f97316;
  --pin-any: #9ca3af;
  --horizon-font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --horizon-font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
  --horizon-radius-sm: 4px;
  --horizon-radius: 8px;
  --horizon-radius-lg: 12px;
  --horizon-radius-xl: 16px;
  --horizon-transition-fast: 80ms ease;
  --horizon-transition: .15s ease;
  --horizon-transition-slow: .3s ease;
  --z-canvas: 10;
  --z-panels: 20;
  --z-toolbar: 30;
  --z-overlay: 40;
  --z-modal: 50;
  --z-toast: 60;
}

html, body {
  background: var(--horizon-bg-deep);
  width: 100%;
  height: 100%;
  color: var(--horizon-text);
  font-family: var(--horizon-font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

#root {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.selectable {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--horizon-bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--horizon-border-bright);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--horizon-accent-dim);
}

::selection {
  background: var(--horizon-accent-muted);
  color: var(--horizon-text);
}

:focus-visible {
  outline: 1.5px solid var(--horizon-border-focus);
  outline-offset: 2px;
  border-radius: var(--horizon-radius-sm);
}

@keyframes hz-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 28px var(--horizon-glow), 0 0 56px #a855f72e;
  }

  50% {
    box-shadow: 0 0 48px var(--horizon-glow-strong), 0 0 96px #a855f752;
  }
}

@keyframes hz-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .4;
    transform: scale(.72);
  }
}

@keyframes hz-progress-shimmer {
  0% {
    background-position: -100% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes hz-scanline-move {
  from {
    transform: translateY(-1px);
  }

  to {
    transform: translateY(100vh);
  }
}

@keyframes hz-flicker {
  0%, 92%, 100% {
    opacity: 1;
  }

  93% {
    opacity: .91;
  }

  96% {
    opacity: .97;
  }
}

@keyframes hz-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes hz-slide-up {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hz-logo-glow {
  animation: 2.8s ease-in-out infinite hz-glow-pulse;
}

.hz-dot-running {
  animation: .85s ease-in-out infinite hz-dot-pulse;
}

.hz-progress-bar {
  animation: 2.2s linear infinite hz-progress-shimmer;
}

.hz-scanlines-overlay {
  background: repeating-linear-gradient(0deg, #0000, #0000 3px, #0000000b 3px 4px);
  animation: 12s ease-in-out infinite hz-flicker;
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}
