/*
 * White-label quote-intake styling.
 * Themed by the --wl-primary / --wl-secondary CSS variables the
 * _WhiteLabelLayout sets per company. No authenticated app chrome.
 */

.wl-body {
    background: var(--bs-gray-100);
    min-height: 100vh;
}

/* ---- Header ---- */
.wl-header {
    background: #fff;
    border-bottom: 1px solid var(--bs-border-color);
}

.wl-header-logo {
    max-height: 48px;
    width: auto;
}

.wl-header-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wl-secondary);
}

/* ---- Quote-page brand block (logo centred above the intro text) ---- */
/* The quote and payment pages suppress the shared header and render the logo
   here instead, as a focal element above the page content. */
.wl-brand {
    display: block;
}

.wl-brand-logo {
    display: block;
    max-height: 88px;
    width: auto;
    margin: 0 auto;
}

.wl-brand-name {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wl-secondary);
}

/* ---- Main ---- */
.wl-main {
    flex: 1 0 auto;
}

.wl-intro {
    color: var(--bs-gray-800);
    line-height: 1.6;
}

.wl-intro img {
    max-width: 100%;
    height: auto;
}

/* ---- Footer ---- */
.wl-footer {
    background: var(--wl-secondary);
    margin-top: auto;
}

.wl-footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.wl-footer-powered {
    opacity: 0.6;
}

/* ---- Card ---- */
.wl-card {
    border-top: 3px solid var(--wl-primary);
}

.wl-card-title {
    color: var(--wl-secondary);
}

/* ---- Honeypot (visually hidden, not display:none so bots still see it) ---- */
.wl-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ---- Dropzone ---- */
.dropzone-area {
    border: 2px dashed var(--wl-primary);
    border-radius: 0.625rem;
    background: var(--bs-gray-100);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropzone-area:hover {
    background: var(--bs-gray-200);
}

.dropzone-area .dz-preview {
    display: none !important;
}

.wl-dz-icon {
    color: var(--wl-primary);
}

/* ---- Options ---- */
.wl-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Option groups (Turnaround / Add-ons / Larger projects). */
.wl-option-section {
    margin-bottom: 1.5rem;
}

.wl-option-section:last-child {
    margin-bottom: 0;
}

.wl-option-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-gray-600);
    margin-bottom: 0.6rem;
}

/* Side-by-side card row — wraps/stacks gracefully on narrow screens. */
.wl-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wl-card-row > * {
    flex: 1 1 220px;
    min-width: 0;
}

/* Clickable, selectable choice card (turnaround + volume). */
.wl-choice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.625rem;
    padding: 1rem 1.1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.wl-choice-card:hover {
    border-color: var(--wl-primary);
}

.wl-choice-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.wl-choice-selected {
    border-color: var(--wl-primary);
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 0 0 1px var(--wl-primary) inset;
}

.wl-choice-tick {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    color: var(--wl-primary);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.wl-choice-selected .wl-choice-tick {
    opacity: 1;
}

.wl-choice-name {
    font-weight: 700;
    color: var(--bs-gray-900);
    padding-right: 1.5rem;
}

.wl-choice-desc {
    font-size: 0.825rem;
    color: var(--bs-gray-600);
}

.wl-choice-price {
    margin-top: 0.35rem;
    font-weight: 700;
    color: var(--wl-secondary);
}

.wl-choice-price-poa {
    color: var(--bs-gray-700);
}

/* Per-unit add-on card. */
.wl-addon-card {
    flex: 1 1 280px;
}

.wl-option-help {
    font-size: 0.78rem;
    color: var(--bs-gray-600);
    font-style: italic;
    margin-top: 0.15rem;
}

/* Volume enquiry hint under the Volume card. */
.wl-volume-hint {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--bs-gray-700);
}

/* Visually-disabled priced group while Volume enquiry mode is active. */
.wl-disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.6);
}

.wl-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
}

.wl-option-base {
    border-color: var(--wl-primary);
    background: rgba(0, 0, 0, 0.015);
}

.wl-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wl-option-name {
    font-weight: 600;
    color: var(--bs-gray-900);
}

.wl-option-desc {
    font-size: 0.825rem;
    color: var(--bs-gray-600);
}

.wl-option-unit {
    font-size: 0.8rem;
    color: var(--wl-primary);
    font-weight: 600;
}

.wl-option-price {
    font-weight: 700;
    color: var(--wl-secondary);
    white-space: nowrap;
}

.wl-badge-poa {
    background: var(--bs-gray-200);
    color: var(--bs-gray-700);
    font-weight: 600;
}

/* ---- Quantity stepper ---- */
.wl-stepper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.wl-stepper-btn {
    border: 1px solid var(--bs-border-color);
    background: #fff;
    color: var(--wl-primary);
    width: 34px;
    height: 34px;
}

.wl-stepper-btn:hover {
    background: var(--wl-primary);
    color: #fff;
    border-color: var(--wl-primary);
}

.wl-stepper-value {
    width: 48px;
    text-align: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.475rem;
    height: 34px;
    font-weight: 600;
    background: #fff;
    color: var(--bs-gray-900);
}

/* ---- Two-column quote layout (fields left, sticky total right) ---- */
/* Mobile / narrow: single column, normal document flow — total sits at the
   bottom as before, in normal flow, NOT sticky. */
.wl-quote-layout {
    display: block;
}

.wl-quote-aside {
    margin-top: 2rem;
}

/* Wide screens: two in-flow columns — form fields left, total panel right.
   The total panel uses position: sticky so it stays pinned in view as the
   form is scrolled, but it remains bounded inside its own column/card: it
   never floats free over the page and settles naturally at the column's end. */
@media (min-width: 992px) {
    .wl-quote-layout {
        display: flex;
        align-items: flex-start;
        gap: 2rem;
    }

    .wl-quote-fields {
        flex: 1 1 auto;
        min-width: 0;
    }

    .wl-quote-aside {
        flex: 0 0 320px;
        width: 320px;
        margin-top: 0;
        /* Ensure the aside is at least as tall as the fields so the sticky
           panel has room to travel before settling at the column's end. */
        align-self: stretch;
    }

    .wl-quote-sticky {
        position: sticky;
        /* Pinned near the top of the column, clear of the white-label header
           (header is ~48px logo + 1.5rem*2 padding ≈ 96px). */
        top: 7rem;
        /* Never run off-screen on shorter desktop windows — the panel scrolls
           internally if it is ever taller than the space available. */
        max-height: calc(100vh - 9rem);
        overflow-y: auto;
    }
}

/* ---- Live price panel ---- */
.wl-price-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    padding: 1.25rem 1.5rem;
    background: var(--bs-gray-100);
}

.wl-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    color: var(--bs-gray-700);
}

.wl-price-total {
    border-top: 2px solid var(--bs-border-color);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--wl-secondary);
}

.wl-price-poa-note {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.475rem;
    background: rgba(0, 0, 0, 0.04);
    color: var(--bs-gray-700);
    font-size: 0.85rem;
}

/* ---- Enquiry panel (Volume / price-on-application mode) ---- */
.wl-enquiry-panel {
    border: 1px solid var(--wl-primary);
    border-radius: 0.625rem;
    padding: 1.5rem;
    background: var(--bs-gray-100);
    text-align: center;
}

.wl-enquiry-icon {
    font-size: 2rem;
    color: var(--wl-primary);
    margin-bottom: 0.5rem;
}

.wl-enquiry-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wl-secondary);
    margin-bottom: 0.35rem;
}

.wl-enquiry-text {
    font-size: 0.85rem;
    color: var(--bs-gray-700);
}

/* ---- Submit button (themed) ---- */
.wl-btn-submit {
    background: var(--wl-primary);
    color: #fff;
    font-weight: 600;
    border: none;
}

.wl-btn-submit:hover,
.wl-btn-submit:focus {
    background: var(--wl-primary);
    color: #fff;
    filter: brightness(0.92);
}

.wl-btn-submit:disabled {
    opacity: 0.65;
}

/* ---- Result pages (payment / success / cancelled) ---- */
.wl-result-icon {
    font-size: 4rem;
    line-height: 1;
}

.wl-result-icon-success {
    color: #50cd89;
}

.wl-result-icon-warning {
    color: #ffc700;
}

.wl-result-icon-info {
    color: var(--wl-primary);
}

.wl-result-title {
    font-weight: 700;
    color: var(--wl-secondary);
}

.wl-amount-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0;
}

.wl-amount-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-gray-600);
}

.wl-amount-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--wl-secondary);
}

.wl-link-field {
    font-family: var(--bs-font-monospace);
    font-size: 0.9rem;
}
