/* Issues-POSBuilderV2-001 — POS "Session Builder" view (data-view=builder).
   Six .pos-acc-panel steps (chrome from pos.css) + the row / service / extras
   surfaces rendered by assets/js/pos-builder.js. Dark base first (pos.css palette),
   then the html.rs-light overrides in the same shape shell.css uses. */

#posBuilder { display: flex; flex-direction: column; min-width: 0; }
.pos-left-host.builder-type-first > #posBuilder { order: 3; }

.pb-panel { padding: 15px; }
.pb-panel .pos-acc-header h3 { display: flex; align-items: center; font-size: 15px; color: #ddd; }
.pb-panel .pos-acc-header:focus-visible { outline: 2px solid var(--primary, #2196F3); outline-offset: 2px; border-radius: 6px; }
.pb-panel.pb-locked .pos-acc-header { cursor: default; opacity: 0.5; }
.pb-panel.pb-locked .pos-acc-header::after { visibility: hidden; }
.pb-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; margin-right: 10px; border-radius: 50%;
    background: var(--primary, #2196F3); color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.pb-panel.pb-done .pb-num { background: #16a34a; }
.pb-panel.pb-locked .pb-num { background: #64748b; }
.pb-change {
    flex: 0 0 auto; margin-left: 8px; padding: 4px 12px; border-radius: 999px;
    border: 1px solid #1f4287; background: transparent; color: #cbd5e1;
    font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.pb-change:hover { background: rgba(31, 66, 135, 0.4); color: #fff; }

.pb-lead { font-size: 18px; font-weight: 700; color: #fff; }
.pb-muted { font-size: 13px; color: #aaa; }
.pb-muted.warn { color: #fca5a5; }
.pb-label { font-size: 13px; font-weight: 600; color: #aaa; }
.pb-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

.pb-btn {
    padding: 11px 18px; border-radius: 8px; border: none; min-height: 44px;
    background: var(--primary, #2196F3); color: #fff; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.pb-btn:hover { background: var(--primary-dark, #1976D2); }
.pb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pb-btn:disabled { background: #334155; color: #94a3b8; cursor: not-allowed; }
.pb-btn.secondary { background: #1a1a2e; border: 1px solid #0f3460; color: #fff; }
.pb-btn.secondary:hover { background: #0f3460; }
.pb-btn.primary { font-size: 16px; padding: 12px 24px; }

/* Step 2 — date */
.pb-date-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pb-date, .pb-time, .pb-select, .pb-num-input {
    padding: 10px 12px; border-radius: 8px; border: 1px solid #0f3460; background: #1a1a2e; color: #fff;
    font-family: inherit; font-size: 15px; min-height: 44px;
}
.pb-num-input { width: 72px; }
.pb-badge {
    display: inline-block; padding: 6px 12px; border-radius: 999px;
    background: rgba(33, 150, 243, 0.18); color: #90caf9; font-size: 13px; font-weight: 600;
}
.pb-badge.warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.pb-chips { display: flex; gap: 6px; }
.pb-chip-btn {
    padding: 8px 12px; border-radius: 999px; border: 1px solid #1f4287; background: transparent;
    color: #cbd5e1; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px;
}
.pb-chip-btn.selected, .pb-chip-btn:hover { background: #1f4287; color: #fff; }

/* Step 3 — services */
.pb-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pb-service {
    min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border: 2px solid #0f3460; border-radius: 12px; background: #1a1a2e; color: #fff;
    font-family: inherit; cursor: pointer; padding: 12px; text-align: center;
}
.pb-service:hover { border-color: var(--primary, #2196F3); background: #0f3460; }
.pb-service.selected { background: var(--primary, #2196F3); border-color: var(--primary, #2196F3); }
.pb-service:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pb-service-label { font-size: 17px; font-weight: 700; }
.pb-service-sub { font-size: 12px; font-weight: 500; opacity: 0.75; }

/* Step 4 — time rows */
.pb-rows { display: flex; flex-direction: column; gap: 8px; }
.pb-row {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
    align-items: center; gap: 12px; padding: 10px 14px;
    border: 1px solid #0f3460; border-radius: 10px; background: #1a1a2e; color: #fff;
}
.pb-row.pb-row-3 { grid-template-columns: minmax(0, 1fr) auto auto; }
.pb-row.unavailable { opacity: 0.6; background: #2d2d2d; border-color: #5a2a2a; }
.pb-row.selected { border-color: var(--primary, #2196F3); box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.25); }
.pb-row-time { font-weight: 700; font-size: 17px; }
.pb-row-main { min-width: 0; }
.pb-row-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-row-sub { display: flex; gap: 6px; margin-top: 4px; font-size: 12px; color: #aaa; flex-wrap: wrap; }
.pb-row-price { font-weight: 700; font-size: 15px; min-width: 64px; text-align: right; }
.pb-chip {
    display: inline-block; padding: 3px 9px; border-radius: 999px;
    background: #334155; color: #e2e8f0; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.pb-chip.reef { background: rgba(33, 150, 243, 0.22); color: #90caf9; }
.pb-chip.bay { background: rgba(22, 163, 74, 0.22); color: #86efac; }
.pb-chip.open { background: rgba(22, 163, 74, 0.22); color: #86efac; }
.pb-chip.full { background: rgba(220, 38, 38, 0.25); color: #fca5a5; }
.pb-chip.request { background: rgba(245, 158, 11, 0.22); color: #fcd34d; }
.pb-chip.closed { background: #334155; color: #cbd5e1; }
.pb-chip.incart { background: rgba(22, 163, 74, 0.3); color: #bbf7d0; }

/* Step 4/5 — rental tiles (real <button>s wearing the .quick-key look) */
.pb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pb-tiles .quick-key { font-family: inherit; text-align: left; position: relative; color: inherit; }
.pb-tiles .quick-key:focus-visible { outline: 2px solid var(--primary, #2196F3); outline-offset: 2px; }
.pb-tiles .quick-key.pb-selected { outline: 3px solid #16a34a; }
.pb-tile-check {
    position: absolute; top: 6px; right: 8px; font-size: 11px; font-weight: 700;
    color: #86efac; background: rgba(22, 163, 74, 0.25); padding: 2px 7px; border-radius: 999px;
}

/* Step 5 — extras */
.pb-extras-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid #0f3460; }
.pb-extras-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.pb-extras-title {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #aaa;
}
.pb-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #fff; cursor: pointer; min-height: 44px; }
.pb-check input { width: 20px; height: 20px; }

/* Step 6 — confirm */
.pb-summary { list-style: none; margin: 0 0 12px; padding: 0; }
.pb-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #0f3460; font-size: 14px; color: #fff; }
.pb-qty { display: inline-flex; align-items: center; gap: 12px; }
.pb-qty button {
    width: 44px; height: 44px; border-radius: 8px; border: 1px solid #0f3460; background: #1a1a2e; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit;
}
.pb-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.pb-qty-val { min-width: 36px; text-align: center; font-size: 22px; font-weight: 700; color: #fff; }
.pb-group-note {
    margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
    background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #fcd34d;
}

/* Rail */
#rsBuilderStepper .rs-step.rs-step-locked { opacity: 0.5; }

/* ── Light mode (html.rs-light, per shell.css) ─────────────────────────── */
html.rs-light .pb-panel .pos-acc-header h3 { color: #475569; }
html.rs-light .pb-change { border-color: #cbd5e1; background: #fff; color: #334155; }
html.rs-light .pb-change:hover { background: #f1f5f9; color: #0f172a; }
html.rs-light .pb-lead { color: #0f172a; }
html.rs-light .pb-muted { color: #64748b; }
html.rs-light .pb-muted.warn { color: #dc2626; }
html.rs-light .pb-label { color: #64748b; }
html.rs-light .pb-btn:disabled { background: #cbd5e1; color: #64748b; }
html.rs-light .pb-btn.secondary { background: #fff; border-color: #cbd5e1; color: #334155; }
html.rs-light .pb-btn.secondary:hover { background: #f1f5f9; }
html.rs-light .pb-btn:focus-visible, html.rs-light .pb-service:focus-visible { outline-color: #0f172a; }
html.rs-light .pb-date, html.rs-light .pb-time, html.rs-light .pb-select, html.rs-light .pb-num-input { background: #fff; border-color: #e2e8f0; color: #0f172a; }
html.rs-light .pb-badge { background: #dbeafe; color: #1d4ed8; }
html.rs-light .pb-badge.warn { background: #fef3c7; color: #92400e; }
html.rs-light .pb-chip-btn { border-color: #e2e8f0; background: #fff; color: #334155; }
html.rs-light .pb-chip-btn.selected, html.rs-light .pb-chip-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
html.rs-light .pb-service { background: #fff; border-color: #e2e8f0; color: #0f172a; }
html.rs-light .pb-service:hover { background: #eff6ff; border-color: var(--primary); }
html.rs-light .pb-service.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
html.rs-light .pb-row { background: #fff; border-color: #e2e8f0; color: #0f172a; }
html.rs-light .pb-row.unavailable { background: #f8fafc; border-color: #fecaca; }
html.rs-light .pb-row-sub { color: #64748b; }
html.rs-light .pb-chip { background: #e2e8f0; color: #334155; }
html.rs-light .pb-chip.reef { background: #dbeafe; color: #1d4ed8; }
html.rs-light .pb-chip.bay, html.rs-light .pb-chip.open, html.rs-light .pb-chip.incart { background: #dcfce7; color: #166534; }
html.rs-light .pb-chip.full { background: #fee2e2; color: #b91c1c; }
html.rs-light .pb-chip.request { background: #fef3c7; color: #92400e; }
html.rs-light .pb-chip.closed { background: #e2e8f0; color: #475569; }
html.rs-light .pb-tile-check { background: #dcfce7; color: #166534; }
html.rs-light .pb-extras-sec { border-top-color: #e2e8f0; }
html.rs-light .pb-extras-title { color: #64748b; }
html.rs-light .pb-check { color: #0f172a; }
html.rs-light .pb-summary li { color: #0f172a; border-bottom-color: #e2e8f0; }
html.rs-light .pb-qty button { background: #fff; border-color: #cbd5e1; color: #0f172a; }
html.rs-light .pb-qty-val { color: #0f172a; }
html.rs-light .pb-group-note { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

/* Issues-POSBuilderV2-001 (owner 2026-09-08): generic locker rental card in the Rental step */
.pb-locker-rental { margin-bottom: 12px; }
.pb-note { font-size: 12px; opacity: .8; margin: 4px 0 8px; }

/* Step 5 staged-extras line (owner 2026-09-08: make what will be added unmistakable before Continue) */
.pb-staged { margin: 10px 0 4px; font-size: 13px; color: var(--pb-muted, #9ca3af); }
.pb-staged.has { color: #16a34a; font-weight: 600; }
html.rs-light .pb-staged.has { color: #166534; }
