/*
 * services-aside-widget.css — Compact sidebar services widget for blog aside, area show, service show.
 * Pure CSS + BEM on theme tokens with literal fallbacks.
 * Replaces the stacked card design (image + description + price pill + icon CTA).
 *
 * Design: compact rows — square thumb (when image exists), 2-line title clamp, price inline.
 * No descriptions. No icon-only buttons. Price renders ONLY when a real price exists.
 */

.services-aside-widget {
  background: var(--color-surface, #ffffff);
  box-shadow: var(--shadow-card, 0 2px 12px rgba(0, 0, 0, 0.06));
  padding: var(--space-5, 1.25rem) var(--space-5, 1.25rem) var(--space-4, 1rem);
  margin-bottom: var(--space-4, 1rem);
}

.services-aside-widget__title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 700;
  color: var(--color-text-primary, #1a1a1a);
  margin: 0 0 var(--space-4, 1rem);
  font-family: 'Montserrat', sans-serif;
  line-height: var(--line-height-tight, 1.2);
}

.services-aside-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.services-aside-widget__row {
  border-bottom: 1px solid var(--border-color, #dee2e6);
}

.services-aside-widget__row:last-child {
  border-bottom: none;
}

/* Whole row is the link */
.services-aside-widget__link {
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  padding: var(--space-3, 0.75rem) 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.services-aside-widget__link:hover .services-aside-widget__name {
  color: var(--color-primary, #b33f00);
}

.services-aside-widget__link:focus-visible {
  outline: 2px solid var(--color-primary, #b33f00);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Square thumbnail — 64px, only when image exists (CSS checks sibling presence) */
.services-aside-widget__thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-light, #f5f5f5);
}

.services-aside-widget__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body: title stacked above price (no image = full width) */
.services-aside-widget__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
  min-width: 0;
  flex: 1;
}

/* Title: 2-line clamp */
.services-aside-widget__name {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary, #1a1a1a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price: inline below title, primary colour — ONLY rendered when price exists (no empty element) */
.services-aside-widget__price {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: var(--color-primary, #b33f00);
  line-height: 1.2;
}

/* Struck-through original price — only rendered when a real discount exists (ServiceDiscountDisplayHelper sets original_price) */
.services-aside-widget__price-was {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 400;
  color: var(--text-muted, #718096);
  text-decoration: line-through;
  margin-right: var(--space-1, 0.25rem);
  line-height: 1.2;
}

@media (prefers-reduced-motion: reduce) {
  .services-aside-widget__link {
    transition: none;
  }
}
