/**
 * Onsite course product-page selector (OC-12 / approval slice D).
 * Neutral, theme-friendly styling for the batch picker + reservation panel.
 */
.lms-onsite-selector { margin: 0 0 20px; }
.lms-onsite-heading { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.lms-onsite-none { color: #6b7280; font-size: 14px; margin: 0; }

.lms-onsite-batches { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.lms-onsite-batch {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px; cursor: pointer;
    border: 1px solid #d1d5db; border-radius: 10px; padding: 12px 14px; margin: 0; background: #fff;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.lms-onsite-batch:hover { border-color: #9ca3af; }
.lms-onsite-batch input { margin: 0 2px 0 0; flex: 0 0 auto; }
.lms-onsite-batch:has(input:checked) { border-color: #2563eb; box-shadow: 0 0 0 1px #2563eb inset; }
.lms-onsite-batch input:disabled { cursor: default; }
.lms-onsite-batch-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.lms-onsite-batch-title { font-weight: 600; color: #111827; }
.lms-onsite-batch-sched { font-size: 13px; color: #6b7280; }
.lms-onsite-batch-price { font-weight: 700; white-space: nowrap; margin-left: auto; }
.lms-onsite-free { color: #15803d; }

/* Live sale offer announcement — per batch (full-width row under the batch) + product meta. */
.lms-onsite-offer {
    flex: 1 1 100%; margin-top: 2px; padding: 7px 10px; border-radius: 8px;
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
    font-size: 13px; line-height: 1.45;
}
.lms-onsite-offer .lms-offer-deadline,
.lms-onsite-offer .lms-offer-save,
.lms-onsite-offer .lms-offer-amount { font-weight: 700; white-space: nowrap; }
.lms-onsite-offer .lms-offer-save { color: #b45309; }

.lms-onsite-offer-meta { margin: 6px 0; }
.lms-onsite-offer-meta .lms-onsite-offer {
    display: block; font-size: 13px;
}

/* Unavailable sessions (full / enrollment closed) — shown, but not selectable. */
.lms-onsite-batch.is-unavailable { background: #f9fafb; cursor: default; opacity: .75; }
.lms-onsite-batch.is-unavailable:hover { border-color: #d1d5db; }
.lms-onsite-batch.is-unavailable input { cursor: default; }
.lms-onsite-batch-tag {
    margin-left: auto; white-space: nowrap; font-size: 12px; font-weight: 700; color: #6b7280;
    background: #eef0f3; border-radius: 6px; padding: 3px 9px;
}

.lms-onsite-reserve {
    margin-top: 14px; padding: 16px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff;
}
.lms-onsite-reserve[hidden] { display: none; }
.lms-onsite-policy { font-size: 14px; line-height: 1.55; color: #1e3a5f; margin-bottom: 12px; }
.lms-onsite-policy p { margin: 0 0 8px; }
.lms-onsite-policy p:last-child { margin-bottom: 0; }
.lms-onsite-reserve-btn, .lms-onsite-login { display: inline-block; }
.lms-onsite-reserve-msg { margin-top: 10px; font-size: 14px; }
.lms-onsite-reserve-msg.is-pending { color: #6b7280; }
.lms-onsite-reserve-msg.is-error { color: #b91c1c; }
.lms-onsite-reserve-msg.is-ok {
    color: #14532d; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 12px; font-weight: 600;
}

/* Additional fees (required breakdown + optional checkboxes) + live total. */
.lms-onsite-fees { margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid #e5e7eb; }
.lms-onsite-fees-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.lms-onsite-fee {
    display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 8px 10px;
    border: 1px solid #eef0f3; border-radius: 8px; background: #fcfcfd;
}
.lms-onsite-fee.is-optional { cursor: pointer; }
.lms-onsite-fee.is-optional:hover { border-color: #d1d5db; }
.lms-onsite-fee input { margin: 0 2px 0 0; flex: 0 0 auto; }
.lms-onsite-fee-name { flex: 1 1 auto; min-width: 0; color: #111827; font-size: 14px; }
.lms-onsite-fee-req {
    font-size: 11px; font-weight: 700; color: #6b7280; background: #eef0f3;
    border-radius: 5px; padding: 1px 6px; margin-left: 4px; vertical-align: middle;
}
.lms-onsite-fee-amt { font-weight: 700; white-space: nowrap; color: #374151; }

/* Always-on "Your selection" summary panel — a live cart preview: chosen batch, each fee, and (when
   the course hosts a bundle) each add-on + discount, with a running total. Inline in the form by
   default; floats fixed on the left on wide screens. */
.lms-onsite-summary {
    margin: 16px 0 4px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb;
}
@media (min-width: 1200px) {
    .lms-onsite-summary {
        position: fixed; left: 16px; top: 50%; transform: translateY(-50%);
        width: 264px; max-height: 82vh; overflow-y: auto; z-index: 60; margin: 0;
        box-shadow: 0 16px 44px rgba(15, 23, 42, .18);
    }
}
.lms-onsite-summary-title {
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
    color: #6b7280; margin-bottom: 12px;
}
.lms-onsite-summary-list { display: flex; flex-direction: column; gap: 9px; }
.lms-onsite-summary-empty { color: #6b7280; font-size: 14px; }
.lms-onsite-summary-line {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px;
}
.lms-onsite-summary-name { color: #111827; min-width: 0; }
.lms-onsite-summary-sub { display: block; font-size: 12px; color: #6b7280; font-weight: 400; margin-top: 1px; }
.lms-onsite-summary-amt { font-weight: 700; color: #111827; white-space: nowrap; }
.lms-onsite-summary-line.is-course .lms-onsite-summary-name { font-weight: 700; }
.lms-onsite-summary-line.is-fee .lms-onsite-summary-name,
.lms-onsite-summary-line.is-fee .lms-onsite-summary-amt { color: #4b5563; font-weight: 600; }
/* A bundled add-on's own fees sit indented under it. */
.lms-onsite-summary-line.is-addonfee { padding-left: 12px; }
.lms-onsite-summary-line.is-addonfee .lms-onsite-summary-name,
.lms-onsite-summary-line.is-addonfee .lms-onsite-summary-amt { font-size: 13px; font-weight: 500; }
.lms-onsite-summary-line.is-discount .lms-onsite-summary-name,
.lms-onsite-summary-line.is-discount .lms-onsite-summary-amt { color: #15803d; }
.lms-onsite-summary-total {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 12px; padding-top: 11px; border-top: 1px solid #e5e7eb;
}
.lms-onsite-summary-total[hidden] { display: none; }
.lms-onsite-summary-tlabel { font-weight: 700; color: #111827; }
.lms-onsite-summary-tval { font-weight: 800; font-size: 16px; color: #111827; white-space: nowrap; }

/* Shortcode / block surface (FSE, block themes, page builders): the selector renders inside its
   own add-to-cart form, so give the wrapper a little breathing room. */
.lms-onsite-standalone { margin: 0 0 20px; }
.lms-onsite-standalone .lms-onsite-selector { margin-bottom: 16px; }

/* Fallback reserve button (injected only when the theme exposes no add-to-cart button to
   relabel). Themes usually style .button; this is a neutral baseline so it still looks like a
   button on themes that don't. */
.lms-onsite-reserve-btn {
    margin-top: 4px; cursor: pointer;
}
.lms-onsite-reserve-btn:not(.button):not([class*="wp-block-button"]) {
    display: inline-block; padding: 10px 18px; border: 0; border-radius: 8px;
    background: #2563eb; color: #fff; font-size: 15px; font-weight: 600;
}

/* Editor-only hint when a shortcode/block can't resolve an onsite product. */
.lms-onsite-standalone-empty {
    padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 8px;
    color: #64748b; font-size: 14px; background: #f8fafc;
}

/* Waitlist control on a full session (OC-12, audit M8). */
.lms-onsite-waitlist {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 6px 0 10px; padding-left: 2px;
}
.lms-onsite-wl-note { font-size: 13px; color: #475569; }
.lms-onsite-wl-note.is-notified { color: #1a7f37; font-weight: 600; }
.lms-onsite-wl-btn.button { font-size: 13px; padding: 4px 12px; }
.lms-onsite-wl-msg { font-size: 13px; }
.lms-onsite-wl-msg.is-ok { color: #1a7f37; }
.lms-onsite-wl-msg.is-error { color: #b32d2e; }
.lms-onsite-wl-msg.is-pending { color: #64748b; }
