/* Auction floor presentation only. Saved catalogue modes, live state, fees,
   eligibility and every bidding action keep their existing owners. Loaded
   after the classic and catalogue styles, on bidding sales in the default
   bidder view only: Buy Now floors and the staff rollback never load it. */

html.calm header.auction-intro {
  padding-top: .7rem;
}
html.calm header.auction-intro h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.2;
}
html.calm .floor-delivery {
  margin-top: .5rem;
}
.auction-delivery-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}
.auction-delivery-details > summary {
  min-height: 44px;
  padding: .65rem .75rem;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word; /* Safari before 15.4 has no overflow-wrap: anywhere */
  overflow-wrap: anywhere;
}
.auction-delivery-hint {
  margin-left: .6rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.auction-delivery-details[open] > summary {
  border-bottom: 1px solid var(--line);
}
.auction-delivery-details > summary:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.auction-delivery-details .delivery-strip {
  margin: 0;
  border: 0;
  box-shadow: none;
}

/* Native selects must shrink with the filter tray. Intrinsic option widths
   otherwise widen a phone, especially at enlarged text. */
html.calm .browse-toolbar > .floor-filters {
  min-width: 0;
  max-width: 100%;
}
html.calm .floor-filters > select,
html.calm .floor-filters > #lotjumpform {
  max-width: calc(100% - 8px);
}
html.calm #lotjumpform { min-width: 0; }
html.calm #lotjumpform label { word-break: break-word; overflow-wrap: anywhere; }

/* Delivery and packaging words remain visible in narrow Rows/Grid cards. */
html.calm body.cv3 main.auction-grid .cv3-disclose > span {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Native card actions are unchanged, but secondary actions follow the bid
   and its total. Condition, delivery and safety disclosures remain above it. */
html.calm .auction-card-secondary { margin-top: .5rem; }
/* The bidder's standing (LEADING, STILL OUTBID, WON) stays in the decision
   zone above the bid, where it always was. Its rail takes no room while the
   pill is hidden, so a card nobody has bid on gives that line to the bid. */
html.calm .offer.offer--standing {
  justify-content: flex-end;
  min-height: 0;
  margin-top: 0;
}
/* Not a control: a compact line, so an outbid or leading bidder still has the
   bid button and its all-in total on a phone's first screen. */
html.calm .offer.offer--standing .standing-phase {
  min-height: 1.4rem;
  margin-top: .2rem;
  padding: .16rem .5rem;
}
/* Spacing is carried by margins, never by a flex gap: Safari before 14.1 (the
   bidder floor is 13.1.2) ignores gap in a flex row and the two buttons would
   touch. calm-watch.css already makes Save lot a 44px target like Share. */
html.calm .auction-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
html.calm .auction-card-actions > * {
  margin: .5rem 0 0 .5rem;
}

/* Compact search and Filters on a phone in the fixed operator modes (Classic,
   Rows, Rows/Grid): one row instead of two. Under "Let bidders choose" the
   toolbar is exactly as calm-watch.css lays it out: search on its own row,
   then Filters with the bidder's View pair beside it. */
@media (max-width: 640px) {
  /* calm-watch.css keeps the two-line clamp so a long auction name never
     pushes the toolbar, fees, delivery and first lot off the first screen. */
  html.calm header.auction-intro h1 {
    font-size: 1.25rem;
  }
  html.calm body:not([data-catalogue-layout="bidders_choose"]) .browse-toolbar > .lot-search {
    flex: 1 1 10rem;
    margin-right: 8px !important;
  }
  html.calm body:not([data-catalogue-layout="bidders_choose"]) .browse-toolbar > .more-filters-toggle {
    flex: 0 0 auto;
  }
  html.calm .floor-controls > .public-fee-notice,
  html.calm .floor-controls > .floor-fee-notice {
    margin-top: .1rem;
    line-height: 1.4;
  }
  html.calm .floor-delivery {
    margin-top: .4rem;
  }
  html.calm main.auction-grid {
    padding-top: .5rem !important;
  }
  /* Classic photos keep watch.html's width-responsive 4:3 area and contain
     fit. A fixed phone height shrinks square and portrait goods into a small
     thumbnail as the card widens. Let the bid controls follow the larger
     photo naturally. Only bidding lots on a Classic board are touched:
     sponsors, Buy Now lots, and every card on a Rows or Grid board (its
     grouped-product fallback cards included) keep their own media. */
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) {
    padding: .6rem;
    border-radius: 12px;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) > .auction-video-media {
    flex: 0 0 120px !important;
    height: 120px;
    min-height: 120px !important;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) > .auction-video-media video {
    object-fit: contain !important;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) h2 {
    font-size: 1rem;
    line-height: 1.3;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .card-gallery {
    margin-bottom: .25rem;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .card-chips {
    margin-bottom: 0;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .tile-meta {
    margin-bottom: .1rem !important;
    row-gap: .1rem !important;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .bid-tools {
    flex-wrap: wrap;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .bid-tools .allin {
    flex: 1 1 100%;
  }
  html.calm body:not(.cv3) main.auction-grid .lot[data-sale-format="auction"]:not(.sponsor) .max-toggle {
    max-width: 100%;
    margin: .4rem 0 0 auto;
    white-space: normal;
  }
}

@media (max-width: 699px) {
  /* Keep the saved Grid choice: two columns, as before, at every phone width.
     Only when enlarged text makes two legible cards impossible (a card would
     be under 8.5rem) does the board fall to one column. Never three, and
     never a cropped price or countdown. The track floor is just under half
     the board, so exactly two fit across the 10px gap; auto-fill keeps an
     empty second track, so a single visible lot stays half the board. */
  html.calm body.cv3--grid main.auction-grid {
    grid-template-columns: repeat(auto-fill, minmax(max(calc(50% - 6px), min(100%, 8.5rem)), 1fr)) !important;
  }
}

@media (max-width: 360px) {
  .auction-delivery-hint {
    display: block;
    margin-left: 1.1rem;
  }
}
