/* assets/css/pages/material_prices.css */
/* Scope: material_prices.php page-only refinements */

.mat-search{
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  position: sticky;
  top: var(--space-2);
  z-index: 900;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  box-shadow: var(--shadow-2);
  border-radius: var(--radius-xl);
}

.container.stack .mat-search + *{
  margin-top: var(--space-3);
}
.mat-search__label{
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.mat-search__field{
  position: relative;
  display: flex;
  align-items: center;
}
.mat-search__input{
  padding-inline-end: 44px;
  height: var(--control-h-sm);
  border-radius: var(--control-radius);
  color: var(--text-main);
  -webkit-text-fill-color: var(--text-main);
  caret-color: var(--text-main);
}
.mat-search__clear{
  position: absolute;
  inset-inline-end: 6px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  font-size: 18px;
  line-height: 1;
}
.mat-search__clear:hover{
  background: rgba(255,255,255,0.9);
}
.mat-search__clear:focus-visible{
  box-shadow: var(--shadow-1), var(--focus-ring);
}

.mat-suggest{
  margin-top: 6px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.86);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
}
.mat-suggest.is-open{
  max-height: 280px;
  opacity: 1;
  transform: translateY(0);
}
.mat-suggest__list{
  display: grid;
  gap: 6px;
  padding: 8px;
  max-height: 260px;
  overflow: auto;
}
.mat-suggest__item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--surface-2);
  font-size: 13px;
  text-align: right;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.mat-suggest__item:hover{
  border-color: rgba(229,170,23,0.35);
  background: rgba(229,170,23,0.10);
}
.mat-suggest__item:focus-visible{
  outline: 2px solid rgba(229,170,23,0.45);
  outline-offset: 1px;
}
.mat-suggest__empty{
  text-align: center;
  font-size: 12px;
  padding: 6px 0 10px;
}


.mat-history{
  padding: 12px;
}
.mat-history__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mat-history__count{
  font-size: 12px;
}
.mat-history__tools{
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mat-history__search{
  flex: 1 1 auto;
  height: var(--control-h-sm);
  border-radius: var(--control-radius);
  color: var(--text-main);
  -webkit-text-fill-color: var(--text-main);
  caret-color: var(--text-main);
}
.mat-history__clear{
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  font-size: 18px;
  line-height: 1;
}
.mat-history__clear:hover{
  background: rgba(255,255,255,0.9);
}
.mat-history__clear:focus-visible{
  box-shadow: var(--shadow-1), var(--focus-ring);
}
.mat-history__empty{
  text-align: center;
  font-size: 12px;
  padding: 6px 0 2px;
}
.mat-price-card{
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(229,170,23,0.08), rgba(229,170,23,0.03)),
    var(--surface-1);
  box-shadow: var(--shadow-1);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.mat-price-card:hover{
  border-color: rgba(229,170,23,0.34);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.mat-price-main{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 800;
}
.mat-price-meta{
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.mat-price-base{
  color: var(--text-muted);
}

@media (max-width: 640px){
  .mat-search{
    top: var(--space-2);
  }
  .mat-history__tools{
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce){
  .mat-suggest,
  .mat-price-card{
    transition: none;
  }
}

