/*!
 * Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
 * SPDX-License-Identifier: MIT
 */

// Variables
$bg-heading: rgba(0, 0, 0, 0.2);
$cell-padding: 16px;
$border-radius: 4px;
$transition-speed: 0.2s;

// Header styles
h1 {
  margin-bottom: 24px;
}

h1 small {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.8em;
  margin-left: 8px;
}

.heading {
  background: $bg-heading;
  border-radius: $border-radius;
  font-size: x-large;
  justify-content: center;
  margin-bottom: 20px;
  padding: 12px 20px;
}

// Table styles
mat-table {
  margin-bottom: 24px;
}

mat-header-row {
  min-height: 0 !important;
}

mat-row {
  transition: background-color $transition-speed ease;
}

mat-row:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

mat-cell,
mat-footer-cell {
  padding: $cell-padding;
}

mat-cell:first-of-type,
mat-footer-cell:first-of-type {
  padding-left: $cell-padding;
}

mat-cell:last-of-type,
mat-footer-cell:last-of-type {
  padding-right: $cell-padding;
}

// Image styles
.img-thumbnail {
  border-radius: $border-radius;
  height: auto;
  max-width: 90px;
  transition: transform $transition-speed ease;
}

.img-thumbnail:hover {
  transform: scale(1.05);
}

// Footer styles
.mat-mdc-footer-cell {
  font-size: 1.1em;
  font-weight: 500;
}

// Content alignment
.content-align {
  align-items: center;
  display: flex;
  justify-content: center;
}

// Quantity controls
.quantity-controls {
  align-items: center;
  display: flex;
  gap: 8px;
}

.quantity-controls button {
  color: rgba(0, 0, 0, 0.6);
  transition: color $transition-speed ease;
}

.quantity-controls button:hover {
  color: rgba(0, 0, 0, 0.87);
}

.quantity-controls span {
  min-width: 24px;
  text-align: center;
}

// Price display
#price {
  font-size: large;
  font-weight: 500;
  margin-top: 30px;
  padding: $cell-padding;
  text-align: right;
  width: 100%;
}

// Responsive adjustments
@media (max-width: 768px) {
  .img-thumbnail {
    max-width: 70px;
  }

  mat-cell,
  mat-footer-cell {
    padding: 12px;
  }

  #price {
    font-size: medium;
    margin-top: 20px;
  }
}

// Delete button
.far.fa-trash-alt {
  color: rgba(0, 0, 0, 0.54);
  transition: color $transition-speed ease;
}

.far.fa-trash-alt:hover {
  color: #f44336;
}
