/* TCM Postcode Pricing - Hire Widget v1.8.0 */

.wch-hire-widget { width:100%; box-sizing:border-box; margin-bottom:16px; font-family:inherit; color:#1a1a2e; }
.wch-divider { border:none; border-top:1px solid #dde2e8; margin:16px 0; }

/* ---- Field groups ---- */
.wch-field-group { margin-bottom:16px; }
.wch-field-label { display:flex; align-items:center; gap:6px; font-weight:600; font-size:15px; color:#1a1a1a; margin-bottom:8px; }

/* ---- Tooltip ---- */
.wch-tooltip { position:relative; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; background:#1907c0; color:#fff; border-radius:50%; font-size:12px; font-weight:bold; cursor:help; flex-shrink:0; }
.wch-tooltip::after { content:attr(data-tooltip); position:absolute; bottom:calc(100% + 10px); left:50%; transform:translateX(-50%); background:#1907c0; color:#fff; padding:10px 15px; border-radius:6px; font-size:13px; font-weight:normal; white-space:normal; opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:1000; max-width:280px; width:max-content; text-align:left; line-height:1.5; }
.wch-tooltip::before { content:''; position:absolute; bottom:calc(100% + 4px); left:50%; transform:translateX(-50%); border:6px solid transparent; border-top-color:#1907c0; opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:1000; }
.wch-tooltip:hover::after, .wch-tooltip:hover::before { opacity:1; }

/* ---- Date display ---- */
/* Hide the raw datepicker input but keep it in DOM flow so jQuery UI positions the calendar correctly */
.wch-datepicker { opacity:0; pointer-events:none; height:0; padding:0; margin:0; border:0; position:absolute; }
.wch-date-display-wrapper { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; background:#ecedf9; border:1.5px solid #1907c0; border-radius:8px; margin-bottom:6px; }
.wch-selected-date { display:flex; align-items:center; gap:10px; }
.wch-checkmark-icon { color:#1907c0; flex-shrink:0; }
.wch-date-text { display:flex; flex-direction:column; gap:2px; }
.wch-date-value { font-size:17px; font-weight:600; color:#1907c0; line-height:1.2; }
.wch-date-sublabel { font-size:12px; color:#1907c0; font-weight:500; }
.wch-change-date-btn { display:inline !important; background:transparent !important; border:none !important; font-size:14px !important; font-weight:500 !important; color:#1907c0 !important; cursor:pointer !important; text-decoration:underline !important; padding:0 !important; flex-shrink:0; font-family:inherit !important; }

/* ---- Hire period pills ---- */
.wch-pill-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.wch-pill-buttons input[type="radio"] { display:none; }
.wch-pill-button { display:flex; flex-direction:column; align-items:center; padding:10px 16px; background:#ecedf9; border:none; border-radius:8px; cursor:pointer; user-select:none; transition:background .2s,color .2s; flex:1; text-align:center; }
.wch-pill-button:hover { background:#d4d6ea; }
.wch-pill-buttons input[type="radio"]:checked + .wch-pill-button { background:#1907c0; }
.wch-pill-weeks { font-size:14px; font-weight:600; color:#1a1a1a; line-height:1.3; }
.wch-pill-cost { font-size:12px; color:#6b6b6b; margin-top:2px; line-height:1.3; }
.wch-pill-buttons input[type="radio"]:checked + .wch-pill-button .wch-pill-weeks { color:#fff; }
.wch-pill-buttons input[type="radio"]:checked + .wch-pill-button .wch-pill-cost { color:#fff; font-weight:600; }

/* ---- Postcode / address ---- */
.wch-address-group { margin-top:24px; margin-bottom:24px; }
.wch-postcode-row { display:flex; gap:8px; align-items:stretch; }
.wch-postcode-input { flex:1; padding:11px 14px; border:1.5px solid #d4d6ea; border-radius:8px !important; font-size:15px; color:#1a1a1a; background:#fff; box-sizing:border-box; text-transform:uppercase; transition:border-color .15s; }
.wch-postcode-input::placeholder { color:#999; text-transform:none; }
.wch-postcode-input:focus { outline:none; border-color:#1907c0; }
.wch-get-price-btn { background:#1907c0; color:#fff; border:none; border-radius:8px; padding:11px 20px; font-size:15px; font-weight:600; cursor:pointer; white-space:nowrap; flex-shrink:0; transition:background .2s; line-height:1; }
.wch-get-price-btn:hover { background:#1500a8; }
.wch-get-price-btn:disabled { opacity:.6; cursor:not-allowed; }
.wch-get-price-btn.loading { opacity:.65; cursor:wait; }
.wch-postcode-notice { margin-top:8px; font-size:14px; color:#d63638; }

/* ---- Delivery card ---- */
.wch-delivery-card { display:none; }
.wch-delivery-inner { display:flex; align-items:center; gap:14px; padding:14px 16px; background:linear-gradient(135deg,#e8f5e9 0%,#f0faf0 100%); border:1px solid #a5d6a7; border-radius:10px; margin-top:14px; }
.wch-delivery-detail { flex:1; min-width:0; }
.wch-delivery-label { display:block; font-size:11px; font-weight:700; color:#2e7d32; text-transform:uppercase; letter-spacing:.07em; margin-bottom:4px; }
.wch-delivery-postcode-display { display:block; font-size:20px; font-weight:700; color:#1a1a2e; letter-spacing:.1em; }
.wch-delivery-price { font-size:26px; font-weight:700; color:#1b5e20; flex-shrink:0; text-align:right; }

/* ---- Price summary ---- */
.wch-price-summary { background:#ecedf9; border-radius:8px; padding:14px 16px; margin-top:16px; }
.wch-price-row { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:6px; }
.wch-price-row:last-child { margin-bottom:0; }
.wch-price-label { font-size:14px; color:#444; line-height:1.4; }
.wch-price-value { font-size:14px; color:#444; white-space:nowrap; text-align:right; }
.wch-price-divider { border-top:1px solid #d4d6ea; margin:8px 0; }
.wch-price-total-row { border-top:1px solid #d4d6ea; padding-top:8px; margin-top:4px; }
.wch-price-total-label { font-size:15px; font-weight:600; color:#1a1a1a; }
.wch-price-total { font-size:22px; font-weight:700; color:#1a1a1a; }

@media (max-width:560px) {
  .wch-pill-buttons, .wch-postcode-row { flex-direction:column; }
  .wch-get-price-btn { width:100%; text-align:center; }
  .wch-delivery-inner { flex-wrap:wrap; }
  .wch-delivery-price { width:100%; text-align:left; font-size:22px; }
  .wch-date-value { font-size:16px; }
  .wch-pill-button { padding:8px 6px; }
  .wch-pill-weeks { font-size:12px; }
  .wch-pill-cost { font-size:11px; }
}
/* Added to cart message */
#wch-added-msg {
	margin-top: 14px;
	padding: 13px 16px;
	background: #e8f5e9;
	border: 1px solid #a5d6a7;
	border-radius: 8px;
	font-size: 14px;
	color: #2e7d32;
	font-weight: 500;
}
#wch-added-msg a {
	color: #1b5e20;
	font-weight: 700;
	text-decoration: underline;
}
#wch-added-msg a:hover { color: #2e7d32; }

/* ---- Enquiry button ---- */
.wch-enquiry-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	background: #2296f3;
	color: #fff;
	border: none;
	border-radius: 7px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
	margin-top: 8px;
}
.wch-enquiry-btn:hover { background: #1a7fd4; }

/* ---- Enquiry modal overlay ---- */
#wch-enquiry-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
body.wch-modal-open { overflow: hidden; }

/* ---- Modal box ---- */
#wch-enquiry-modal {
	background: #fff;
	border-radius: 12px;
	padding: 36px 32px 28px;
	width: 100%;
	max-width: 480px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	max-height: 90vh;
	overflow-y: auto;
}

#wch-enquiry-modal h3 {
	margin: 0 0 4px;
	font-size: 20px;
	color: #1a1a2e;
}

.wch-enquiry-product-name {
	margin: 0 0 20px;
	font-size: 14px;
	color: #888;
}

#wch-enquiry-close {
	position: absolute;
	top: 16px;
	right: 18px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
	line-height: 1;
	padding: 0;
}
#wch-enquiry-close:hover { color: #333; }

/* ---- Form fields ---- */
.wch-enquiry-field {
	margin-bottom: 14px;
}
.wch-enquiry-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 5px;
}
.wch-enquiry-field label span { color: #e53e3e; }

.wch-enquiry-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #c8cfd8;
	border-radius: 7px;
	font-size: 15px;
	color: #1a1a2e;
	background: #fff;
	transition: border-color .15s;
}
.wch-enquiry-field input:focus {
	outline: none;
	border-color: #1a9cd8;
	box-shadow: 0 0 0 3px rgba(26,156,216,.15);
}

#wch-enquiry-submit {
	width: 100%;
	padding: 13px;
	background: #1a9cd8;
	color: #fff;
	border: none;
	border-radius: 7px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 6px;
	transition: background .15s;
}
#wch-enquiry-submit:hover    { background: #1588bc; }
#wch-enquiry-submit:disabled { opacity: .65; cursor: wait; }

#wch-enquiry-msg {
	margin-bottom: 12px;
	padding: 10px 14px;
	border-radius: 7px;
	font-size: 14px;
	font-weight: 500;
}
#wch-enquiry-msg:empty { display: none; }
#wch-enquiry-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
#wch-enquiry-msg.error   { background: #fff8e1; color: #7a5c00; border: 1px solid #ffe082; }

/* "Need it sooner?" prompt — hire widget (inline) and skip product pages
   (echoed after SHBS's own booking form, see wc-machinery-hire.php 7c). */
.wch-need-sooner-note {
	margin: 10px 0 16px;
	font-size: 13px;
	color: #50575e;
	font-style: italic;
}
