@use 'variables' as *;

// ━━━ Vuetify Component Overrides ━━━
// Replaces all 38 @core SCSS files with clean, focused overrides

// Buttons — pill shape, smooth transitions
.v-btn {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  transition: all $transition-fast;

  &:active {
    transform: scale(0.98);
  }

  &--variant-flat,
  &--variant-elevated {
    &.v-btn--color-primary {
      box-shadow: 0 4px 12px rgba($primary, 0.3);

      &:hover {
        box-shadow: 0 6px 16px rgba($primary, 0.4);
      }
    }
  }
}

// Cards — clean shadows, hover lift, icon spacing
.v-card {
  transition: transform $transition-base, box-shadow $transition-base;

  &.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: $shadow-lg;
  }

  // Ensure consistent spacing between prepend icons and card title text
  .v-card-item {
    .v-card-item__prepend {
      padding-inline-end: 12px;
    }
  }

  .v-card-title {
    .v-icon + span,
    .v-avatar + span,
    .v-icon + div,
    .v-avatar + div {
      margin-inline-start: 8px;
    }
  }
}

// Global icon-to-text spacing — ensures icons next to text always have breathing room
.v-card-title,
.v-card-subtitle,
.v-list-item-title {
  .v-icon {
    margin-inline-end: 8px;
  }
}

// Text fields — floating labels
.v-field {
  border-radius: $radius-md !important;
}

// Chips — tonal by default
.v-chip {
  font-weight: 500;
}

// Data tables — striped rows
.v-data-table {
  .v-data-table__tr:nth-child(even) {
    background: rgba(var(--v-theme-on-surface), 0.02);
  }

  .v-data-table-header th {
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
  }
}

// Navigation drawer
.v-navigation-drawer {
  border-right: none !important;
}

// Dialogs — larger radius
.v-dialog > .v-overlay__content > .v-card {
  border-radius: $radius-lg !important;
}

// Tabs — clean underline
.v-tabs {
  .v-tab {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
  }
}

// Alerts — rounded
.v-alert {
  border-radius: $radius-md;
}

// Lists — icon spacing
.v-list-item {
  border-radius: $radius-sm;
  margin-inline: 4px;

  .v-list-item__prepend {
    .v-icon,
    .v-avatar {
      margin-inline-end: 12px;
    }
  }
}

// Tooltips
.v-tooltip > .v-overlay__content {
  border-radius: $radius-sm !important;
  font-size: 0.8125rem;
  padding: 4px 10px;
}

// Snackbars
.v-snackbar__wrapper {
  border-radius: $radius-md !important;
}

// Expansion panels
.v-expansion-panel {
  border-radius: $radius-md !important;

  &::after {
    display: none;
  }
}

// Progress bars
.v-progress-linear {
  border-radius: $radius-pill;
}

// Menus
.v-menu > .v-overlay__content {
  border-radius: $radius-md !important;
  box-shadow: $shadow-lg !important;
}

// Pagination
.v-pagination__item .v-btn {
  border-radius: $radius-sm;
}
