// GiftFlow Recent Donations (inherits --gfh-* from .giftflow-dashboard-view)
.giftflow-recent-donations {

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gfh-line, #dcdcde);
  }

  &__header-left {
    flex: 1;
  }

  &__header-right {
    flex-shrink: 0;
    margin-left: 0.75rem;
  }

  &__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gfh-text, #1d2327);
    line-height: 1.2;
  }

  &__subtitle {
    font-size: 0.8rem;
    color: var(--gfh-text-muted, #646970);
    font-weight: 400;
    margin: 0;
  }

  &__count {
    background: var(--gfh-bg-muted, #f0f0f1);
    color: var(--gfh-text-secondary, #50575e);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--gfh-radius-sm, 6px);
    min-width: 1.5rem;
    text-align: center;
  }

  &__footer {
    margin-top: 1rem;
    text-align: right;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gfh-line, #dcdcde);
  }

  // Empty state
  &__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gfh-text-muted, #646970);
  }

  &__empty-icon {
    margin-bottom: 0.75rem;
    opacity: 0.55;
    color: var(--gfh-line-strong, #c3c4c7);
  }

  &__empty-text {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gfh-text-secondary, #50575e);
  }

  &__empty-subtext {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gfh-text-muted, #646970);
    max-width: 250px;
    line-height: 1.4;
  }

  // List layout - more compact
  &__grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  // Individual donation item - compact card
  &__card {
    background: var(--gfh-bg-soft, #f6f7f7);
    border: 1px solid var(--gfh-line, #dcdcde);
    border-radius: var(--gfh-radius-sm, 6px);
    padding: 0.75rem;
    transition:
      background var(--gfh-dur, 0.2s) var(--gfh-ease, ease),
      border-color var(--gfh-dur, 0.2s) var(--gfh-ease, ease);
    position: relative;

    &:hover {
      background: var(--gfh-bg, #fff);
      border-color: var(--gfh-line-strong, #c3c4c7);
      // box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    // &::before {
    //   content: '';
    //   position: absolute;
    //   left: 0;
    //   top: 0;
    //   bottom: 0;
    //   width: 3px;
    //   background: #10b981;
    //   border-radius: 0 0 0 6px;
    // }
  }

  &__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
  }

  &__donor-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
  }

  &__donor-avatar {
    width: 32px;
    height: 32px;
    background: var(--gfh-theme, #2271b1);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
  }

  &__donor-details {
    flex: 1;
    min-width: 0;
  }

  &__donor-name {
    margin: 0 0 0.125rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gfh-text, #1d2327);
    line-height: 1.2;
    margin-bottom: .2rem;
  }

  &__donor-link {
    color: var(--gfh-theme, #2271b1);
    text-decoration: none;
    font-weight: 600;
    border-bottom: none;
    transition: color var(--gfh-dur, 0.2s) var(--gfh-ease, ease);

    &:hover {
      color: var(--gfh-theme-2, #135e96);
      text-decoration: underline;
    }
  }

  &__donor-email {
    margin: 0;
    font-size: 0.75rem;
    color: var(--gfh-text-muted, #646970);
    line-height: 1.2;
    word-break: break-all;
  }

  &__amount {
    font-size: 0.95rem;
    // font-weight: bold;
    // color: #059669;
    white-space: nowrap;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;

    :global(.giftflow-currency-formatted-amount) {
      color: var(--gfh-chart-donations, #007017);
    }
  }

  &__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  &__campaign-info {
    flex: 1;
  }

  &__campaign-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gfh-text-secondary, #50575e);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  &__campaign-link {
    color: var(--gfh-text-secondary, #50575e);
    text-decoration: none;
    font-weight: 600;
    border-bottom: none;
    transition: color var(--gfh-dur, 0.2s) var(--gfh-ease, ease);

    &:hover {
      color: var(--gfh-theme, #2271b1);
      text-decoration: underline;
    }
  }

  &__card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gfh-line, #dcdcde);
  }

  &__status-badge {
    flex-shrink: 0;
  }

  &__status {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;

    &--completed {
      background: #d1fae5;
      color: #065f46;
    }

    &--pending {
      background: #fef3c7;
      color: #92400e;
    }

    &--failed {
      background: #fee2e2;
      color: #991b1b;
    }

    &--refunded {
      background: #f3f4f6;
      color: #374151;
    }
  }

  &__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--gfh-text-muted, #646970);
  }

  &__date {
    font-weight: 500;
  }

  &__payment-method {
    color: var(--gfh-text-muted, #646970);
    opacity: 0.9;
    text-transform: capitalize;
  }

  // Responsive design
  @media (max-width: 768px) {
    padding: 0.75rem;

    &__header {
      margin-bottom: 0.75rem;
      padding-bottom: 0.5rem;
    }

    &__title {
      font-size: 1rem;
    }

    &__subtitle {
      font-size: 0.75rem;
    }

    &__card {
      padding: 0.625rem;
    }

    &__card-header {
      margin-bottom: 0.375rem;
    }

    &__donor-avatar {
      width: 28px;
      height: 28px;
      font-size: 0.75rem;
    }

    &__donor-name {
      font-size: 0.8rem;
    }

    &__donor-email {
      font-size: 0.7rem;
    }

    &__amount {
      font-size: 0.9rem;
    }

    &__campaign-title {
      font-size: 0.75rem;
    }

    &__card-footer {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.375rem;
    }

    &__meta {
      font-size: 0.65rem;
    }
  }

  @media (max-width: 480px) {
    padding: 0.5rem;

    &__header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.375rem;
    }

    &__header-right {
      margin-left: 0;
    }

    &__title {
      font-size: 0.95rem;
    }

    &__card {
      padding: 0.5rem;
    }

    &__donor-avatar {
      width: 24px;
      height: 24px;
      font-size: 0.7rem;
    }

    &__donor-name {
      font-size: 0.75rem;
    }

    &__amount {
      font-size: 0.85rem;
    }

    &__campaign-title {
      font-size: 0.7rem;
    }

    &__status {
      font-size: 0.65rem;
      padding: 0.1rem 0.375rem;
    }

    &__meta {
      font-size: 0.6rem;
    }
  }
}
