/*
  Frontend UI polish
  Keep styles scoped to the .wms-* namespace to avoid theme conflicts.
*/

.wms-widget{
  border:1px solid #e5e7eb;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  width:100%;
  max-width:100%;
  display:block;
  box-shadow:0 10px 30px rgba(17,24,39,.06);
}

.wms-topbar{
  display:flex;
  gap:14px;
  justify-content:space-between;
  align-items:flex-end;
  padding:16px 16px;
  border-bottom:1px solid #eef2f7;
  background:linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}

.wms-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.wms-filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#374151}

.wms-filters select,.wms-filters input{
  min-width:190px;
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:12px;
  font-size:14px;
  background:#fff;
  outline:none;
}

.wms-filters select:focus,.wms-filters input:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.wms-filters .wms-search input{min-width:240px}

.wms-topbar .button,
.wms-topbar button{
  border-radius:12px;
}

.wms-grid{display:block}
.wms-map{height:520px}

/* Panels */
.wms-panels{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:14px;
  padding:14px;
  border-top:1px solid #eef2f7;
  background:#f9fafb;
}

.wms-results,
.wms-chart{
  background:#fff;
  border:1px solid #eef2f7;
  border-radius:16px;
  overflow:hidden;
}

.wms-results{min-height:360px;max-height:460px;overflow:auto}
.wms-chart{min-height:360px}

.wms-results__header,.wms-chart__header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  background:#fff;
}

.wms-results__header strong,
.wms-chart__header strong{font-size:13px;letter-spacing:.02em;color:#111827}

.wms-results__count,.wms-chart__sub{font-size:12px;color:#6b7280}

.wms-results__list{padding:12px 14px;display:flex;flex-direction:column;gap:10px}

/* List rows (generated by JS) */
.wms-row{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px;
  cursor:pointer;
  transition:transform .08s ease, box-shadow .12s ease, background .12s ease;
  background:#fff;
}
.wms-row:hover{box-shadow:0 10px 24px rgba(17,24,39,.08);transform:translateY(-1px)}
.wms-row:active{transform:translateY(0)}

.wms-row__top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}

.wms-row__commodity{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:12px;
  font-weight:600;
}

.wms-row__price{font-weight:800;color:#111827;font-size:14px}

.wms-row__meta{font-size:12px;color:#6b7280;display:flex;gap:10px;flex-wrap:wrap;line-height:1.3}

.wms-row__phone{display:inline-flex;align-items:center;gap:8px}
.wms-row__phone .wms-unlock{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  text-decoration:none;
  font-weight:700;
  font-size:12px;
}
.wms-row__phone .wms-unlock:hover{background:#dbeafe}

.wms-chart{padding-bottom:10px}
.wms-chart canvas{padding:0 10px;height:300px !important}

.wms-standalone-chart{border:1px solid #e5e7eb;border-radius:16px;padding:10px;background:#fff}

@media (max-width: 980px){
  .wms-panels{grid-template-columns:1fr}
  .wms-map{height:420px}
  .wms-filters select,.wms-filters input{min-width:160px}
  .wms-filters .wms-search input{min-width:200px}
}



/* Market overview ticker */
.wms-ticker{
  width: 100%;
  margin: 6px 0 18px;
  padding: 14px 14px 12px;
  border: 1px solid #e8e8ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}
.wms-ticker__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.wms-ticker__title{
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.wms-ticker__controls{
  display:flex;
  gap:8px;
}
.wms-ticker__btn{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:10px;
  width:34px;
  height:34px;
  cursor:pointer;
  line-height: 32px;
  font-size: 16px;
  color:#0f172a;
}
.wms-ticker__btn:hover{ background:#f8fafc; }
.wms-ticker__viewport{
  overflow-x:auto;
  overflow-y:hidden;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  padding-bottom: 2px;
}
.wms-ticker__viewport::-webkit-scrollbar{ height: 8px; }
.wms-ticker__viewport::-webkit-scrollbar-thumb{ background:#e5e7eb; border-radius: 20px; }

.wms-ticker__track{
  display:flex;
  gap:10px;
  min-height: 74px;
  align-items:stretch;
  padding: 2px 0;
}
.wms-ticker-card{
  min-width: 210px;
  max-width: 240px;
  padding: 12px 12px 10px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  cursor:pointer;
  text-align:left;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.wms-ticker-card:hover{
  transform: translateY(-1px);
  border-color:#dbeafe;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.wms-ticker-card__name{
  font-weight:700;
  color:#0f172a;
  font-size: 14px;
  margin-bottom: 4px;
  text-transform: capitalize;
}
.wms-ticker-card__price{
  font-weight:800;
  font-size: 15px;
  letter-spacing:-0.01em;
  color:#111827;
  margin-bottom: 6px;
}
.wms-ticker-card__meta{
  display:flex;
  gap:10px;
  align-items:center;
  font-size: 12px;
  color:#64748b;
}
.wms-ticker-card__chg{
  font-weight:700;
  padding: 2px 8px;
  border-radius: 999px;
  border:1px solid #e5e7eb;
  background:#fff;
}
.wms-ticker-card__chg.up{ color:#065f46; border-color:#a7f3d0; background:#ecfdf5; }
.wms-ticker-card__chg.down{ color:#991b1b; border-color:#fecaca; background:#fef2f2; }
.wms-ticker-card__chg.na{ color:#475569; }

