/* Atoll theme for Forgejo — mirrors atoll-command-control tokens.css / components.css */
@import "./theme-forgejo-light.css";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* Atoll tokens */
  --atoll-text: oklch(22% 0.02 260);
  --atoll-glass: rgba(255, 255, 255, 0.65);
  --atoll-glass-strong: rgba(255, 255, 255, 0.78);
  --atoll-glass-border: rgba(255, 255, 255, 0.8);
  --atoll-border: rgba(0, 0, 0, 0.08);
  --atoll-input: oklch(97% 0.01 260);
  --atoll-pill: oklch(93% 0.03 260);
  --atoll-shadow: 0 12px 30px -16px rgba(60, 40, 120, 0.2);
  --atoll-gradient: linear-gradient(135deg, oklch(75% 0.15 220), oklch(55% 0.18 290));
  --atoll-page: radial-gradient(1200px 800px at 10% 0%, oklch(93% 0.05 210) 0%, transparent 55%),
    radial-gradient(1000px 700px at 90% 10%, oklch(92% 0.06 290) 0%, transparent 55%),
    radial-gradient(1400px 900px at 50% 100%, oklch(95% 0.04 250) 0%, transparent 60%), oklch(97% 0.01 250);

  /* Primary: Atoll near-black buttons with violet-blue accent */
  --color-primary: #1f1f23;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #18181b;
  --color-primary-dark-2: #111114;
  --color-primary-dark-3: #0c0c0e;
  --color-primary-dark-4: #070708;
  --color-primary-light-1: #3a3a42;
  --color-primary-light-2: #52525b;
  --color-primary-light-3: #71717a;
  --color-primary-light-4: #c9c3ee;
  --color-primary-light-5: #ddd8f6;
  --color-primary-light-6: #ece9fa;
  --color-primary-light-7: #f5f3fd;
  --color-primary-alpha-10: #1f1f2319;
  --color-primary-alpha-20: #1f1f2333;
  --color-primary-alpha-30: #1f1f234b;
  --color-primary-alpha-40: #1f1f2366;
  --color-primary-alpha-50: #1f1f2380;
  --color-primary-alpha-60: #1f1f2399;
  --color-primary-alpha-70: #1f1f23b3;
  --color-primary-alpha-80: #1f1f23cc;
  --color-primary-alpha-90: #1f1f23e1;
  --color-primary-hover: var(--color-primary-light-1);
  --color-primary-active: var(--color-primary-dark-4);

  --color-accent: #6a50d8;
  --color-small-accent: #ddd8f6;
  --color-highlight-fg: #b3a8ec;
  --color-highlight-bg: #f0edfb;
  --color-selection-bg: #6a50d8;
  --color-blue: #3b6fe0;
  --color-violet: #6a50d8;
  --color-purple: #8b5cf6;
  --color-indicator-active: #3b6fe0;
  --color-indicator-active-20: #3b6fe033;

  /* Status colours (Atoll status-* tokens) */
  --color-green: #2d8a52;
  --color-yellow: #b8860b;
  --color-red: #d6453d;
  --color-success-bg: oklch(94% 0.07 150);
  --color-success-border: oklch(88% 0.11 150);
  --color-success-text: oklch(30% 0.09 150);
  --color-warning-bg: oklch(95% 0.07 95);
  --color-warning-border: oklch(90% 0.11 95);
  --color-warning-text: oklch(38% 0.09 85);
  --color-error-bg: oklch(94% 0.06 25);
  --color-error-border: oklch(88% 0.12 25);
  --color-error-text: oklch(35% 0.15 25);
  --color-info-bg: oklch(95% 0.04 250);
  --color-info-border: oklch(88% 0.07 250);
  --color-info-text: oklch(35% 0.1 260);

  /* Surfaces */
  --color-body: transparent;
  --color-text: oklch(22% 0.02 260);
  --color-text-light: oklch(35% 0.02 260);
  --color-text-light-1: oklch(45% 0.02 260);
  --color-text-light-2: oklch(50% 0.02 260);
  --color-text-light-3: oklch(55% 0.02 260);
  --color-box-header: rgba(255, 255, 255, 0.55);
  --color-box-body: var(--atoll-glass);
  --color-card: var(--atoll-glass);
  --color-secondary-bg: var(--atoll-input);
  --color-menu: oklch(98% 0.01 270);
  --color-nav-bg: var(--atoll-glass-strong);
  --color-nav-hover-bg: var(--atoll-pill);
  --color-secondary-nav-bg: transparent;
  --color-header-wrapper: var(--atoll-glass-strong);
  --color-footer: transparent;
  --color-input-background: var(--atoll-input);
  --color-input-border: rgba(0, 0, 0, 0.1);
  --color-input-border-hover: rgba(0, 0, 0, 0.2);
  --color-light-border: var(--atoll-border);
  --color-hover: oklch(93% 0.03 260 / 0.7);
  --color-active: oklch(93% 0.03 260);
  --color-label-bg: var(--atoll-pill);
  --color-label-hover-bg: oklch(90% 0.04 260);
  --color-label-active-bg: oklch(87% 0.05 260);
  --color-shadow: rgba(60, 40, 120, 0.25);
  --color-markup-code-inline: var(--atoll-pill);
  --color-markup-code-block: var(--atoll-input);
  --color-code-bg: rgba(255, 255, 255, 0.7);
  --color-timeline: var(--atoll-border);
  --fancy-card-bg: var(--atoll-glass);
  --fancy-card-border: var(--atoll-glass-border);
}

html,
body {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif !important;
}

body {
  background: var(--atoll-page) fixed !important;
  color: var(--color-text);
  min-height: 100vh;
}

/* Top navbar: glass strip */
#navbar {
  background: var(--atoll-glass-strong) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--atoll-border) !important;
  box-shadow: none !important;
  /* backdrop-filter creates a stacking context; without z-index, later glass cards/buttons paint over open navbar dropdowns */
  position: relative;
  z-index: 100;
}
#navbar .item { border-radius: var(--radius, 14px); }
#navbar .navbar-left .item:first-child img { border-radius: 9px; }

/* Cards, boxes, segments */
.ui.segment,
.ui.attached.segment,
.ui.card,
.ui.cards > .card,
.page-content .ui.attached.table,
.ui.attached.table,
.repository.file.list #repo-files-table,
.ui.attached.header + .ui.attached.segment {
  border-color: var(--atoll-glass-border) !important;
}
.ui.segment,
.ui.card,
.ui.cards > .card,
.flex-list > .flex-item,
.ui.top.attached.header,
.ui.attached.segment,
.ui.attached.table {
  backdrop-filter: blur(16px);
}
.ui.segment:not(.attached),
.ui.card,
.ui.cards > .card {
  border-radius: 22px !important;
  box-shadow: var(--atoll-shadow) !important;
}
.ui.top.attached.header { border-radius: 22px 22px 0 0 !important; font-weight: 700; }
.ui.bottom.attached.segment,
.ui.attached.segment:last-child { border-radius: 0 0 22px 22px !important; }
.ui.attached.table { border-radius: 22px !important; overflow: hidden; box-shadow: var(--atoll-shadow); }

/* Buttons: near-black pills, like Atoll */
.ui.button,
.ui.buttons .button {
  border-radius: 999px !important;
  font-weight: 600;
}
.ui.primary.button,
.ui.primary.buttons .button {
  background: var(--color-primary) !important;
  color: #fff !important;
}
.ui.primary.button:hover { background: var(--color-primary-light-1) !important; }
.ui.green.button,
.ui.positive.button,
.ui.basic.green.button:hover {
  background: oklch(45% 0.15 150) !important;
  color: #fff !important;
}
.ui.red.button,
.ui.negative.button { background: oklch(55% 0.18 25) !important; color: #fff !important; }

/* Inputs */
.ui.input > input,
.ui.form input:not([type]),
.ui.form input[type="text"],
.ui.form input[type="password"],
.ui.form input[type="email"],
.ui.form input[type="search"],
.ui.form textarea,
.ui.selection.dropdown {
  border-radius: 14px !important;
  background: var(--atoll-input) !important;
}
.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:focus,
.ui.selection.active.dropdown {
  border-color: oklch(55% 0.18 290) !important;
  box-shadow: 0 0 0 3px oklch(55% 0.18 290 / 0.15) !important;
}

/* Pills: labels, counters */
.ui.label,
.ui.labels .label,
.ui.basic.label {
  border-radius: 999px !important;
  font-weight: 600;
}
.ui.red.label.notification_count,
.ui.primary.labels .label {
  background: var(--atoll-gradient) !important;
}

/* Tabs / menus */
.ui.secondary.pointing.menu .active.item {
  border-color: oklch(55% 0.18 290) !important;
  color: var(--color-text) !important;
}
.ui.menu,
.ui.vertical.menu { border-radius: 22px; }
/* Dropdowns / popups must be opaque: translucent glass lets page text bleed through */
.ui.dropdown .menu,
details.dropdown > .content,
.ui.popup,
.tippy-box,
.ui.menu .dropdown.item .menu {
  border-radius: 14px !important;
  background: oklch(98% 0.01 270) !important;
  backdrop-filter: none !important;
  box-shadow: var(--atoll-shadow) !important;
}

/* Modals / confirm dialogs must be opaque too (same bleed-through problem as dropdowns) */
.ui.modal,
.ui.modal > .header,
.ui.modal > .content,
.ui.modal > .actions {
  background: oklch(98% 0.01 270) !important;
  backdrop-filter: none !important;
  color: var(--color-text);
}
.ui.modal { border-radius: 22px !important; overflow: hidden; box-shadow: var(--atoll-shadow) !important; }
.ui.modal > .header { border-bottom: 1px solid var(--atoll-border) !important; }
.ui.modal > .actions { border-top: 1px solid var(--atoll-border) !important; }

/* Avatars use the brand gradient as a fallback background */
.ui.avatar,
img.avatar {
  border-radius: 50% !important;
  background: var(--atoll-gradient);
}

/* Links & accents */
a { color: oklch(48% 0.18 275); }
a:hover { color: oklch(38% 0.2 285); }
.repository .ui.segment.sub-menu .item.active,
.ui.active.progress .bar { background: var(--atoll-gradient) !important; }

/* Footer */
.page-footer { color: var(--color-text-light-3); background: transparent !important; border: 0 !important; }

/* Login / landing hero */
.page-content.home .hero h1,
.page-content.home .hero h2 {
  background: var(--atoll-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}
