/* =============================================================
   myproperty.now — Components EXTENSION
   Lädt nach components.css und ergänzt um:
   - LeftRail-Navi
   - Ticker-Strip
   - Auction-Ring
   - Heatmap
   - Wizard-Stepper
   - Bento-Tile
   - Land-Card
   ============================================================= */

/* --- LEFT RAIL (vertikale Hauptnavi, ersetzt das zentrale IconNav) --- */
.im-leftrail {
  width: 76px;
  background: var(--bg-raised);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: var(--s-4) 0;
  position: sticky; top: 0;
  height: 100vh;
  z-index: 20;
  flex-shrink: 0;
}
.im-leftrail-logo {
  width: 40px; height: 40px;
  background: var(--accent); color: var(--text-on-accent);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md);
  margin-bottom: var(--s-5);
  box-shadow: 0 0 24px var(--accent-glow);
}
.im-leftrail-group {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line-soft);
  width: 100%;
}
.im-leftrail-group:first-of-type { border-top: 0; }
.im-leftrail-btn {
  position: relative;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  color: var(--text-mid);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.im-leftrail-btn:hover { background: var(--bg-elev); color: var(--text-hi); }
.im-leftrail-btn.is-active {
  background: var(--accent-wash); color: var(--accent);
  border-color: var(--accent-line);
  box-shadow: 0 0 16px var(--accent-glow);
}
.im-leftrail-btn.is-active::before {
  content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px;
  width: 3px; background: var(--accent); border-radius: 2px;
}
.im-leftrail-btn svg { width: 18px; height: 18px; }
.im-leftrail-btn .badge {
  position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.im-leftrail-btn .num {
  position: absolute; top: 2px; right: 2px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  background: var(--accent); color: var(--text-on-accent);
  padding: 0 4px; border-radius: 8px; min-width: 14px; height: 14px; line-height: 14px;
}
.im-leftrail-btn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  background: var(--bg-hi); color: var(--text-hi);
  font-size: var(--fs-xs); padding: 4px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  white-space: nowrap; z-index: 100;
  font-family: var(--font-sans);
}
.im-leftrail-num {
  font-family: var(--font-mono); font-size: var(--fs-3xs);
  color: var(--text-faint); letter-spacing: var(--tr-mono);
  text-transform: uppercase; margin-top: 4px;
}

/* --- TICKER STRIP --- */
.im-ticker-strip {
  display: flex; align-items: center; gap: var(--s-6);
  padding: 10px var(--s-6);
  background: linear-gradient(90deg, var(--bg-raised), var(--bg-base));
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--fs-xs);
  overflow: hidden; white-space: nowrap;
}
.im-ticker-item { display: inline-flex; gap: var(--s-2); align-items: center; }
.im-ticker-item .k { color: var(--text-lo); letter-spacing: var(--tr-mono); text-transform: uppercase; font-size: var(--fs-2xs); }
.im-ticker-item .v { color: var(--text-hi); font-weight: 500; }
.im-ticker-item .d { font-size: var(--fs-2xs); padding: 1px 4px; border-radius: 3px; }

/* --- AUCTION RING (Countdown) --- */
.im-auction-ring {
  --pct: 65;
  --size: 96px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line) 0);
  display: grid; place-items: center;
  position: relative;
}
.im-auction-ring::before {
  content: ""; position: absolute; inset: 6px;
  background: var(--bg-raised); border-radius: 50%;
}
.im-auction-ring .v {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md);
  color: var(--accent); text-align: center;
  line-height: 1.1;
}
.im-auction-ring .v small { display: block; font-size: var(--fs-2xs); color: var(--text-lo); font-weight: 500; }

/* --- HEATMAP CELL --- */
.im-heat {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px;
}
.im-heat .cell {
  aspect-ratio: 1; border-radius: 2px;
  background: rgba(167,139,250, calc(var(--i, 0)));
}

/* --- WIZARD STEPPER --- */
.im-wizard {
  display: flex; gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-raised);
}
.im-wizard-step {
  flex: 1; padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; gap: var(--s-2);
  border-right: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-lo);
  position: relative;
}
.im-wizard-step:last-child { border-right: 0; }
.im-wizard-step .n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-base); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  color: var(--text-mid);
}
.im-wizard-step.is-done { color: var(--text-mid); }
.im-wizard-step.is-done .n { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.im-wizard-step.is-active { color: var(--text-hi); background: var(--accent-wash); }
.im-wizard-step.is-active .n { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }

/* --- BENTO TILE --- */
.im-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--s-4);
}
.im-bento-tile {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  display: flex; flex-direction: column;
}
.im-bento-tile:hover {
  border-color: var(--accent-line);
  background: var(--bg-elev);
  box-shadow: var(--sh-3);
  transform: translateY(-2px);
}
.im-bento-tile.is-2x { grid-column: span 2; }
.im-bento-tile.is-2y { grid-row: span 2; }
.im-bento-tile .ico { color: var(--accent); margin-bottom: var(--s-3); }
.im-bento-tile .ico svg { width: 22px; height: 22px; }
.im-bento-tile .t { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 4px; }
.im-bento-tile .d { font-size: var(--fs-xs); color: var(--text-mid); }

/* --- LAND CARD --- */
.im-land {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
}
.im-land:hover { border-color: var(--accent-line); box-shadow: var(--sh-3); }
.im-land-sat {
  aspect-ratio: 16/10;
  background:
    radial-gradient(circle at 40% 30%, rgba(52,211,153,.3), transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(245,176,66,.2), transparent 40%),
    repeating-linear-gradient(45deg, rgba(167,139,250,.08), rgba(167,139,250,.08) 2px, transparent 2px, transparent 12px),
    var(--bg-elev);
  position: relative;
}
.im-land-sat svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.im-land-body { padding: var(--s-4); }

/* --- ALERT / Banner --- */
.im-alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.im-alert.is-warn  { background: var(--warn-wash);  border-color: rgba(245,176,66,.3);  border-left-color: var(--warn); }
.im-alert.is-ok    { background: var(--ok-wash);    border-color: rgba(52,211,153,.3);  border-left-color: var(--ok); }
.im-alert.is-bad   { background: var(--bad-wash);   border-color: rgba(248,113,113,.3); border-left-color: var(--bad); }

/* --- TIMELINE / Activity feed --- */
.im-timeline { position: relative; padding-left: var(--s-5); }
.im-timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 1px; background: var(--line);
}
.im-tl-item { position: relative; padding: var(--s-2) 0 var(--s-4); }
.im-tl-item::before {
  content: ""; position: absolute; left: -20px; top: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--bg-base), 0 0 12px var(--accent-glow);
}
.im-tl-item .when {
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--text-lo); letter-spacing: var(--tr-mono); text-transform: uppercase;
}
.im-tl-item .what { font-size: var(--fs-sm); color: var(--text-hi); margin-top: 2px; }

/* --- WIDGET (drag-rearrangeable look) --- */
.im-widget {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.im-widget::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 2px;
  background: var(--line-strong);
  opacity: 0; transition: opacity var(--dur-1);
}
.im-widget:hover::before { opacity: 1; }

/* --- COMMAND PALETTE (visuell) --- */
.im-cmdk {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; max-width: 90vw;
  background: var(--bg-hi);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3), 0 0 80px var(--accent-glow);
}
.im-cmdk-input {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4); border-bottom: 1px solid var(--line);
}
.im-cmdk-input input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text-hi); font-size: var(--fs-lg); font-family: var(--font-sans);
}

/* compact responsive helpers */
.im-grid.c6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) {
  .im-grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .im-grid.c3 { grid-template-columns: repeat(2, 1fr); }
  .im-bento { grid-template-columns: repeat(2, 1fr); }
}
