/* RF-AVALON Market V61.0.106
   Stable preflight card, selection layering/deselect UX, tooltip separators. */

/* Preflight keeps exactly the same card geometry in idle/checking/ready/error. */
.item-sale-summary .v61-preflight,
.item-sale-summary .v61-preflight.ready,
.item-sale-summary .v61-preflight.failed {
  background: linear-gradient(180deg, rgba(15,23,36,.94), rgba(16,24,37,.985)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.item-sale-summary .v61-preflight.ready {
  border-color: rgba(68,193,132,.34) !important;
}
.item-sale-summary .v61-preflight.failed {
  border-color: rgba(220,101,101,.34) !important;
}
.item-sale-summary .v61-preflight-row small:empty {
  display: none !important;
}

/* The selected item must be highlighted, but its parent stacking context must
   never sit above another item's tooltip. V105 used z-index:30 here, which is
   why the selected icon/check appeared through a hovered card. */
.item-sale-bag .equipment-slot.selected {
  z-index: 2 !important;
}
.item-sale-bag .equipment-slot:hover,
.item-sale-bag .equipment-slot:focus-visible,
.item-sale-bag .equipment-slot:focus-within {
  z-index: 80 !important;
}
.item-sale-bag .equipment-slot.selected .v105-selected-check {
  z-index: 6 !important;
}

/* The right summary is an obvious secondary way to clear selection. */
.item-sale-summary .item-sale-selected:not(.empty) {
  cursor: pointer !important;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease !important;
}
.item-sale-summary .item-sale-selected:not(.empty):hover {
  border-color: rgba(255,184,76,.78) !important;
  box-shadow: inset 3px 0 #f3a125, 0 0 0 1px rgba(255,166,42,.12), 0 0 16px rgba(255,143,16,.12) !important;
}

/* Desktop sale-form tooltips are deliberately opaque. Combined with the
   corrected z-index above, inventory cells can no longer show through them. */
.item-sale-modal .item-tooltip,
.v61-mobile-tooltip-sheet.item-tooltip {
  background:
    linear-gradient(180deg, rgba(15,20,24,.995), rgba(7,12,15,.998)),
    #080d11 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Temporary items previously had border-bottom on the timer immediately
   followed by border-top on the generic summary. Keep exactly one separator. */
.item-tooltip .item-temporary-time + .item-game-special-v59.item-game-strict-v60,
.v61-mobile-tooltip-sheet .item-temporary-time + .item-game-special-v59.item-game-strict-v60 {
  border-top: 0 !important;
  margin-top: 0 !important;
}

/* V105 already removed the duplicate lower line. Reinforce it for every clone
   and every generic resource/potion card regardless of parent context. */
.item-game-special-v59.item-game-strict-v60 {
  border-bottom: 0 !important;
}

@media (max-width: 760px) {
  .item-sale-summary .item-sale-selected:not(.empty) {
    -webkit-tap-highlight-color: transparent !important;
  }
}
