/* Bidder UI styles. Mobile-first, plain HTML on the shared design tokens in theme.css —
   no component library. Lives here rather than inline in _BidderLayout.cshtml so phones
   fetch it once and cache it, instead of re-downloading it on every page navigation. */

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--fs-font);
    background: var(--fs-bg);
    color: var(--fs-text);
    line-height: 1.5;
}
.wrap { max-width: 640px; margin: 0 auto; padding: var(--fs-gap); }
header.site {
    display: flex; align-items: center; gap: 12px;
    padding: 12px var(--fs-gap);
    background: var(--fs-surface);
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
/* The logo is a link home; keep it looking like the logo, and give it a full-height
   tap target rather than the tight box the image alone would leave. */
header.site .home { display: inline-flex; align-items: center; padding: 2px; }
header.site img { height: 40px; display: block; }
header.site .title { font-weight: 600; font-size: 1.05rem; }
.card {
    background: var(--fs-surface);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
    padding: var(--fs-gap);
    margin-bottom: var(--fs-gap);
}
/* height:auto keeps the intrinsic width/height attributes on each img (which are what
   reserve the space before it loads) from squashing it once width:100% takes over. */
.card img { width: 100%; height: auto; border-radius: calc(var(--fs-radius) - 4px); }
.muted { color: var(--fs-text-muted); font-size: .9rem; }
.price { font-size: 1.15rem; }
a { color: var(--fs-primary); }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 500; }
label { display: block; font-weight: 500; margin-bottom: 4px; }
input[type=email], input[type=tel], input[type=number], input[type=text], select {
    width: 100%; min-height: 44px; padding: 10px 12px;
    font: inherit; color: inherit;
    border: 1px solid var(--fs-border); border-radius: calc(var(--fs-radius) - 4px);
    background: var(--fs-bg); margin-bottom: 12px;
}
#pickup-proxy-fields {
    border-left: 3px solid var(--fs-border); padding: 4px 0 4px 10px; margin-bottom: 12px;
}
/* Pickup options: one radio card per option, with its address, times, contact and
   notes on screen at once. Bidders pick where a piece goes while standing in a loud
   room on a phone — a dropdown hid every one of those details behind a tap, and hid
   the differences between options entirely. */
.pickup-group { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.pickup-group > legend { padding: 0; font-weight: 500; margin-bottom: 4px; }
.pickup-opt {
    border: 1px solid var(--fs-border);
    border-radius: calc(var(--fs-radius) - 4px);
    background: var(--fs-bg);
    padding: 12px; margin-bottom: 8px;
}
/* :has() covers browsers that support it; .is-selected is set server-side for the
   initial paint and kept in sync by the script, so neither path stands alone. */
.pickup-opt:has(input[type=radio]:checked),
.pickup-opt.is-selected {
    border-color: var(--fs-primary);
    box-shadow: inset 0 0 0 1px var(--fs-primary);
}
.pickup-opt-head {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0; font-weight: 600; cursor: pointer;
}
.pickup-opt input[type=radio] {
    flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0;
    accent-color: var(--fs-primary);
}
.pickup-opt .pickup-details { margin: 8px 0 0 30px; }
/* Gallery gear + pickup flyout. Slides from the right on a phone, which is where
   every bidder is; the scrim below it closes on tap. */
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.gear {
    flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--fs-surface); color: var(--fs-text);
    border: 1px solid var(--fs-border); border-radius: calc(var(--fs-radius) - 4px);
}
.gear:active { filter: brightness(1.2); }
.flyout-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 20; }
.flyout {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
    width: min(420px, 92vw);
    background: var(--fs-surface);
    border-left: 1px solid var(--fs-border);
    box-shadow: -4px 0 16px rgba(0,0,0,.5);
    display: flex; flex-direction: column;
}
.flyout-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px var(--fs-gap);
    border-bottom: 1px solid var(--fs-border);
}
.flyout-close {
    width: 44px; height: 44px; padding: 0; flex: 0 0 auto;
    font-size: 1.6rem; line-height: 1;
    background: transparent; color: var(--fs-text); border: 0;
}
/* The panel scrolls, not the page behind it — the option list can outgrow a phone. */
.flyout-body { padding: var(--fs-gap); overflow-y: auto; -webkit-overflow-scrolling: touch; }
[hidden] { display: none !important; }
.pickup-opt .pickup-details p { margin: 2px 0; }
button, .btn {
    display: inline-block; width: 100%; min-height: 44px;
    background: var(--fs-primary); color: #fff;
    font: inherit; font-weight: 600;
    border: none; border-radius: calc(var(--fs-radius) - 4px);
    padding: 10px 24px; cursor: pointer; text-align: center; text-decoration: none;
}
button:active, .btn:active { filter: brightness(.92); }
.error { color: #FF7675; font-weight: 500; }
.success { color: #00B894; font-weight: 500; }
.bid-history { list-style: none; margin: 8px 0 0 0; padding: 8px 0 0 0; border-top: 1px solid var(--fs-border); }
.bid-history li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.gallery { display: grid; grid-template-columns: 1fr; gap: var(--fs-gap); }
@media (min-width: 480px) { .gallery { grid-template-columns: 1fr 1fr; } }
footer.site { text-align: center; padding: 24px; }
footer.site form { display: inline; }
footer.site button { width: auto; background: none; color: var(--fs-text-muted); font-weight: 400; text-decoration: underline; min-height: 0; padding: 4px; }
