/* ============================================================
   Bin hire booking system.

   Every colour here resolves through the theme's design tokens
   (--paper, --bone, --mist, --green, --ink-*), so [data-theme="dark"]
   flips this the same way it flips the rest of the site. The two
   state colours the token set does not carry — a red for errors and
   an amber for "nearly gone" — are declared once and re-declared
   for dark, rather than being written inline.
   ============================================================ */

.dm-bin-hire {
    --dm-bin-bad:       #c0392b;
    --dm-bin-bad-bg:    rgba(192, 57, 43, 0.06);
    --dm-bin-warn:      #8a5a00;
    --dm-bin-warn-bg:   rgba(214, 158, 46, 0.10);
    --dm-bin-radius:    14px;

    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--ink-text);
}

[data-theme="dark"] .dm-bin-hire {
    --dm-bin-bad:     #f08a7e;
    --dm-bin-bad-bg:  rgba(192, 57, 43, 0.16);
    --dm-bin-warn:    #e5b567;
    --dm-bin-warn-bg: rgba(214, 158, 46, 0.14);
}

.dm-bin-hire p { color: var(--ink-muted); }
.dm-bin-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Honeypot — declared here too so the field stays hidden even if the
   plugin is used on a page without the theme stylesheet. */
.dm-bin-hire .hpot-field {
    position: absolute;
    left: -9999px; top: -9999px;
    visibility: hidden;
    pointer-events: none;
}

/* ---------- Notices ---------- */

.dm-bin-notice {
    border-left: 4px solid var(--green);
    border-radius: 0 10px 10px 0;
    background: var(--bone-2);
    padding: 16px 20px;
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.7;
}
.dm-bin-notice p { margin: 6px 0 0; }
.dm-bin-notice strong { color: var(--ink-text); }
.dm-bin-notice-bad  { border-left-color: var(--dm-bin-bad); background: var(--dm-bin-bad-bg); }
.dm-bin-notice-warn { border-left-color: var(--dm-bin-warn); background: var(--dm-bin-warn-bg); }
.dm-bin-notice-good { border-left-color: var(--green); background: var(--green-tint-l); }

/* ---------- Form shell ---------- */

.dm-bin-form-head { margin: 0 0 28px; }
.dm-bin-form-title {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 0.95;
    color: var(--ink-text);
    margin: 0 0 10px;
}
.dm-bin-form-sub {
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    max-width: 62ch;
}

.dm-bin-step {
    border: 1px solid var(--mist);
    border-radius: var(--dm-bin-radius);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    padding: 26px 24px 24px;
    margin: 0 0 22px;
}
.dm-bin-step > legend {
    display: flex;
    align-items: center;
    gap: 12px;
    float: none;
    width: auto;
    padding: 0 8px;
    margin: 0 0 4px -8px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--ink-text);
}
.dm-bin-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.dm-bin-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.dm-bin-field { margin: 16px 0 0; }
.dm-bin-field-narrow { max-width: 180px; }

/* Scoped to field labels only — the bin size cards are labels too, and they
   are not small uppercase captions. */
.dm-bin-field > label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink-muted);
    margin-bottom: 8px;
}
.dm-bin-field > label .req { color: var(--green); }

.dm-bin-hire .form-control,
.dm-bin-hire .form-select {
    background: var(--bone);
    border: 1.5px solid var(--mist);
    border-radius: 4px;
    padding: 13px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--ink-text);
    width: 100%;
    min-height: 50px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.dm-bin-hire textarea.form-control { min-height: 110px; resize: vertical; }
.dm-bin-hire .form-control:focus,
.dm-bin-hire .form-select:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px var(--green-tint-l);
}
.dm-bin-hire .form-control.is-invalid,
.dm-bin-hire .form-select.is-invalid {
    border-color: var(--dm-bin-bad);
    background: var(--dm-bin-bad-bg);
}

.dm-bin-error {
    color: var(--dm-bin-bad);
    font-size: 12.5px;
    font-weight: 600;
    margin: 6px 0 0;
}
.dm-bin-hint {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-faint);
    margin: 6px 0 0;
}
.dm-bin-hint-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--mist-2);
}

/* ---------- Bin size cards ---------- */

.dm-bin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin: 18px 0 0;
}

/* Flex column so the price and trailer note line up across cards whose
   descriptions wrap to different heights — the grid is read as a price
   comparison, and a ragged price row makes it harder than it should be. */
.dm-bin-card {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--paper);
    border: 1px solid var(--mist);
    border-radius: var(--dm-bin-radius);
    padding: 20px 18px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-text);
    text-transform: none;
    letter-spacing: normal;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dm-bin-card:hover {
    transform: translateY(-3px);
    border-color: var(--green);
    box-shadow: var(--shadow-deep);
}
.dm-bin-card.is-selected {
    border-color: var(--green);
    box-shadow: var(--shadow-glow);
}
.dm-bin-card:focus-within {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

/* The radio stays in the accessibility tree but the whole card is the
   target — a 44px tap area rather than a 16px dot. */
.dm-bin-card-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.dm-bin-card-num {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    font-size: 44px;
    line-height: 1;
    color: var(--green);
    display: block;
}
.dm-bin-card-unit {
    display: block;
    margin: 6px 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.dm-bin-card-desc {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-muted);
}
.dm-bin-card-desc { flex: 1 1 auto; }
.dm-bin-card-price {
    display: block;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mist);
    font-size: 13px;
    color: var(--ink-muted);
}
.dm-bin-card-price strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink-text);
    margin-right: 4px;
}
.dm-bin-card-total {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--green);
    font-weight: 700;
}
.dm-bin-card-trailers {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--mist-2);
    font-size: 12px;
    color: var(--ink-faint);
}

.dm-bin-poa-note {
    margin: 18px 0 0;
    padding: 14px 18px;
    background: var(--bone-2);
    border-left: 4px solid var(--green);
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    line-height: 1.7;
}
.dm-bin-poa-note a { color: var(--green); text-decoration: underline; }

/* ---------- Live availability ---------- */

.dm-bin-availability-live {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    min-height: 1px;
}
.dm-bin-availability-live:empty { display: none; }
.dm-bin-availability-live.is-good { color: var(--green); }
.dm-bin-availability-live.is-warn { color: var(--dm-bin-warn); }
.dm-bin-availability-live.is-bad  { color: var(--dm-bin-bad); }
.dm-bin-availability-live.is-busy { color: var(--ink-faint); font-weight: 500; }
.dm-bin-availability-live a { color: inherit; text-decoration: underline; }

/* ---------- Quote summary ---------- */

.dm-bin-summary {
    border: 1px solid var(--mist);
    border-radius: var(--dm-bin-radius);
    background: var(--bone-2);
    padding: 22px 24px;
    margin: 0 0 22px;
}
.dm-bin-summary-title {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 0.005em;
    color: var(--ink-text);
    margin: 0 0 14px;
}
.dm-bin-summary-list { margin: 0; }
.dm-bin-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--mist-2);
}
.dm-bin-summary-row:last-child { border-bottom: 0; }
/* display:flex above would otherwise beat the UA stylesheet's [hidden] rule and
   leave the deposit row visible when the JS hides it. */
.dm-bin-summary-row[hidden] { display: none; }
.dm-bin-summary-row dt {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
    margin: 0;
}
.dm-bin-summary-row dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-text);
    text-align: right;
}
.dm-bin-summary-total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 2px solid var(--green);
    border-bottom: 0;
}
.dm-bin-summary-total dt { font-size: 14px; font-weight: 800; color: var(--ink-text); }
.dm-bin-summary-total dd { font-size: 22px; color: var(--green); }
.dm-bin-summary-due dd { color: var(--green); }
.dm-bin-summary-note {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-faint);
}
.dm-bin-summary-money { margin-top: 18px; }

/* ---------- Buttons ---------- */

.dm-bin-btn {
    background: var(--green);
    color: #fff;
    border: 2px solid var(--green);
    border-radius: 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 28px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.dm-bin-btn:hover,
.dm-bin-btn:focus {
    background: var(--green-deep);
    border-color: var(--green-deep);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}
.dm-bin-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.dm-bin-btn-sm { padding: 9px 16px; font-size: 11px; }
.dm-bin-btn-ghost {
    background: transparent;
    color: var(--ink-text);
    border-color: var(--mist-2);
}
.dm-bin-btn-ghost:hover,
.dm-bin-btn-ghost:focus {
    background: transparent;
    border-color: var(--green);
    color: var(--green);
    box-shadow: none;
}
.dm-bin-submit { min-height: 54px; padding: 16px 34px; font-size: 13px; }

.dm-bin-actions { margin: 0 0 10px; }
.dm-bin-actions-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-faint);
}

/* ---------- Price table ---------- */

.dm-bin-table-wrap { overflow-x: auto; }
.dm-bin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    min-width: 640px;
}
.dm-bin-table-caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 14px;
    font-size: 13px;
    color: var(--ink-faint);
    line-height: 1.6;
}
.dm-bin-table th,
.dm-bin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--mist);
    text-align: left;
    vertical-align: top;
}
.dm-bin-table thead th {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink-faint);
    border-bottom: 2px solid var(--mist-2);
}
.dm-bin-table tbody tr:hover { background: var(--bone-2); }
.dm-bin-table .dm-bin-num { text-align: right; white-space: nowrap; }
.dm-bin-table .dm-bin-total { font-weight: 800; color: var(--green); }
.dm-bin-table .dm-bin-poa { color: var(--ink-faint); font-style: italic; text-align: right; }
.dm-bin-table-size {
    display: block;
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
    color: var(--green);
}
.dm-bin-table-trailers {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--ink-faint);
}
.dm-bin-cell-action { text-align: right; white-space: nowrap; }
.dm-bin-table-note {
    margin: 16px 0 0;
    font-size: 13.5px;
    line-height: 1.7;
}
.dm-bin-table-note a { color: var(--green); text-decoration: underline; }

/* ---------- Availability strip ---------- */

.dm-bin-availability-title {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.4rem;
    color: var(--ink-text);
    margin: 0 0 14px;
}
.dm-bin-availability-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.dm-bin-day {
    border: 1px solid var(--mist);
    border-radius: 10px;
    background: var(--paper);
    padding: 10px 6px;
    text-align: center;
}
.dm-bin-day-name {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.dm-bin-day-num {
    display: block;
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    font-size: 26px;
    line-height: 1.1;
    color: var(--ink-text);
}
.dm-bin-day-state { display: block; font-size: 11px; font-weight: 600; }
.dm-bin-day.is-free   { border-color: var(--green); }
.dm-bin-day.is-free .dm-bin-day-state { color: var(--green); }
.dm-bin-day.is-full   { border-color: var(--dm-bin-bad); }
.dm-bin-day.is-full .dm-bin-day-state { color: var(--dm-bin-bad); }
.dm-bin-day.is-closed { background: var(--bone-2); }
.dm-bin-day.is-closed .dm-bin-day-num,
.dm-bin-day.is-closed .dm-bin-day-state { color: var(--ink-faint); }
.dm-bin-availability-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--ink-faint);
}

/* ---------- Confirmation ---------- */

.dm-bin-receipt {
    border: 1px solid var(--mist);
    border-radius: var(--dm-bin-radius);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    padding: 30px 28px;
}
.dm-bin-receipt-head { margin: 0 0 22px; }
.dm-bin-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 10px;
}
.dm-bin-eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--green);
}
.dm-bin-receipt-title {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 0.95;
    color: var(--ink-text);
    margin: 0 0 12px;
}
.dm-bin-reference { font-size: 15px; margin: 0 0 10px; }
.dm-bin-reference strong {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-size: 24px;
    letter-spacing: 0.04em;
    color: var(--green);
}
.dm-bin-status-line {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    margin: 0;
}
.dm-bin-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.dm-bin-pill-good  { background: var(--green-tint-l); color: var(--green); }
.dm-bin-pill-warn  { background: var(--dm-bin-warn-bg); color: var(--dm-bin-warn); }
.dm-bin-pill-bad   { background: var(--dm-bin-bad-bg); color: var(--dm-bin-bad); }
.dm-bin-pill-muted { background: var(--bone-2); color: var(--ink-muted); }

.dm-bin-next {
    margin: 24px 0 0;
    padding: 20px 22px;
    background: var(--bone-2);
    border-left: 4px solid var(--green);
    border-radius: 0 10px 10px 0;
}
.dm-bin-next h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink-text);
    margin: 0 0 10px;
}
.dm-bin-next ol { margin: 0; padding-left: 20px; }
.dm-bin-next li {
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 6px;
}
.dm-bin-confirm-contact {
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 1.7;
}
.dm-bin-confirm-contact a { color: var(--green); text-decoration: underline; }

@media (max-width: 575px) {
    .dm-bin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .dm-bin-card { padding: 16px 14px; }
    .dm-bin-card-num { font-size: 36px; }
    .dm-bin-step { padding: 20px 16px; }
    .dm-bin-receipt { padding: 22px 18px; }
    .dm-bin-field-narrow { max-width: none; }
}

/* ---------- Price table on phones ----------

   Six columns of prices cannot honestly fit a 390px screen. Horizontal
   scrolling inside the wrapper technically works, but the two columns that
   matter most — the inc-GST total and the Book button — are the ones that end
   up off-screen, and the page gives no hint they are there.

   Below 768px each row becomes a card instead: size and trailer count as the
   heading, the description under it, then the price lines labelled from the
   data-label attributes, and the button full width. The table semantics stay
   intact for screen readers because only the presentation changes.

   This also removes the table's 640px min-width from the page, which is what
   was widening the document and pushing the fixed "Get a Quote" bar off the
   right edge of every phone screen.                                        */

@media (max-width: 767px) {
    .dm-bin-table-wrap { overflow-x: visible; }

    .dm-bin-table {
        min-width: 0;
        display: block;
    }
    .dm-bin-table caption { display: block; }
    .dm-bin-table thead {
        /* Visually hidden, still announced. */
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .dm-bin-table tbody,
    .dm-bin-table tbody tr { display: block; }

    .dm-bin-table tbody tr {
        border: 1px solid var(--mist);
        border-radius: 12px;
        padding: 16px 18px;
        margin: 0 0 14px;
        background: var(--paper);
        box-shadow: var(--shadow-soft);
    }
    .dm-bin-table tbody tr:hover { background: var(--paper); }

    .dm-bin-table tbody th,
    .dm-bin-table tbody td {
        display: block;
        border: none;
        padding: 0;
        text-align: left;
    }

    .dm-bin-table tbody th { margin: 0 0 10px; }
    .dm-bin-table .dm-bin-table-size { font-size: 32px; }

    /* Description sits under the size, then a rule before the money. */
    .dm-bin-table tbody td[data-label="Suits"] {
        font-size: 14px;
        color: var(--ink-muted);
        padding: 0 0 12px;
        margin: 0 0 12px;
        border-bottom: 1px dashed var(--mist-2);
    }

    /* Money rows: label on the left, figure on the right. */
    .dm-bin-table tbody td[data-label]:not([data-label="Suits"]) {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        padding: 4px 0;
        text-align: right;
        white-space: normal;
    }
    .dm-bin-table tbody td[data-label]:not([data-label="Suits"])::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: var(--ink-faint);
        text-align: left;
        flex: 0 0 auto;
    }
    .dm-bin-table tbody td.dm-bin-total {
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--mist);
        font-size: 18px;
    }
    .dm-bin-table tbody td.dm-bin-poa { font-style: italic; }

    .dm-bin-table tbody td.dm-bin-cell-action {
        margin: 14px 0 0;
        text-align: left;
        white-space: normal;
    }
    .dm-bin-table tbody td.dm-bin-cell-action .dm-bin-btn {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}
