// GiftFlow Recent Donations Component - Compact Clean Layout
.giftflow-recent-donations {

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
  }

  &__header-left {
    flex: 1;
  }

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

  &__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
  }

  &__subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    margin: 0;
  }

  &__count {
    background: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 1.5rem;
    text-align: center;
  }

  // Empty state
  &__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: #9ca3af;
  }

  &__empty-icon {
    margin-bottom: 0.75rem;
    opacity: 0.5;
    color: #d1d5db;
  }

  &__empty-text {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
  }

  &__empty-subtext {
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
    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: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.15s ease;
    position: relative;

    &:hover {
      background: #fff;
      border-color: #d1d5db;
      // 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: #3b82f6;
    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: #1f2937;
    line-height: 1.2;
    margin-bottom: .2rem;
  }

  &__donor-link {
    // color: #3b82f6;
    text-decoration: none;
    transition: color 0.15s ease;

    &:hover {
      color: #1d4ed8;
      text-decoration: underline;
    }
  }

  &__donor-email {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
    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: #059669;
    }
  }

  &__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: #374151;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  &__campaign-link {
    color: #374151;
    text-decoration: none;
    transition: color 0.15s ease;

    &:hover {
      color: #3b82f6;
      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 #f3f4f6;
  }

  &__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: #6b7280;
  }

  &__date {
    font-weight: 500;
  }

  &__payment-method {
    color: #9ca3af;
    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;
    }
  }
}
