/* Cardmarket deals tracker styles */

:root {
  --cmx-panel: rgba(25, 25, 25, 0.78);
  --cmx-panel2: rgba(20, 20, 20, 0.74);
  --cmx-border: rgba(255, 255, 255, 0.09);
  --cmx-border2: rgba(255, 255, 255, 0.14);
  --cmx-text: rgba(255, 255, 255, 0.94);
  --cmx-text2: rgba(255, 255, 255, 0.74);
  --cmx-muted: rgba(255, 255, 255, 0.58);
  --cmx-accent: #ff5656;
  --cmx-accent2: rgba(255, 86, 86, 0.17);
  --cmx-up: #24c58f;
  --cmx-down: #ff8a65;
  --cmx-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --cmx-radius: 14px;
  --cmx-radius2: 18px;
}

.cmx-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--cmx-text);
}

.cmx-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  opacity: 0.9;
  word-break: break-word;
}

.cmx-pagehead {
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.78), rgba(18, 18, 18, 0.72));
  border: 1px solid var(--cmx-border);
  border-radius: var(--cmx-radius2);
  box-shadow: var(--cmx-shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.cmx-title {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0.4px;
  color: #fff;
  text-align: center;
}

.cmx-subtitle {
  text-align: center;
  max-width: 960px;
  margin: 0 auto 14px;
  color: var(--cmx-text2);
  font-size: 13px;
  line-height: 1.5;
}

.cmx-kpis,
.cmx-kpis--auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.cmx-kpi {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--cmx-border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.cmx-kpi span {
  display: block;
  font-size: 11px;
  color: var(--cmx-muted);
  margin-bottom: 4px;
}

.cmx-kpi b {
  display: block;
  font-size: 14px;
  color: #fff;
}

.cmx-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmx-strip--head {
  justify-content: center;
}

.cmx-strip-pill {
  border: 1px solid var(--cmx-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--cmx-text2);
}

.cmx-strip-pill b {
  color: #fff;
}

.cmx-alert {
  border-radius: 14px;
  border: 1px solid var(--cmx-border);
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  margin: 14px 0 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.cmx-alert--error {
  border-color: rgba(255, 86, 86, 0.35);
}

.cmx-alert--warn {
  border-color: rgba(255, 193, 7, 0.28);
}

.cmx-alert b {
  color: #fff;
}

.cmx-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.cmx-cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--cmx-panel);
  border: 1px solid var(--cmx-border);
  border-radius: var(--cmx-radius2);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cmx-cat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 86, 86, 0.26);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
}

.cmx-cat-hero {
  position: relative;
  height: 148px;
  background: #111;
}

.cmx-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}

.cmx-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.75)), radial-gradient(circle at 20% 25%, rgba(255, 86, 86, 0.18), transparent 55%);
}

.cmx-cat-body {
  padding: 14px;
}

.cmx-cat-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
  color: #fff;
}

.cmx-cat-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--cmx-text2);
  min-height: 34px;
}

.cmx-cat-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.cmx-cat-metrics--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cmx-metric {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--cmx-border);
  border-radius: 12px;
  padding: 8px 10px;
}

.cmx-metric span {
  display: block;
  font-size: 10.5px;
  color: var(--cmx-muted);
}

.cmx-metric b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #fff;
}

.cmx-cat-cta {
  margin-top: 10px;
  font-weight: 800;
  color: var(--cmx-accent);
  font-size: 12px;
}

.cmx-footnote {
  margin-top: 16px;
  color: var(--cmx-text2);
  font-size: 12px;
  text-align: center;
}

.cmx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 14px;
}

.cmx-tab {
  display: inline-block;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--cmx-border);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.cmx-tab:hover {
  border-color: rgba(255, 86, 86, 0.22);
}

.cmx-tab.is-active {
  background: var(--cmx-accent2);
  border-color: rgba(255, 86, 86, 0.35);
  color: #fff;
}

.cmx-filters {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--cmx-border);
  border-radius: 14px;
  padding: 14px;
}

.cmx-filters,
.cmx-filters * {
  box-sizing: border-box;
}

.cmx-filter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cmx-filter-title {
  font-size: 15px;
  letter-spacing: 0.35px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
}

.cmx-filter-subtitle {
  font-size: 12px;
  color: var(--cmx-text2);
}

.cmx-filter-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cmx-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cmx-presets-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--cmx-muted);
  font-weight: 800;
}

.cmx-preset {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--cmx-border2);
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.cmx-preset:hover {
  border-color: rgba(255, 86, 86, 0.25);
  color: #fff;
}

.cmx-preset.is-active {
  border-color: rgba(255, 86, 86, 0.38);
  background: rgba(255, 86, 86, 0.2);
  color: #fff;
}

.cmx-filter-meta {
  font-size: 11px;
  color: var(--cmx-text2);
  white-space: nowrap;
}

.cmx-filter-meta b {
  color: #fff;
}

.cmx-filter-row {
  display: grid;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.cmx-filter-row:last-child {
  margin-bottom: 0;
}

.cmx-filter-row--thresholds {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.cmx-filter-row--tools {
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) minmax(280px, 2fr) auto;
}

.cmx-field {
  min-width: 0;
}

.cmx-field span {
  display: block;
  font-size: 12px;
  color: var(--cmx-muted);
  margin-bottom: 6px;
}

.cmx-field input,
.cmx-field select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--cmx-border2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  outline: none;
  font-size: 14px;
}

.cmx-field input:focus,
.cmx-field select:focus {
  border-color: rgba(255, 86, 86, 0.42);
  box-shadow: 0 0 0 2px rgba(255, 86, 86, 0.16);
}

.cmx-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.cmx-check {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  border: 1px solid var(--cmx-border2);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--cmx-text2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmx-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--cmx-accent);
}

.cmx-check span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmx-check.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cmx-check.is-disabled input {
  pointer-events: none;
}

.cmx-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.cmx-filter-info {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.2);
  color: var(--cmx-text2);
  font-size: 11px;
}

.cmx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 86, 86, 0.35);
  background: rgba(255, 86, 86, 0.92);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.cmx-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.cmx-btn--ghost {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--cmx-border2);
  color: rgba(255, 255, 255, 0.86);
}

.cmx-btn--ghost:hover {
  border-color: rgba(255, 86, 86, 0.22);
}

.cmx-btn--full {
  width: 100%;
}

.cmx-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 8px;
  color: var(--cmx-text2);
  font-size: 12px;
}

.cmx-back {
  color: var(--cmx-accent);
  text-decoration: none;
  font-weight: 800;
}

.cmx-pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.cmx-pager--bottom {
  margin-top: 18px;
}

.cmx-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--cmx-border);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 12px;
}

.cmx-page:hover {
  border-color: rgba(255, 86, 86, 0.22);
}

.cmx-page.is-active,
.cmx-page.is-current {
  background: rgba(255, 86, 86, 0.92);
  border-color: rgba(255, 86, 86, 0.35);
  color: #fff;
  font-weight: 900;
}

.cmx-page.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cmx-ellipsis {
  opacity: 0.55;
  padding: 0 6px;
}

.cmx-deal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cmx-deal-card {
  background: var(--cmx-panel2);
  border: 1px solid var(--cmx-border);
  border-radius: var(--cmx-radius2);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.cmx-deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 86, 86, 0.22);
}

.cmx-card-hero {
  position: relative;
  min-height: 210px;
  background: radial-gradient(circle at 20% 25%, rgba(255, 86, 86, 0.2), transparent 55%), linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
  border-bottom: 1px solid var(--cmx-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.cmx-img-skel {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.06), transparent 55%), linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: cmx-shimmer 1.2s infinite linear;
}

@keyframes cmx-shimmer {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

.cmx-scry-img {
  position: relative;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  display: block;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease;
  will-change: opacity;
}

.cmx-scry-img--single {
  max-height: 188px;
  max-width: 136px;
  width: auto;
  height: auto;
}

.cmx-scry-img--product {
  width: 100%;
  max-width: 260px;
  height: 182px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}

.cmx-hero-icon {
  font-size: 24px;
  letter-spacing: 1px;
  font-weight: 900;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease;
  will-change: opacity;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 5px 8px;
}

.cmx-hero-text {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmx-card-hero.is-loaded .cmx-hero-icon,
.cmx-card-hero.is-loaded .cmx-hero-text {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmx-card-body {
  padding: 12px;
}

.cmx-card-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 2px;
  color: #fff;
  line-height: 1.2;
}

.cmx-card-sub {
  font-size: 11.5px;
  color: var(--cmx-text2);
  margin-bottom: 8px;
  line-height: 1.3;
  min-height: 30px;
}

.cmx-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cmx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 86, 86, 0.25);
  background: rgba(255, 86, 86, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.cmx-badge--muted {
  border-color: var(--cmx-border);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.78);
}

.cmx-badge--up {
  border-color: rgba(36, 197, 143, 0.4);
  background: rgba(36, 197, 143, 0.18);
  color: #e9fff6;
}

.cmx-badge--down {
  border-color: rgba(255, 138, 101, 0.38);
  background: rgba(255, 138, 101, 0.15);
  color: #fff0eb;
}

.cmx-prices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cmx-price {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--cmx-border);
  border-radius: 12px;
  padding: 8px 10px;
}

.cmx-price span {
  display: block;
  font-size: 10.5px;
  color: var(--cmx-muted);
}

.cmx-price b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #fff;
}

.cmx-trendline {
  min-height: 16px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--cmx-text2);
}

.cmx-trendline.is-up {
  color: #b9ffe6;
}

.cmx-trendline.is-down {
  color: #ffd6ca;
}

.cmx-empty {
  text-align: center;
  padding: 24px 12px 10px;
  color: var(--cmx-text2);
}

@media (max-width: 1140px) {
  .cmx-deal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cmx-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmx-filter-row--thresholds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmx-filter-row--tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmx-check {
    min-width: 0;
  }

  .cmx-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .cmx-title {
    font-size: 22px;
  }

  .cmx-deal-grid,
  .cmx-cat-grid,
  .cmx-kpis,
  .cmx-kpis--auto {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .cmx-filter-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cmx-filter-quick {
    flex-direction: column;
    align-items: flex-start;
  }

  .cmx-filter-row--thresholds,
  .cmx-filter-row--tools {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .cmx-check {
    height: auto;
    min-height: 38px;
    white-space: normal;
  }

  .cmx-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cmx-actions .cmx-btn {
    flex: 1;
  }

  .cmx-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}