/* Enquiry suite: rental-date modal, date bar, availability flags and notices.
   Deliberately small - the child theme already styles .pi-row, .pi-btn and the cart table. */

/* --- date bar above the cart --- */
.sph-date-bar { display:flex; align-items:center; gap:.6em; flex-wrap:wrap; margin:0 0 1em; padding:.7em 1em; background:#f4f4f4; border:1px solid #e3e3e3; font-size:.95em; }
.sph-date-bar[hidden] { display:none; }
.sph-date-bar__label { color:#666; }
.sph-date-bar__change { text-decoration:underline; cursor:pointer; }

/* --- rows that clash with the chosen dates --- */
tr.sph-unavailable { background:#fff5f5; }
tr.sph-unavailable td { border-color:#f0c9c9; }
.sph-unavailable-note { color:#b32d2e; font-size:.85em; }

/* --- modal --- */
.sph-modal { position:fixed; inset:0; z-index:99999; display:none; }
.sph-modal.is-open { display:block; }
.sph-modal__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.5); }
.sph-modal__panel:focus { outline:none; }
.sph-modal__title { margin:0 0 .3em; font-size:1.2em; }
.sph-modal__intro { margin:0 0 1.2em; color:#666; font-size:.9em; }
.sph-modal__dates { margin:0 0 1em; }
.sph-modal__field { flex:1 1 0; min-width:0; }
.sph-modal__field input[type="date"] { margin:0 !important; }
.sph-modal__label { display:block; font-size:.85em; }
.sph-modal__panel input[type="date"] { width:100%; margin:0 0 1em; padding:.6em; border:1px solid #ccc; font-size:1em; }
.sph-modal__error { margin:0 0 1em; color:#b32d2e; font-size:.9em; }
.sph-modal__actions,
.sph-modal__dates {
	gap:.8em;
}
.sph-modal__actions button {     
	cursor: pointer;
    padding: 0 var(--btnpinl);
    font-weight: 400;
    border: 0;
    border-radius: 2px;
    background-color: #ebe9eb;
    text-align: center;
    max-height: 100%;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-shadow: inset 0px 0px 1px #000;
    padding-inline: 12px;
    flex: 1;
}
sph-modal__actions button:hover {
	background-color: #dfdcde;
    color: #515151;
}

/* --- form bits --- */
#field-container-sph_pickup, #field-container-sph_return { display:inline-block; width:calc(50% - .5em); vertical-align:top; }
#field-container-sph_pickup { margin-right:.9em; }
@media (max-width:600px){ #field-container-sph_pickup, #field-container-sph_return { display:block; width:100%; margin-right:0; } }
.sph-date-label { display:block; margin:0 0 .3em; font-size:.85em; color:#555; }
.sph-radio-group { border:0; margin:0; padding:0; }
.sph-radio-group legend { padding:0; margin:0 0 .4em; font-size:.85em; color:#555; }
.sph-radio { display:inline-flex; align-items:center; gap:.35em; margin-right:1.2em; }
.sph-conditional { transition:opacity .15s ease; }

/* --- single product --- */
.sph-single-enquiry { margin:1em 0; }
.sph-quantity { margin:0 0 .6em; }
.sph-stock-note { margin:.5em 0 0; color:#666; font-size:.85em; }

/* --- toast --- */
.sph-notice { position:fixed; left:50%; bottom:2rem; transform:translateX(-50%) translateY(1rem); z-index:1; max-width:min(90vw,460px); padding:2em; background:oklab(0.29 0.04 -0.03 / 0.87); color:#fff; font-size:.95em; opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; }
.sph-notice.is-visible { opacity:1; transform:translateX(-50%) translateY(0); }
.sph-notice-success { background:oklab(0.52 -0.12 0.07 / 0.8); }
.sph-notice-error { background:oklab(0.58 0.2 0.1 / 0.79); }
.sph-notice-warning { background:oklab(0.71 0.05 0.17 / 0.82); }

.sph-add-to-enquiry.is-busy { opacity:.6; pointer-events:none; }

/* --- product availability calendar --- */
.sph-product-calendar { margin:1.4em 0; max-width:360px; }
.sph-cal__title { margin:0 0 .5em; font-size:1em; }
.sph-cal__nav { display:flex; align-items:center; justify-content:space-between; margin:0 0 .4em; }
.sph-cal__nav button { background:none; border:1px solid #ddd; width:2em; height:2em; line-height:1; font-size:1.1em; cursor:pointer; padding:0; }
.sph-cal__nav button[disabled] { opacity:.3; cursor:default; }
.sph-cal__month { font-weight:600; text-transform:capitalize; }
.sph-cal__grid { width:100%; border-collapse:separate; border-spacing:2px; table-layout:fixed; margin:0; }
.sph-cal__grid th, .sph-cal__grid td { border:0; padding:0; background:none; }
.sph-cal__grid th { font-size:.7em; color:#888; font-weight:normal; text-transform:uppercase; padding:0 0 .3em; text-align:center; }
.sph-cal__grid td { text-align:center; font-size:.85em; height:2.1em; }
.sph-cal__grid td.is-free { background:#eef7ee; }
.sph-cal__grid td.is-partial { background:#fff1cc; }
.sph-cal__grid td.is-unavailable { background:#f6dcdc; color:#a33; text-decoration:line-through; }
.sph-cal__grid td.is-past { color:#ccc; }
.sph-cal__grid td.is-selected { box-shadow:inset 0 0 0 2px #222; font-weight:700; }
.sph-cal__grid td.is-today span { border-bottom:2px solid #222; }
.sph-cal__legend { list-style:none; margin:.7em 0 0; padding:0; display:flex; flex-wrap:wrap; gap:.4em 1em; font-size:.78em; color:#555; }
.sph-cal__legend li { display:flex; align-items:center; gap:.35em; margin:0; }
.sph-cal__swatch { display:inline-block; width:1em; height:1em; }
.sph-cal__swatch.is-free { background:#eef7ee; }
.sph-cal__swatch.is-partial { background:#fff1cc; }
.sph-cal__swatch.is-unavailable { background:#f6dcdc; }
.sph-cal__swatch.is-selected { box-shadow:inset 0 0 0 2px #222; }

/* --- radios ---
   The theme sets `input { appearance:none }` globally, which strips the dot from radio
   buttons: a checked option looked exactly like an unchecked one, so Delivery seemed
   unclickable. Draw them explicitly, as chips with a large click target. */
.sph-radio { display:inline-flex; align-items:center; gap:.5em; margin:0 .6em .4em 0; padding:.45em .9em; border:1px solid #ccc;
	border-radius:2em; cursor:pointer; user-select:none; line-height:1.2; }
.sph-radio:hover { border-color:#888; }
.sph-radio:has(input:checked) { border-color:#222; background:#f4f4f4; }
.sph-radio input[type="radio"] { appearance:none; -webkit-appearance:none; flex:none; display:inline-grid; place-content:center;
	width:18px; height:18px; margin:0; border:1.5px solid #222; border-radius:50%; background:#fff; cursor:pointer; }
.sph-radio input[type="radio"]::before { content:""; width:10px; height:10px; border-radius:50%; background:#222; transform:scale(0); transition:transform .12s ease; }
.sph-radio input[type="radio"]:checked::before { transform:scale(1); }
.sph-radio input[type="radio"]:focus-visible { outline:2px solid #2271b1; outline-offset:2px; }

/* project type in the modal and the cart bar */
.sph-modal__type { margin:0 0 1em; }
/* the theme hides every <select> (style.css: select{display:none}) */
.sph-modal select, .sph-enquiry-form select { display:block; -webkit-appearance:menulist; appearance:menulist; }
.sph-modal__type select { width:100%; padding:.6em; border:1px solid #ccc; font-size:1em; background:#fff; }
.sph-date-bar__type[hidden] { display:none; }
.sph-enquiry-form select { width:100%; height:32px; padding:0 .4em; border:1px solid #000; border-radius:8px; font:18px system-ui, sans-serif; background:#fff; color:inherit; box-sizing:border-box; }

/* thank-you screen after submitting */
.sph-thankyou { max-width:640px; margin:3em auto; padding:2em; border:1px solid #000; border-radius:8px; text-align:center; }
.sph-thankyou__title { margin:0 0 .6em; }
.sph-thankyou p { font-size:18px; line-height:1.5; }
.sph-thankyou__back { display:inline-block; margin-top:1em; text-decoration:none; }

/* --- own date-range picker (replaces the native one, which covered the form) --- */
.sph-datefield { display:block; width:100%; height:32px; padding:0 .5em; text-align:left; cursor:pointer;
	border:1px solid #000; border-radius:8px; background:#fff; color:#000; font:18px system-ui, sans-serif; box-sizing:border-box; }
.sph-modal .sph-datefield { height:auto; padding:.55em .6em; border-color:#ccc; font-size:1em; border-radius:0; }
.sph-datefield.is-empty { color:#999; }
.sph-datefield.is-active { outline:2px solid #000; outline-offset:1px; }
.sph-picker { clear:both; width:100%; max-width:340px; margin:.6em 0 1em; padding:.7em; border:1px solid #000; border-radius:8px; background:#fff; box-sizing:border-box; }
.sph-picker[hidden] { display:none; }
.sph-picker__head { display:flex; align-items:center; justify-content:space-between; margin:0 0 .4em; font-size:.85em; color:#555; }
.sph-picker__close { background:none; border:0; font-size:1.4em; line-height:1; cursor:pointer; padding:0 .2em; color:#000; }
.sph-picker__grid { width:100%; border-collapse:separate; border-spacing:0 2px; table-layout:fixed; margin:0; }
.sph-picker__grid th, .sph-picker__grid td { border:0; padding:0; background:none; text-align:center; }
.sph-picker__grid th { font-size:.7em; color:#888; font-weight:normal; text-transform:uppercase; padding:0 0 .3em; }
.sph-picker__grid button { width:100%; height:2.2em; border:0; border-radius:0; background:none; color:#000; font:inherit; font-size:.9em; cursor:pointer; padding:0; }
.sph-picker__grid button:hover:not([disabled]) { background:#eee; }
.sph-picker__grid button[disabled] { color:#ccc; cursor:default; }
.sph-picker__grid button.is-between { background:#e6e6e6; }
.sph-picker__grid button.is-start, .sph-picker__grid button.is-end { background:#000; color:#fff; font-weight:700; }
.sph-picker__grid button.is-start { border-radius:6px 0 0 6px; }
.sph-picker__grid button.is-end { border-radius:0 6px 6px 0; }
.sph-picker__grid button.is-start.is-end { border-radius:6px; }

/* sticky availability warning with a "Continue with order" button */
.sph-notice__text { margin:0; color:inherit; }
.sph-notice.is-sticky { pointer-events:auto; padding-right:2.6em; }
.sph-notice__actions { margin-top:.8em; text-align: center}
.sph-notice__btn { cursor:pointer; font:inherit;  border:0; padding:.45em 1em; background:#fff; color:#000 !important; border-radius:2px; text-decoration:none; font-weight:600; }
.sph-notice__close { position:absolute; top:.35em; right:.45em; background:none; border:0; color:#fff; font-size:1.5em; line-height:1; cursor:pointer; padding:0 .2em; }
.sph-thankyou__short { margin:1.2em 0 0; padding:.8em 1em; background:#fff6e0; border-left:4px solid #8a6100; text-align:left; }
.sph-thankyou__short p { margin:0; font-size:17px; }
