:root {
  --color-background: #080a0c;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.5);
  --color-primary: #ff6e50;
  --color-secondary: #051e83;
  --color-primary-dim: rgba(255, 110, 80, 0.14);
  --color-secondary-dim: rgba(5, 30, 131, 0.14);
  --toolbar-padding: 15px;
  --toolbar-spacing: 6px;
  --gradient-brand: linear-gradient(
    150deg,
    #051e83 0%,
    #051e83 25%,
    #0e227e 29.2%,
    #202976 33.3%,
    #3b336b 37.5%,
    #5d3e60 41.7%,
    #824a56 45.8%,
    #a6554e 50%,
    #c55f4a 54.2%,
    #df6749 58.3%,
    #f16c4b 62.5%,
    #fb6e4e 66.7%,
    #fe6e50 70.8%,
    #ff6e50 75%,
    #ff6e50 100%
  );
  --gradient-accent: linear-gradient(90deg, #051e83, #ff6e50);
  --chart-positive: #82f48b;
  --chart-negative: #fe2f2f;
}

.blurred-circle {
  display: flex;
  width: 48px;
  height: 48px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: none;
  outline: none;
  border-radius: 50px;
  color: white;
  box-shadow: 0 0 30px -5px rgba(255, 255, 255, 0.25) inset;
  background: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: box-shadow 0.2s ease-in-out;
}

.blurred-circle:hover {
  box-shadow: 0 0 10px 0px rgba(255, 255, 255, 0.7) inset;
}

.blurred-circle:active {
  transform: scale(0.95);
}

.blurred-circle img,
.blurred-circle .icon {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.blurred-circle .lang-text {
  font-size: 12px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

/* ─── Buttons ─────────────────────────────────────────────── */

.button {
  pointer-events: auto;
  width: var(--button-width, auto);
  max-width: var(--button-max-width, none);
  margin: var(--button-margin, 0);
  margin-bottom: var(--button-margin-bottom, 0);
  padding: 20px 0;
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 900;
  color: var(--color-text-primary);
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;

  &:active {
    transform: scale(0.98);
  }

  &.primary {
    background: var(--gradient-brand);
    background-size: 225% 225%;
    background-position: 45% 0%;
    box-shadow: 0 0 15px 0 rgba(255, 255, 255, 0.275) inset;
    transition: background-position 0.5s ease-out, box-shadow 0.3s ease-in-out;

    &:hover {
      background-position: 100% 100%;
      box-shadow: 0 0 20px 0 rgba(255, 255, 255, 0.65) inset;
    }
  }

  &.secondary {
    background: transparent;
    border: none;
    box-shadow: 0 0 40px -5px rgba(255, 255, 255, 0.3) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.2s ease-in-out;

    &:hover {
      box-shadow: 0 0 10px 0px rgba(255, 255, 255, 0.7) inset;
    }
  }

  @media (max-width: 768px) {
    padding: 12px 14px;
    font-size: 15px;
  }

  @media (max-width: 480px) {
    padding: 11px 12px;
    font-size: 14px;
  }
}

.button-text {
  display: inline-block;
  padding-left: 20px;
  padding-right: 20px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
}

/* ─── App Topbar Component ──────────────────────────────── */

app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--toolbar-padding);
  padding-top: max(var(--toolbar-padding), env(safe-area-inset-top, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;

  .topbar-left,
  .topbar-right {
    display: flex;
    gap: var(--toolbar-spacing);
    align-items: center;
  }

  .topbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    gap: 12px;
  }

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 12, 0.88);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    opacity: 0;
    transition: opacity 0.22s ease-in-out;
    pointer-events: none;
    z-index: -1;
  }

  &.scrolled::before {
    opacity: 1;
  }

  /* Overlay variant — absolute-positioned over a hero image (e.g. detail page) */
  &.topbar-overlay {
    position: absolute;
    z-index: 5;
  }

  button,
  [role="button"],
  .blurred-circle {
    cursor: pointer;
  }
}

.toolbar-logo-icon {
  height: 40px;
  width: auto;
}

.toolbar-logo-text {
  font-size: 1.5rem;
  font-weight: 300;
  font-family: 'Figtree', sans-serif;
  color: #fff;
  letter-spacing: 0;
}

/* ─── Insight type-chip color variants ─────────────────────
   Used in both session-eval (ses-si-type--*)
   and agent-detail sessions (det-si-type--*).
────────────────────────────────────────────────────────── */
.ses-si-type--boolean,
.det-si-type--boolean {
  background: rgba(34, 150, 60, 0.22);
  color: rgba(130, 244, 139, 0.95);
  border-color: rgba(34, 150, 60, 0.6);
}

.ses-si-type--number,
.det-si-type--number {
  background: rgba(5, 30, 131, 0.28);
  color: rgba(140, 160, 255, 0.95);
  border-color: rgba(80, 110, 255, 0.8);
}

.ses-si-type--text,
.det-si-type--text {
  background: rgba(180, 70, 0, 0.25);
  color: rgba(255, 135, 50, 0.95);
  border-color: rgba(220, 100, 20, 0.7);
}

.ses-si-type--list,
.det-si-type--list {
  background: rgba(100, 30, 180, 0.25);
  color: rgba(200, 150, 255, 0.95);
  border-color: rgba(160, 80, 255, 0.7);
}

