Newer
Older
vmk-ui-kit / src / scss / components / _cards.scss
@Eugene Sukhodolskiy Eugene Sukhodolskiy 1 day ago 1 KB Add Select, Textarea, and Card components
/* =========================
   Cards
========================= */

@use "../kit-deps" as *;

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: $neutral-0;
  border: 1px solid $neutral-200;
  border-radius: $radius-lg;
  overflow: hidden;
  transition:
    box-shadow $motion-base $motion-ease,
    border-color $motion-base $motion-ease;

  &:hover {
    border-color: $neutral-300;
  }

  .card-title {
    padding: $space-4 $space-5;
    font-size: 18px;
    font-weight: $font-weight-bold;
    color: $neutral-900;
    border-bottom: 1px solid $neutral-100;
  }

  .card-content {
    flex: 1;
    padding: $space-5;
    color: $neutral-800;
    font-size: 15px;
    line-height: 1.5;
  }

  .card-footer {
    display: flex;
    align-items: center;
    gap: $space-3;
    padding: $space-3 $space-5;
    border-top: 1px solid $neutral-100;
    background-color: $neutral-50;
  }

  // Variants
  &.card-filled {
    background-color: $neutral-50;
    border-color: $neutral-100;
  }

  &.card-outlined {
    background-color: transparent;
    border-color: $neutral-400;
  }

  &.card-primary {
    border-color: $yellow-300;
    background-color: $yellow-50;
  }

  &.card-secondary {
    border-color: $mint-300;
    background-color: $mint-50;
  }

  &.card-elevated {
    box-shadow: 0 4px 24px rgba($neutral-900, 0.08);
    border-color: transparent;
  }

  // Sizes
  &.card-sm {
    border-radius: $radius-md;

    .card-title { padding: $space-3 $space-4; font-size: 16px; }
    .card-content { padding: $space-4; }
    .card-footer { padding: $space-2 $space-4; }
  }

  &.card-lg {
    border-radius: $radius-xl;

    .card-title { padding: $space-5 $space-6; font-size: 20px; }
    .card-content { padding: $space-6; }
    .card-footer { padding: $space-4 $space-6; }
  }
}