/* ================================================================
   Sneaker Price Tool – Frontend CSS
   Abgestimmt auf das dunkle Design von sneaker-release.eu
   ================================================================ */

.spt-tool-wrap {
  margin: 2.5rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #f0f0f0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.spt-tabs {
  display: flex;
  border-bottom: 1px solid #333;
  background: #141414;
}

.spt-tab {
  flex: 1;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #888;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  text-align: center;
}

.spt-tab:hover {
  color: #ddd;
}

.spt-tab--active {
  color: #fff;
  border-bottom-color: #fff;
}

/* ── Panels ────────────────────────────────────────────────────── */
.spt-panel {
  display: none;
  padding: 20px;
}

.spt-panel--active {
  display: block;
}

/* ── Labels ────────────────────────────────────────────────────── */
.spt-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #777;
  margin: 0 0 10px;
}

/* ── Größensystem-Toggle ───────────────────────────────────────── */
.spt-sys-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.spt-sys-btn {
  height: 30px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #444;
  border-radius: 20px;
  background: transparent;
  color: #999;
  cursor: pointer;
  transition: all .15s;
}

.spt-sys-btn:hover {
  border-color: #666;
  color: #ddd;
}

.spt-sys-btn--active {
  background: #fff;
  color: #111;
  border-color: #fff;
}

/* ── Größengitter ──────────────────────────────────────────────── */
.spt-size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.spt-sz {
  width: 52px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #242424;
  color: #ddd;
  cursor: pointer;
  transition: all .15s;
}

.spt-sz:hover:not([disabled]) {
  border-color: #666;
  background: #2e2e2e;
}

.spt-sz--active {
  background: #fff !important;
  color: #111 !important;
  border-color: #fff !important;
}

.spt-sz--out {
  opacity: .3;
  text-decoration: line-through;
  cursor: not-allowed;
}

.spt-selected-note {
  font-size: 13px;
  color: #aaa;
  min-height: 18px;
  margin: 0 0 16px;
}

.spt-selected-note strong {
  color: #fff;
}

/* ── Sortier-Bar ───────────────────────────────────────────────── */
.spt-sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.spt-sort-btn {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: all .15s;
}

.spt-sort-btn:hover {
  border-color: #666;
  color: #ddd;
}

.spt-sort-btn--active {
  background: #fff;
  color: #111;
  border-color: #fff;
}

/* ── Preisliste ────────────────────────────────────────────────── */
.spt-price-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spt-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #242424;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}

.spt-price-row:hover {
  border-color: #555;
  background: #2a2a2a;
  color: inherit;
  text-decoration: none;
}

.spt-price-row--best {
  border-color: #2ecc71 !important;
  background: #1a2e22 !important;
}

.spt-price-row--dim {
  opacity: .45;
}

.spt-row-left {
  min-width: 110px;
  flex-shrink: 0;
}

.spt-shop-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #f0f0f0;
}

.spt-shop-type {
  display: block;
  font-size: 11px;
  color: #777;
  margin-top: 2px;
}

.spt-row-chips {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.spt-chip {
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  color: #888;
  background: transparent;
}

.spt-chip--hit {
  background: #1a3a2a;
  border-color: #2ecc71;
  color: #2ecc71;
  font-weight: 600;
}

.spt-row-right {
  text-align: right;
  flex-shrink: 0;
  min-width: 90px;
}

.spt-price {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f0;
}

.spt-price--best {
  color: #2ecc71;
}

.spt-best-badge {
  display: inline-block;
  font-size: 10px;
  background: #2ecc71;
  color: #111;
  padding: 1px 7px;
  border-radius: 8px;
  margin-top: 3px;
  font-weight: 700;
}

.spt-unavail-note {
  display: block;
  font-size: 10px;
  color: #e74c3c;
  margin-top: 2px;
}

.spt-ext-icon {
  font-size: 14px;
  color: #555;
  margin-left: 4px;
  flex-shrink: 0;
}

.spt-price-row:hover .spt-ext-icon {
  color: #999;
}

.spt-update-time {
  font-size: 11px;
  color: #555;
  margin: 10px 0 0;
  text-align: right;
}

.spt-no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
}

/* ── Größenkonversionstabelle ──────────────────────────────────── */
.spt-conv-wrap {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.spt-conv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spt-conv-table th,
.spt-conv-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a2a;
  text-align: left;
  white-space: nowrap;
}

.spt-conv-table th {
  font-weight: 600;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: #161616;
}

.spt-conv-table tr:last-child td {
  border-bottom: none;
}

.spt-conv-hl {
  background: rgba(46, 204, 113, .08) !important;
  color: #2ecc71 !important;
  font-weight: 600 !important;
}

.spt-fit-note {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  padding: 12px 14px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
}

.spt-fit-note strong {
  color: #ddd;
}

/* ── Skeleton-Loader ───────────────────────────────────────────── */
.spt-skeleton {
  height: 20px;
  background: linear-gradient(90deg, #222 25%, #2a2a2a 50%, #222 75%);
  background-size: 200% 100%;
  animation: spt-shimmer 1.2s infinite;
  border-radius: 6px;
  margin-bottom: 8px;
}

.spt-skeleton--row {
  height: 56px;
  border-radius: 10px;
}

.spt-skeleton--table {
  height: 160px;
  border-radius: 10px;
}

@keyframes spt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .spt-price-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .spt-row-left {
    min-width: 80px;
  }

  .spt-row-chips {
    order: 3;
    flex-basis: 100%;
  }

  .spt-row-right {
    margin-left: auto;
  }

  .spt-sz {
    width: 46px;
    height: 36px;
    font-size: 12px;
  }
}
