/**
 * Collapse 组件样式（PisellFinancialSummary 子组件）
 * Figma node 14256:5103（Collapse）
 * Tokens: Base/Black #000000, Gray/600 #475467, Success/600 #079455, border rgba(0,0,0,0.15), fillAlter rgba(0,0,0,0.02)
 */

@prefix: pisell-collapse;

.@{prefix} {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;

  &-item {
    background: #fff;
  }

  &-head {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 8px;
    cursor: pointer;
    user-select: none;
  }

  &-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #000000;
    white-space: nowrap;
  }

  &-head-segment {
    line-height: 20px;
  }

  &-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  &-head-amount {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #000000;
    white-space: nowrap;
  }

  &-head-chevron {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.2s;
  }

  &-head-chevron-expanded {
    transform: rotate(180deg);
  }

  &-body {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
  }

  &-body-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  &-body-left {
    flex: 1 1 0;
    min-width: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #475467;
  }

  &-body-left ul {
    margin: 0;
    padding: 0 0 0 21px;
    list-style: disc;
  }

  &-body-left li {
    display: list-item;
    line-height: 20px;
  }

  &-body-amount {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #000;
    flex-shrink: 0;
  }

  &-body-action {
    flex-shrink: 0;
    height: 26px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #079455;
    background: #079455;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  &-body-action:hover {
    opacity: 0.9;
  }
}
