[data-component="session-review"] {
  display: flex;
  flex-direction: column;
  gap: 0px;
  height: 100%;

  [data-slot="session-review-scroll"] {
    flex: 1 1 auto;
    min-height: 0;
  }

  .scroll-view__viewport {
    display: flex;
    flex-direction: column;
  }

  [data-slot="session-review-container"] {
    flex: 1 1 auto;
    padding-right: 0;
  }

  [data-slot="session-review-header"] {
    z-index: 120;
    background-color: var(--v2-background-bg-base);
    height: 40px;
    padding-bottom: 8px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
  }

  [data-slot="session-review-title"] {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-large);
    color: var(--text-strong);
  }

  [data-slot="session-review-actions"] {
    display: flex;
    align-items: center;
    column-gap: 12px;
  }

  [data-slot="session-review-actions"] [data-component="radio-group"] {
    [data-slot="radio-group-wrapper"],
    [data-slot="radio-group-indicator"],
    [data-slot="radio-group-item-control"] {
      border-radius: 6px;
    }

    [data-slot="radio-group-item-input"]:not([data-checked], [data-disabled])
      + [data-slot="radio-group-item-label"]:hover
      [data-slot="radio-group-item-control"] {
      border-radius: 4px;
    }
  }

  [data-component="sticky-accordion-header"] {
    --sticky-accordion-top: 0px;
  }

  [data-slot="session-review-accordion-item"][data-selected]
    [data-slot="accordion-header"]
    [data-slot="accordion-trigger"] {
    background-color: var(--surface-base-active);
  }

  [data-slot="accordion-item"] {
    [data-slot="accordion-content"] {
      display: none;
    }
    &[data-expanded] {
      [data-slot="accordion-content"] {
        display: block;
      }
    }
  }

  [data-slot="accordion-content"] {
    -webkit-user-select: text;
    user-select: text;
  }

  [data-slot="session-review-accordion-content"] {
    position: relative;
    z-index: 0;
    overflow: hidden;
  }

  [data-slot="session-review-trigger-content"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
  }

  [data-slot="session-review-file-info"] {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  [data-slot="session-review-file-name-container"] {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
  }

  [data-slot="session-review-directory"] {
    color: var(--text-base);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    direction: rtl;
    text-align: left;
  }

  [data-slot="session-review-filename"] {
    color: var(--text-strong);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [data-slot="session-review-view-button"] {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    margin-left: 8px;
    border: none;
    background: transparent;
    color: var(--text-base);
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    will-change: opacity;
    transform: translateZ(0);
    transition: opacity 0.15s ease;

    &:hover {
      color: var(--text-strong);
      background: var(--surface-base);
    }
  }

  [data-slot="accordion-trigger"]:hover [data-slot="session-review-view-button"] {
    opacity: 1;
  }

  [data-slot="session-review-trigger-actions"] {
    flex-shrink: 0;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
  }

  [data-slot="session-review-diff-chevron"] {
    display: inline-flex;
    color: var(--icon-weaker);
    transform: rotate(-90deg);
    transition: transform 0.15s ease;
  }

  [data-slot="accordion-item"][data-expanded] [data-slot="session-review-diff-chevron"] {
    transform: rotate(0deg);
  }

  [data-slot="session-review-change-group"] {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }

  [data-slot="session-review-change"] {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
  }

  [data-slot="session-review-change"][data-type="added"] {
    color: var(--icon-diff-add-base);
  }

  [data-slot="session-review-change"][data-type="removed"] {
    color: var(--icon-diff-delete-base);
  }

  [data-slot="session-review-change"][data-type="modified"] {
    color: var(--icon-diff-modified-base);
  }

  [data-slot="session-review-diff-wrapper"] {
    position: relative;
    overflow: hidden;
    z-index: 0;
    --line-comment-z: 5;
    --line-comment-popover-z: 30;
    --line-comment-open-z: 6;
  }

  [data-slot="session-review-large-diff"] {
    padding: 12px;
    background: var(--v2-background-bg-base);
  }

  [data-slot="session-review-large-diff-title"] {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    color: var(--text-strong);
    margin-bottom: 4px;
  }

  [data-slot="session-review-large-diff-meta"] {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-small);
    color: var(--text-weak);
    word-break: break-word;
  }

  [data-slot="session-review-large-diff-actions"] {
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }
}

body:not([data-new-layout]) [data-component="session-review"] {
  [data-slot="session-review-header"] {
    background-color: var(--background-stronger);
  }

  [data-slot="session-review-large-diff"] {
    background: var(--background-stronger);
  }
}
