:root {
  /* Global button sizing (site-wide incl. admin) */
  --btn-h: 44px;
  --btn-px: 16px;
  --btn-radius: 12px;

  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(17, 24, 39, 0.10);
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --radius: 16px;

  /* Accent + focus (2025) */
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --ring: rgba(37, 99, 235, 0.22);
  --field: rgba(17, 24, 39, 0.06);
}

/* Reset / base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Accessible helpers */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* Layout */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  box-sizing: border-box;
  line-height: 1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
    height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

/* Selects that use .btn (kategori/märke): keep them light even if the browser/OS forces dark UI */
select.btn{
  background-color:#fff;
  color: var(--text);
  color-scheme: light;
}
select.btn option{
  background-color:#fff;
  color: var(--text);
}
/* Hover highlight for brand list (best-effort: styling of <option> varies between browsers) */
select.btn option:hover,
select.btn option:focus,
select.btn option:checked{
  background-color: rgba(37, 99, 235, 0.12);
}


.btn:hover{ text-decoration:none; background: rgba(17,24,39,0.03); }
.btn:active{ transform: translateY(0.5px); }
.btn:focus-visible{ outline:none; box-shadow: 0 0 0 4px var(--ring); }

.btn-accent{
  color:#fff;
  border-color: rgba(37,99,235,.35);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:
    0 10px 22px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-accent:hover{ filter: brightness(1.03); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.btn-ghost{
  background: rgba(255,255,255,.55);
  border-color: rgba(17,24,39,.10);
}

/* Form controls (global) */
label{ font-weight: 700; font-size: 13px; }

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea{
  width:100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  color: var(--text);
  font: inherit;
}

input::placeholder, textarea::placeholder{ color: rgba(107,114,128,0.85); }

input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 4px var(--ring);
}

select{ appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, rgba(17,24,39,.65) 50%),
  linear-gradient(135deg, rgba(17,24,39,.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

/* Small form layout primitives (used by search) */
.field{ display:flex; flex-direction:column; gap:8px; }
.checkline{ display:flex; align-items:center; gap:10px; font-weight:700; }
.checkline input{ width: 18px; height: 18px; }

/* Generic badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* Text helpers */
.small { color: var(--muted); font-size: 13px; }
.h1 { font-size: 22px; margin: 0; }
.h2 { font-size: 16px; margin: 0; color: var(--muted); font-weight: 600; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ===========================
   Annons-typ: Säljes / Köpes
   =========================== */
.badge-intent{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1;
  margin-left: 8px;
  transform: translateY(-1px);
  white-space: nowrap;
}

.badge-sell{
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.35);
  color: rgba(30,64,175,1);
}

.badge-buy{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.35);
  color: rgba(153,27,27,1);
}

.lst-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.lst-head-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.lst-head-left strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.price{
  white-space:nowrap;
  font-weight:700;
}
/* ===========================
   3D / metallic intent badges
   =========================== */

.badge-intent{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;

  /* 3D-känsla */
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 8px 14px rgba(0,0,0,.18),      /* mjuk drop shadow */
    0 2px 0 rgba(0,0,0,.22),         /* "kant" under */
    inset 0 1px 0 rgba(255,255,255,.20), /* top highlight */
    inset 0 -8px 12px rgba(0,0,0,.20);   /* inner depth */

  transform: translateY(-1px);
  white-space: nowrap;
  user-select: none;
}

/* Diagonal “glans” över mitten */
.badge-intent::before{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;

  /* två lager glans: diagonal band + mjuk toppglöd */
  background:
    linear-gradient(115deg,
      transparent 0%,
      rgba(255,255,255,.00) 32%,
      rgba(255,255,255,.22) 46%,
      rgba(255,255,255,.05) 58%,
      rgba(255,255,255,.00) 70%,
      transparent 100%),
    linear-gradient(to bottom,
      rgba(255,255,255,.22),
      rgba(255,255,255,.00) 55%,
      rgba(0,0,0,.10));
  mix-blend-mode: screen;
  opacity: .95;
}

/* Liten “specular” prick */
.badge-intent::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 10px;
  width: 16px;
  height: 8px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  opacity: .55;
}

/* SÄLJES (mörkare blå metallic) */
.badge-sell{
  color: rgba(235,245,255,1);
  background:
    linear-gradient(to bottom, rgba(40,84,165,1), rgba(18,44,105,1));
  border-color: rgba(255,255,255,.16);
}

/* KÖPES (mörkare röd metallic) */
.badge-buy{
  color: rgba(255,235,235,1);
  background:
    linear-gradient(to bottom, rgba(160,42,42,1), rgba(92,18,18,1));
  border-color: rgba(255,255,255,.14);
}

/* Optional: lite “press” på hover (om du vill) */
.lst-item:hover .badge-intent,
.table tr:hover .badge-intent{
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 10px 18px rgba(0,0,0,.20),
    0 2px 0 rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -10px 14px rgba(0,0,0,.22);
}

/* ── Favorit-hjärta ─────────────────────────────────────────────────────── */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform .15s, background .15s;
  flex-shrink: 0;
  padding: 0;
}
.fav-btn:hover  { transform: scale(1.15); background: var(--field); }
.fav-btn.active { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }
