/* SOP the FLOW — Planer layout/responsive overrides (v1.1.1 patch)
   Fixes: topbar overflow covering panels/canvas, cramped controls,
   mobile ergonomics, statusbar wrap, inspector tabs. */

:root {
  --topbar-h: 48px;
  --control-h: 36px;
  --rail-w: 220px;
  --inspector-w: 320px;
  --gap: 10px;
  --pad: 14px;
  --touch-min: 44px;
}

/* --- Topbar: never paint over the workspace --- */
.topbar {
  height: auto;
  min-height: var(--topbar-h);
  max-height: none;
  align-items: start;
  gap: 8px 12px;
  padding: 8px 12px;
  overflow: visible;
  z-index: 20;
  background: var(--ground);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-left,
.topbar-center,
.topbar-right {
  flex-wrap: wrap;
  row-gap: 6px;
  align-items: center;
  align-self: center;
  min-width: 0; /* allow grid tracks to shrink; prevent spill into neighbors */
  max-width: 100%;
}

.topbar-center {
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.topbar-cluster {
  flex-wrap: wrap;
  row-gap: 4px;
  padding-right: 6px;
  margin-right: 2px;
}

.topbar .seg {
  flex-wrap: nowrap;
  max-width: 100%;
}

.topbar .icon-btn {
  flex-shrink: 0;
}

/* Wide desktop: keep a single tidy row when space allows */
@media (min-width: 1280px) {
  .topbar {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
    align-items: center;
    padding: 6px 12px;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    flex-wrap: nowrap;
  }

  .topbar-center {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    justify-content: center;
    max-width: 100%;
    padding-bottom: 0;
  }

  .topbar-center::-webkit-scrollbar {
    height: 4px;
  }

  .topbar-center::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
  }
}

/* Mid desktop / laptop: hide verbose labels before they wrap into panels */
@media (max-width: 1480px) {
  .topbar-center .icon-btn-label {
    display: none;
  }

  .topbar-center .icon-btn.with-label {
    padding-right: 8px;
    min-width: 36px;
    justify-content: center;
  }
}

@media (max-width: 1360px) {
  .topbar-right .icon-btn-label {
    display: none;
  }

  .topbar-right .icon-btn.with-label {
    padding-right: 8px;
    min-width: 36px;
    justify-content: center;
  }

  .topbar-label {
    display: none;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1180px) {
  .app-logo-author,
  .app-logo-sub {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    justify-content: flex-start;
    width: 100%;
  }

  .topbar-center,
  .topbar-right {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-cluster {
    flex-shrink: 0;
  }
}

/* --- Main workspace --- */
.main {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.left-panel,
.right-panel {
  z-index: 2;
}

.canvas-area {
  z-index: 1;
}

/* Inspector tabs: badge must not crush label */
.inspector-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.inspector-tabs button {
  min-width: 0;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tabs .tab-badge {
  flex-shrink: 0;
  margin-left: 0;
}

/* Material grid breathing room */
.material-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.material-grid button {
  min-width: 0;
}

/* Statusbar: scroll instead of stacking over content */
.statusbar {
  gap: 10px 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
  padding: 6px 12px;
  min-height: 32px;
  max-height: 40px;
  align-items: center;
  -webkit-overflow-scrolling: touch;
  z-index: 15;
}

.statusbar span,
.statusbar-alert,
.statusbar-meta {
  flex-shrink: 0;
}

.toast {
  bottom: calc(40px + env(safe-area-inset-bottom, 0px) + 12px);
  max-width: min(90vw, 420px);
  text-align: center;
}

/* Help / menus above canvas */
.help-popover,
.menu-panel {
  z-index: 50;
}

.menu-panel {
  max-height: min(70vh, 480px);
  overflow: auto;
}

/* --- Tablet --- */
@media (max-width: 980px) {
  :root {
    --rail-w: 196px;
    --inspector-w: 240px;
    --pad: 12px;
  }

  .main {
    padding: 0 6px 6px;
    gap: 6px;
  }

  .left-panel,
  .right-panel {
    border-radius: 10px;
  }

  .topbar .icon-btn {
    min-height: 36px;
    height: 36px;
  }
}

/* --- Mobile --- */
@media (max-width: 720px) {
  :root {
    --fs-body: 14px;
    --fs-small: 12px;
    --pad: 12px;
  }

  .app {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Three full-width bands — each scrolls horizontally, never collapses to 0 */
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "left"
      "center"
      "right";
    align-items: stretch;
    padding: 8px 10px;
    gap: 6px;
    border-bottom: 1px solid var(--border);
  }

  .topbar-left {
    grid-area: left;
  }

  .topbar-center {
    grid-area: center;
  }

  .topbar-right {
    grid-area: right;
  }

  .topbar-left::-webkit-scrollbar,
  .topbar-center::-webkit-scrollbar,
  .topbar-right::-webkit-scrollbar {
    display: none;
  }

  .app-logo {
    flex-shrink: 0;
  }

  .app-logo img {
    height: 20px;
  }

  .app-logo-sub,
  .app-logo-author,
  .topbar-label {
    display: none !important;
  }

  .topbar-left,
  .topbar-center,
  .topbar-right {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    min-height: 40px;
  }

  .topbar-center,
  .topbar-right {
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .topbar-cluster {
    border-right: 0;
    padding-right: 0;
    margin-right: 0;
    flex-shrink: 0;
  }

  .topbar .icon-btn,
  .topbar .seg .icon-btn {
    min-height: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 8px;
  }

  /* Keep primary actions reachable; tuck rare ones further in the scroll strip */
  .topbar-right .icon-btn[title="Skróty klawiszowe"] {
    opacity: 0.85;
  }

  .topbar .icon-btn-label {
    display: none !important;
  }

  .topbar .seg {
    flex-shrink: 0;
  }

  .main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    gap: 0;
  }

  /* Mobile tab panels: sheet under chrome, never over canvas controls */
  .left-panel,
  .right-panel {
    width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .app.mobile-tab-tools .panel-tools,
  .app.mobile-tab-props .panel-props {
    max-height: min(46vh, 420px);
    order: 3;
    border-top: 1px solid var(--border);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app.mobile-tab-plan .panel-plan {
    display: flex;
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
  }

  .canvas-area {
    order: 1;
    flex: 1 1 auto;
    min-height: min(52vh, 420px);
    border-radius: 0;
  }

  .app.mobile-tab-plan .canvas-area {
    min-height: 0;
    flex: 1;
  }

  .app.mobile-tab-tools .canvas-area,
  .app.mobile-tab-props .canvas-area {
    min-height: 34vh;
    flex: 1 1 auto;
  }

  .canvas-area.split {
    flex-direction: column;
  }

  .canvas-area.split > * {
    flex: 1 1 50%;
    min-height: 160px;
  }

  .tool-row {
    min-height: var(--touch-min);
    height: auto;
    padding: 8px 12px;
  }

  .field {
    flex-wrap: wrap;
    min-height: var(--touch-min);
  }

  .field input {
    width: 100%;
    max-width: 160px;
    height: 40px;
  }

  .btn-row button,
  .scan-autofix,
  .nudge-pad button {
    min-height: var(--touch-min);
    height: auto;
    padding: 8px 12px;
  }

  .inspector-tabs button {
    height: 40px;
    font-size: 12px;
  }

  .material-grid {
    grid-template-columns: 1fr 1fr;
  }

  .material-grid button {
    min-height: 44px;
    font-size: 12px;
  }

  /* Status: essential metrics only, one scrollable strip */
  .statusbar {
    max-height: none;
    min-height: 36px;
    padding: 6px 10px;
    gap: 12px;
    font-size: 11px;
    order: 4;
  }

  .statusbar > span:nth-child(n + 6):not(.statusbar-alert):not(.statusbar-meta) {
    display: none;
  }

  .mobile-tabs {
    order: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    z-index: 25;
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--panel);
  }

  .mobile-tabs button {
    height: 48px;
    font-size: 13px;
    font-weight: 500;
  }

  .plan-empty {
    padding: 16px;
    gap: 10px;
  }

  .plan-empty h3 {
    font-size: 16px;
  }

  .plan-empty .btn-row {
    flex-direction: column;
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .plan-empty .btn-row button {
    width: 100%;
    min-height: var(--touch-min);
  }

  .shopping-drawer {
    width: 100%;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-card {
    width: 100%;
    max-height: min(88vh, 720px);
    border-radius: 12px 12px 0 0;
    margin-top: auto;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .help-popover {
    top: auto;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .topbar .icon-btn-label {
    display: none;
  }

  .statusbar-meta {
    display: none;
  }
}

/* Prefer reduced motion already handled in base; keep overrides calm */
@media (prefers-reduced-motion: reduce) {
  .topbar-center,
  .topbar-right,
  .statusbar {
    scroll-behavior: auto;
  }
}

/* --- Catalog thumbs & product cards --- */
.catalog-grid.product-catalog {
  gap: 8px;
  padding-right: 2px;
}

.product-card {
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 8px !important;
  gap: 10px !important;
  min-height: 72px;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
}

.product-card:hover {
  border-color: var(--border-strong) !important;
  background: var(--raised) !important;
}

/* Active: outline + raised panel — keep text readable (no solid accent fill) */
.product-card.active,
.product-card:focus-visible {
  background: var(--panel-2) !important;
  border-color: var(--chart) !important;
  box-shadow: inset 3px 0 0 var(--chart), 0 0 0 1px color-mix(in srgb, var(--chart) 35%, transparent) !important;
  color: var(--text) !important;
}

.product-card.active .product-name,
.product-card.active .product-sub,
.product-card.active .product-sku,
.product-card.active .product-price,
.product-card.active .muted {
  color: inherit;
}

.product-card.active .product-sub,
.product-card.active .product-sku,
.product-card.active .muted {
  color: var(--muted);
}

.product-card.active .product-price {
  color: var(--text);
}

.product-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.product-meta {
  gap: 3px;
  min-width: 0;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-sub {
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title-row {
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.store-badge {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.chip-row {
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.chip-row button.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--on-accent) !important;
  box-shadow: none;
}

/* Keep store chips brand-colored when active */
.chip-row button.store-chip.store-ikea.active {
  background: var(--ikea) !important;
  border-color: var(--ikea) !important;
  color: var(--ikea-fg) !important;
}
.chip-row button.store-chip.store-castorama.active {
  background: var(--castorama) !important;
  border-color: var(--castorama) !important;
  color: #fff !important;
}
.chip-row button.store-chip.store-brw.active {
  background: var(--brw) !important;
  border-color: var(--brw) !important;
  color: #fff !important;
}

.search {
  height: 38px;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Material swatches: clearer selected state */
.material-grid button.active {
  border-color: var(--chart);
  box-shadow: inset 0 0 0 1px var(--chart);
}

.material-grid .swatch,
.material-current .swatch {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
}

/* --- Furniture placement / DnD --- */
.product-card:active {
  cursor: grabbing;
}

body.planer-dragging,
body.planer-dragging * {
  cursor: grabbing !important;
}

body.planer-placing .plan-svg,
body.planer-dragging .plan-svg {
  cursor: copy;
}

body.planer-placing .viewport-2d-inner,
body.planer-dragging .viewport-2d-inner,
body.planer-placing .plan-svg,
body.planer-dragging .plan-svg {
  touch-action: none;
}

.planer-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(240px, 70vw);
  padding: 6px 10px 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  will-change: transform;
}

.planer-drag-ghost img,
.planer-drag-ghost-swatch {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--raised);
  border: 1px solid var(--border);
}

.planer-drag-ghost span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.planer-drop-hover .plan-svg.planer-drop-target,
.plan-svg.planer-drop-target {
  outline: 2px dashed color-mix(in srgb, var(--chart) 70%, transparent);
  outline-offset: -4px;
  background-color: color-mix(in srgb, var(--chart) 6%, transparent);
}

body.planer-dragging .planer-drag-ghost {
  opacity: 0.96;
}

/* --- Wall / door / window preset library --- */
.planer-library-presets {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 45;
  width: min(920px, calc(100vw - 16px));
  max-height: min(42vh, 280px);
  overflow: auto;
  pointer-events: none;
}

.planer-library-presets-inner {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.planer-library-presets-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.planer-library-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.planer-library-group-label {
  flex: 0 0 auto;
  min-width: 72px;
  font-size: 11px;
  color: var(--muted);
}

.planer-library-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.planer-library-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.planer-library-chip:hover {
  border-color: var(--border-strong);
}

.planer-library-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.planer-library-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

@media (min-width: 981px) {
  .planer-library-presets {
    bottom: 28px;
    left: calc(50% + 24px);
    max-height: min(36vh, 260px);
  }
}

@media (max-width: 980px) {
  body.planer-presets-open .statusbar {
    opacity: 0.35;
    pointer-events: none;
  }

  body.planer-presets-open .toast {
    bottom: calc(160px + env(safe-area-inset-bottom, 0px));
  }

  body.planer-presets-open .canvas-area,
  body.planer-presets-open .panel-plan {
    padding-bottom: 8px;
  }
}

/* Opening placement feedback */
body.planer-placing-opening .plan-svg [data-plan-entity="wall"] {
  cursor: crosshair !important;
  filter: brightness(1.15);
}

body.planer-placing-door .plan-svg,
body.planer-placing-window .plan-svg {
  cursor: crosshair;
}

.planer-opening-ghost .planer-opening-ghost-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 600;
}

.planer-openings-toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  max-width: min(92vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.planer-openings-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 981px) {
  .planer-openings-toast {
    bottom: 88px;
  }
}

/* --- Inspector pro polish --- */
.panel-props .field {
  gap: 6px;
  margin-bottom: 10px;
}

.planer-size-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.planer-size-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.planer-size-fields input {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.panel-props .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.panel-props .btn-row button {
  min-height: 34px;
}

.panel-props .btn-row button.danger,
.panel-props button.danger {
  border-color: color-mix(in srgb, var(--negative) 50%, var(--border));
  color: var(--negative);
}

.planer-sel-status {
  color: var(--accent-hover);
  font-weight: 500;
}

body.planer-recording::after {
  content: "REC";
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 70;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Swap product modal */
.planer-swap-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--modal-scrim);
}

.planer-swap-modal[hidden] {
  display: none !important;
}

.planer-swap-card {
  width: min(720px, 100%);
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.planer-swap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.planer-swap-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.planer-swap-search {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  padding: 0 12px;
}

.planer-swap-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.planer-swap-chips button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  font-size: 11px;
}

.planer-swap-chips button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.planer-swap-grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding-right: 2px;
}

.planer-swap-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

.planer-swap-item:hover {
  border-color: var(--chart);
}

.planer-swap-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.planer-swap-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.planer-swap-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.planer-swap-meta strong {
  font-size: 13px;
}

.planer-swap-meta small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
