/* kilocode_change start — restore main's card visual style (border + background) while keeping upstream layout selectors */
[data-component="card"] {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--surface-inset-base);
  border: 1px solid var(--border-weaker-base);
  transition: background-color 0.15s ease;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  overflow: clip;

  /* upstream layout variables (used by card.tsx data-slot system) */
  --card-gap: 8px;
  --card-icon: 16px;
  --card-indent: 0px;
  --card-accent: var(--icon-active);

  &:has([data-slot="card-title"]) {
    gap: 8px;
  }

  &:has([data-slot="card-title-icon"]) {
    --card-indent: calc(var(--card-icon) + var(--card-gap));
  }

  :where([data-card="title"], [data-slot="card-title"]) {
    color: var(--text-strong);
    font-weight: var(--font-weight-medium);
  }

  :where([data-slot="card-title"]) {
    display: flex;
    align-items: center;
    gap: var(--card-gap);
  }

  :where([data-slot="card-title"]) [data-component="icon"] {
    color: var(--card-accent);
  }

  :where([data-slot="card-title-icon"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--card-icon);
    height: var(--card-icon);
    flex: 0 0 auto;
  }

  :where([data-slot="card-title-icon"][data-placeholder]) [data-component="icon"] {
    color: var(--text-weak);
  }

  :where([data-slot="card-title-icon"])
    [data-slot="icon-svg"]
    :is(path, line, polyline, polygon, rect, circle, ellipse)[stroke] {
    stroke-width: 1.5px !important;
  }

  :where([data-card="description"], [data-slot="card-description"]) {
    color: var(--text-base);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  :where([data-card="actions"], [data-slot="card-actions"]) {
    padding-left: var(--card-indent);
  }

  &[data-variant="error"] {
    background-color: var(--surface-critical-weak);
    border: 1px solid var(--border-critical-base);
    color: rgba(218, 51, 25, 0.6);

    /* text-12-regular */
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    font-style: normal;
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-large);
    letter-spacing: var(--letter-spacing-normal);

    &[data-component="icon"] {
      color: var(--icon-critical-active);
    }
  }

  &[data-variant="warning"] {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: color-mix(in oklab, var(--text-warning, #d97706) 85%, var(--text-base, #ccc));
    padding: 12px 14px;

    /* text-12-regular */
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    font-style: normal;
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-large);
    letter-spacing: var(--letter-spacing-normal);
  }
}
/* kilocode_change end */
