/* base.css */

:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --surface: #3a363b;
  --text: #f4eee8;
  --sub: #c6bcc1;
  --name: #ef7770;
  --accent: #ef9a72;
  --green: #84b59f;
  --mauve: #dfa0ba;
  --blue: #7db9dc;
  --radius-lg: 8px;
  --radius-md: 8px;
  --site-shell: min(1190px, calc(100% - 32px));
}

.agent-explore {
  position: relative;
  width: fit-content;
  margin-block: 1rem;
}
.agent-explore summary {
  cursor: pointer;
  list-style: none;
}
.agent-explore summary::-webkit-details-marker {
  display: none;
}
.agent-explore-menu {
  position: absolute;
  z-index: 5;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-start: 0;
  min-width: 10rem;
  padding: 0.4rem;
  border: 1px solid var(--surface);
  border-radius: 6px;
  background: var(--mantle);
  box-shadow: 0 6px 18px rgb(0 0 0 / 14%);
}
.agent-explore-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
}

* {
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  color-scheme: dark;
}

body {
  min-width: 0;
  overflow-x: clip;
  background: var(--base);
  color: var(--text);
  font-family: "Lato", Arial, Helvetica, sans-serif;
  min-height: 100vh;
  line-height: 1.5;

  position: relative;
  display: flex;
  flex-direction: column;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: color-mix(in srgb, var(--blue) 35%, var(--mantle));
  color: var(--text);
}

body::before {
  content: "";

  position: fixed;

  inset: 0;

  background: url("/assets/background-wave-92460060.svg") center/cover no-repeat;

  pointer-events: none;

  z-index: -1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  text-decoration: none;
  color: var(--blue);
  cursor: pointer;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::placeholder {
  color: var(--sub);
  opacity: 0.8;
}

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

button,
input,
select,
textarea,
summary,
a {
  outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--blue);
}

.action-button,
.hero-button,
.site-footer-cta,
.library-filters button,
.library-install summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--surface);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease,
    transform 0.12s ease;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--surface);
  border-radius: 6px;
  color: var(--sub);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.mini-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.action-button:hover,
.hero-button:hover,
.site-footer-cta:hover,
.library-filters button:hover,
.library-install summary:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.action-button:active,
.hero-button:active,
.site-footer-cta:active,
.library-filters button:active,
.library-install summary:active {
  transform: translateY(1px);
}

button:disabled,
.action-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--mantle) 84%, transparent);
  color: var(--text);
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

textarea {
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent);
}

[role="alert"] {
  padding: 10px 12px;
  border-left: 3px solid var(--name);
  background: color-mix(in srgb, var(--name) 10%, transparent);
}

.flash-message {
  margin-top: 20px;
  margin-bottom: -20px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--green) 70%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--green) 10%, var(--mantle));
}

.flash-message[data-flash-type="alert"] {
  border-color: color-mix(in srgb, var(--name) 70%, transparent);
  background: color-mix(in srgb, var(--name) 10%, var(--mantle));
}

.button_to {
  display: inline;
  margin: 0;
}

pre,
pre code {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  overflow-x: hidden;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: var(--radius-md);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  background: color-mix(in srgb, var(--mantle) 72%, transparent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-scroll th,
.table-scroll td {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 65%, transparent);
  text-align: left;
  vertical-align: top;
}

.table-scroll th {
  color: var(--sub);
  background: color-mix(in srgb, var(--surface) 36%, var(--mantle));
  font-size: 0.82rem;
  text-transform: uppercase;
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll tbody tr:hover {
  background: color-mix(in srgb, var(--blue) 6%, transparent);
}

.admin-page,
.admin-page > *,
.admin-page .management-section {
  min-width: 0;
}

.admin-page .summary-grid dd,
.admin-page .warning-block,
.admin-page .warning-block li {
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .admin-page {
    width: 100%;
    padding: 28px 14px 56px;
  }

  .admin-page .summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  }

  .admin-page .summary-grid dd {
    font-size: 1.05rem;
  }

  .admin-page .table-scroll {
    overflow: visible;
    border: 0;
  }

  .admin-page .table-scroll table,
  .admin-page .table-scroll tbody,
  .admin-page .table-scroll tr,
  .admin-page .table-scroll td {
    display: block;
    width: 100%;
    white-space: normal;
  }

  .admin-page .table-scroll thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .admin-page .table-scroll tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--surface) 80%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--mantle) 72%, transparent);
  }

  .admin-page .table-scroll td {
    display: grid;
    grid-template-columns: minmax(6rem, 35%) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    overflow-wrap: anywhere;
  }

  .admin-page .table-scroll td::before {
    content: attr(data-label);
    color: var(--sub);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.site-content {
  min-width: 0;
  flex: 1 0 auto;
}
