/* Bidding dashboard, Ray White Brand in brief. Uses the variables defined in session.css. */
body { font-family: 'Lato', Arial, sans-serif; background: var(--rw-light); color: var(--rw-grey); }

/* ---------- Header ---------- */
.address { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 96px; min-height: 0; padding: 0 32px; background: #fff; color: var(--rw-grey); }
.header-content { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; max-width: none; font-size: 30px; }
.header-lot { background: var(--rw-yellow); color: var(--rw-grey); font-weight: 700; padding: 8px 20px; white-space: nowrap; }
.header-address { color: var(--rw-grey); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; gap: 12px; }

/* ---------- Buttons ---------- */
.hdr-btn, #container .button-container button {
    font: 700 17px 'Lato', Arial, sans-serif; color: var(--rw-grey); background: #fff;
    border: 1px solid var(--rw-grey); border-radius: 2px; margin: 0; cursor: pointer; transition: background-color .15s;
}
.hdr-btn { width: auto; height: 44px; padding: 0 20px; }
.hdr-btn:hover, #container .button-container button:hover { background: var(--rw-light); }
.hdr-btn:active, #container .button-container button:active { background: var(--rw-line); }
.hdr-btn.active { background: var(--rw-yellow) !important; border-color: var(--rw-grey) !important; }
.hdr-btn:focus-visible, #container button:focus-visible, #quick-switch-sidebar .qs-lot-item:focus-visible { outline: 3px solid var(--rw-grey); outline-offset: 2px; }

/* ---------- Layout ---------- */
#container { display: block; width: auto; margin-right: 320px; padding: 24px 32px 32px; }
.bid-hero, .bid-controls { max-width: 1000px; margin: 0 auto 16px; }

/* ---------- Current bid ---------- */
.bid-hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: var(--rw-yellow); padding: 24px 32px; }
#bid-status-label { margin: 0; font-size: 20px; font-weight: 700; }
.current-bid { font-size: 112px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bid-meta { display: grid; gap: 14px; min-width: 220px; padding-left: 32px; border-left: 2px solid var(--rw-grey); }
.meta-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.meta-label { font-weight: 300; font-size: 16px; }
.meta-value { font-weight: 700; font-size: 28px; font-variant-numeric: tabular-nums; padding: 0 8px; }
.meta-value.is-error { background: var(--rw-grey); color: #fff; }

/* ---------- Controls ---------- */
.bid-controls { background: #fff; padding: 24px; }
.new-bid { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
#warning-msg { margin: 0; flex: 0 0 150px; font-size: 18px; font-weight: 700; }
#warning-msg.is-error { background: var(--rw-grey); color: #fff; padding: 6px 12px; }
#container .new-bid-free { flex: 1; height: 72px; font: 700 44px 'Lato', Arial, sans-serif; color: var(--rw-grey); text-align: center; border: 2px solid var(--rw-grey); border-radius: 2px; padding: 0 16px; }
#container .new-bid-free:focus { outline: none; box-shadow: 0 0 0 3px var(--rw-yellow); }

/* Button grid: a 3-column main block (632px) with a side column offset to its right.
   Rows are left-aligned so every row shares the same left edge and columns line up. */
#container .button-container { display: flex; flex-wrap: wrap; justify-content: flex-start; width: 914px; max-width: 100%; margin: -16px auto 0; }
#container .button-container button { display: block; width: 200px; height: auto; padding: 16px; margin: 16px 16px 0 0; font-size: 36px; text-align: center; }
#container .button-container .button-small { width: 146px; }
/* Bottom row: four buttons fill the same 632px as the rows above (4 widths + 3 gaps) */
#container .button-container .w-undo { width: 150px; }
#container .button-container .w-clear { width: 170px; }
#container .button-container .w-vb { width: 90px; }
#container .button-container .bid-button { width: 174px; background: var(--rw-yellow); }
#container .button-container .bid-button:hover { background: var(--rw-yellow-hover); }
#container .button-container .side-button { margin-left: 50px; }
#container .button-container button[data-action] { text-transform: uppercase; font-size: 30px; line-height: 43px; }
#container .button-container button.button-active { background: var(--rw-yellow) !important; }
#container .button-container [data-action="sold"] { background: var(--rw-grey); color: #fff; }
#container .button-container [data-action="sold"]:hover { background: #474747; }

/* ---------- Paddle capture: a column to the right of the bidding actions (1080p) ---------- */
.bid-hero, .bid-controls { max-width: 1500px; }
.bid-controls { display: grid; grid-template-columns: 914px minmax(0, 1fr); grid-template-areas: "bid panel" "btns panel"; column-gap: 32px; align-items: start; }
.bid-controls .new-bid { grid-area: bid; }
.bid-controls .button-container { grid-area: btns; margin: -16px 0 0; }
.bid-controls .paddle-panel { grid-area: panel; padding-left: 32px; border-left: 1px solid var(--rw-light); min-width: 0; }
.current-bidder { font-size: 20px; font-weight: 700; margin-top: 4px; min-height: 28px; }
.bid-controls { position: relative; }
/* Collapsed: the hero and controls shrink to the width of the action buttons (914px + 24px padding each side),
   the panel is removed from the layout, and a tab on the card's edge opens it again. */
#container.panel-collapsed .bid-hero, #container.panel-collapsed .bid-controls { max-width: 962px; }
#container.panel-collapsed .bid-controls { grid-template-columns: 914px; grid-template-areas: "bid" "btns"; justify-content: start; }
#container.panel-collapsed .paddle-panel { display: none; }
.paddle-tab { display: none; }
#container.panel-collapsed .paddle-tab { display: block; position: absolute; top: 24px; right: -34px; width: 34px; height: auto; margin: 0; padding: 16px 0; font: 700 14px 'Lato', Arial, sans-serif; letter-spacing: .04em; color: var(--rw-grey); background: #fff; border: 1px solid var(--rw-line); border-left: 0; border-radius: 0 4px 4px 0; writing-mode: vertical-rl; text-orientation: mixed; cursor: pointer; }
#container.panel-collapsed .paddle-tab:hover { background: var(--rw-light); border-color: var(--rw-grey); }
#container.panel-collapsed .paddle-tab:focus-visible { outline: 3px solid var(--rw-grey); outline-offset: 2px; }
.paddle-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.paddle-label { font-size: 18px; font-weight: 700; }
#container .paddle-panel .paddle-toggle { width: auto; height: 40px; padding: 0 16px; font-size: 15px; line-height: 1; flex-shrink: 0; }
.paddle-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 20px; }
#container .paddle-panel button { margin: 0; font-family: 'Lato', Arial, sans-serif; font-weight: 700; color: var(--rw-grey); background: #fff; border: 1px solid var(--rw-grey); border-radius: 2px; cursor: pointer; transition: background-color .15s; }
#container .paddle-panel button:hover { background: var(--rw-light); }
#container .paddle-panel .paddle-chip { width: 100%; padding: 8px 4px; font-size: 26px; line-height: 1.1; display: flex; flex-direction: column; align-items: center; }
#container .paddle-panel .paddle-chip.last { border: 3px solid var(--rw-grey); padding: 6px 2px; }
.paddle-chips .sm-empty { grid-column: 1 / -1; margin: 0; }
.paddle-chip span { font-size: 12px; font-weight: 300; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paddle-other { display: flex; gap: 8px; margin-bottom: 20px; }
#container .paddle-other input { flex: 1; min-width: 0; height: 52px; font: 700 20px 'Lato', Arial, sans-serif; color: var(--rw-grey); border: 1px solid var(--rw-grey); border-radius: 2px; padding: 0 12px; }
#container .paddle-other input:focus { outline: none; box-shadow: 0 0 0 3px var(--rw-yellow); }
#container .paddle-panel .paddle-other button { width: auto; height: 52px; padding: 0 22px; font-size: 18px; line-height: 1; text-transform: uppercase; background: var(--rw-yellow); }
#container .paddle-panel .paddle-other button:hover { background: var(--rw-yellow-hover); }
.bid-history > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 17px; border-bottom: 1px solid var(--rw-light); }

/* Narrower screens: the bidders move back underneath the actions */
@media (max-width: 1640px) {
    .bid-controls { grid-template-columns: 914px; grid-template-areas: "bid" "btns" "panel"; justify-content: center; }
    .bid-controls .paddle-panel { padding: 16px 0 0; margin-top: 24px; border-left: 0; border-top: 1px solid var(--rw-light); }
}


/* Test mode banner: across the top of the dashboard and the setup screen while emails are in test mode */
.test-banner { display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 6px 24px; background: var(--rw-grey); color: #fff; font: 400 15px/1.3 'Lato', Arial, sans-serif; }
.test-banner-tag { background: var(--rw-yellow); color: var(--rw-grey); font-weight: 700; letter-spacing: .06em; padding: 4px 10px; border-radius: 2px; white-space: nowrap; }
.test-banner-text { flex: 1; }
.test-banner button { width: auto; margin: 0; height: 30px; padding: 0 14px; font: 700 13px 'Lato', Arial, sans-serif; color: #fff; background: transparent; border: 1px solid #fff; border-radius: 2px; cursor: pointer; white-space: nowrap; }
.test-banner button:hover { background: rgba(255,255,255,.18); }
.test-banner button:focus-visible { outline: 3px solid var(--rw-yellow); outline-offset: 2px; }
body.test-mode { --test-bar: 44px; }   /* pushes the fixed sidebar down so it still sits under the header */

/* ---------- Quick switch ---------- */
#quick-switch-sidebar { top: calc(96px + var(--test-bar, 0px)); height: calc(100vh - 96px - var(--test-bar, 0px)); background: #fff; border-left: 1px solid var(--rw-line); box-shadow: none; color: var(--rw-grey); }
#quick-switch-sidebar h3 { color: var(--rw-grey); font-size: 18px; border-bottom: 1px solid var(--rw-light); }
.qs-lot-item { background: #fff; border: 1px solid var(--rw-line); border-left: 6px solid var(--rw-line); border-radius: 0; }
.qs-lot-item:hover { background: var(--rw-light); }
.qs-lot-item.active { background: var(--rw-light); border-left: 6px solid var(--rw-yellow); }
.qs-lot-info { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.qs-lot-address { color: var(--rw-grey); font-weight: 300; font-size: 15px; }
.qs-lot-item .chip { font-size: 12px; padding: 3px 8px; margin: 0; }

/* Only the lot list scrolls: the preview, heading and block tabs stay in place */
#quick-switch-sidebar { display: flex; flex-direction: column; overflow: hidden; }
#quick-switch-sidebar h3 { flex-shrink: 0; }
.qs-preview-wrap { flex-shrink: 0; }
#qs-list { flex: 1; min-height: 0; overflow-y: auto; margin-right: -12px; padding-right: 12px; }

/* Optional display preview: 1920x1080 page scaled to the 280px sidebar width (280/1920) */
.qs-preview-wrap { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--rw-light); }
.preview-frame { width: 280px; height: 157.5px; overflow: hidden; outline: 1px solid var(--rw-line); background: var(--rw-light); margin-bottom: 12px; }
.preview-frame iframe { display: block; width: 1920px; height: 1080px; border: 0; transform: scale(0.145833); transform-origin: 0 0; pointer-events: none; }
#quick-switch-sidebar .qs-preview-toggle { display: block; width: 100%; margin: 0; padding: 10px; font: 700 15px 'Lato', Arial, sans-serif; color: var(--rw-grey); background: #fff; border: 1px solid var(--rw-grey); border-radius: 2px; cursor: pointer; }
#quick-switch-sidebar .qs-preview-toggle:hover { background: var(--rw-light); }
#quick-switch-sidebar .qs-preview-toggle:focus-visible { outline: 3px solid var(--rw-grey); outline-offset: 2px; }

/* Section tabs */
.qs-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; padding-bottom: 12px; position: sticky; top: 0; z-index: 2; background: #fff; }
#quick-switch-sidebar .qs-tab { display: inline-flex; align-items: center; width: auto; margin: 0; padding: 8px 14px; font: 700 15px 'Lato', Arial, sans-serif; color: var(--rw-grey); background: #fff; border: 1px solid var(--rw-grey); border-radius: 2px; cursor: pointer; }
#quick-switch-sidebar .qs-tab:hover { background: var(--rw-light); }
#quick-switch-sidebar .qs-tab.selected { background: var(--rw-yellow); }
#quick-switch-sidebar .qs-tab.live::before { content: ""; width: 8px; height: 8px; background: var(--rw-grey); margin-right: 8px; }
#quick-switch-sidebar .qs-tab:focus-visible { outline: 3px solid var(--rw-grey); outline-offset: 2px; }

@media (max-width: 900px) {
    .bid-hero { grid-template-columns: 1fr; }
    .bid-meta { border-left: 0; padding-left: 0; }
    .current-bid { font-size: 72px; }
}
