/* RealSmart quick checkout. Uses the realsmart-lite theme tokens with fallbacks. */
.rs-qc-modal,
.rs-qc-complete,
.rs-qc-note {
	--qc-primary: var(--rs-primary, #1a56db);
	--qc-primary-soft: var(--rs-primary-light, #e8f0fe);
	--qc-text: var(--rs-text, #111827);
	--qc-muted: var(--rs-gray-500, #6b7280);
	--qc-line: var(--rs-gray-200, #e5e7eb);
	--qc-soft: var(--rs-gray-50, #f9fafb);
	--qc-danger: var(--rs-danger, #dc2626);
	--qc-success: var(--rs-success, #16a34a);
	--qc-radius: var(--rs-radius, 8px);
	--qc-radius-lg: var(--rs-radius-lg, 12px);
	font-family: var(--rs-font-base, inherit);
	color: var(--qc-text);
}

/* Phone dialog */
html.rs-qc-locked { overflow: hidden; }
.rs-qc-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; direction: rtl; }
.rs-qc-modal[hidden] { display: none; }
.rs-qc-modal__backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .55); }
.rs-qc-modal__panel { position: relative; width: min(100%, 420px); padding: 24px 22px 18px; background: #fff; border-radius: var(--qc-radius-lg); box-shadow: 0 18px 50px rgba(17, 24, 39, .25); }
.rs-qc-modal__panel h2 { margin: 0 0 6px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.rs-qc-modal__panel > p { margin: 0 0 16px; color: var(--qc-muted); font-size: 14px; line-height: 1.8; }
.rs-qc-modal__close { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--qc-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.rs-qc-modal__close:hover { background: var(--qc-soft); color: var(--qc-text); }
.rs-qc-modal__form { display: grid; gap: 8px; }
.rs-qc-modal__form label { font-size: 14px; font-weight: 600; }
.rs-qc-modal__form input[type="tel"] { width: 100%; min-height: 48px; padding: 8px 14px; border: 1px solid var(--rs-gray-300, #d1d5db); border-radius: var(--qc-radius); font-size: 18px; letter-spacing: .04em; text-align: left; box-sizing: border-box; }
.rs-qc-modal__form input[type="tel"]:focus { outline: 2px solid var(--qc-primary); outline-offset: 1px; border-color: var(--qc-primary); }
.rs-qc-modal__form input[aria-invalid="true"] { border-color: var(--qc-danger); }
.rs-qc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.rs-qc-hint { margin: 0; min-height: 22px; color: var(--qc-muted); font-size: 13px; }
.rs-qc-hint.is-ok { color: var(--qc-success); font-weight: 600; }
.rs-qc-hint.is-error { color: var(--qc-danger); font-weight: 600; }
.rs-qc-modal__submit { width: 100%; min-height: 48px; margin-top: 4px; font-size: 15px; justify-content: center; }
.rs-qc-modal__login { margin: 14px 0 0 !important; text-align: center; font-size: 13px !important; }
.rs-qc-modal__login a { color: var(--qc-primary); font-weight: 600; }
@media (max-width: 600px) {
	.rs-qc-modal { align-items: end; padding: 0; }
	.rs-qc-modal__panel { width: 100%; border-radius: var(--qc-radius-lg) var(--qc-radius-lg) 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

/* Checkout note above the pay button */
.rs-qc-note { margin: 12px 0 16px; padding: 12px 14px; border-radius: var(--qc-radius); background: var(--qc-primary-soft); font-size: 13.5px; line-height: 1.9; }
.rs-qc-note__main { margin: 0 0 4px; font-weight: 600; }
.rs-qc-note ul { margin: 0; padding: 0; list-style: none; color: var(--qc-text); }
.rs-qc-note li { margin: 0; }
.woocommerce-checkout #billing_phone_description { font-size: 12.5px; color: var(--qc-muted); }

/* Address step after payment */
.rs-qc-complete { margin: 0 0 28px; padding: 22px; border: 2px solid var(--qc-primary); border-radius: var(--qc-radius-lg); background: #fff; direction: rtl; }
.rs-qc-complete__head { margin-bottom: 16px; }
.rs-qc-complete__head h2 { margin: 2px 0 6px; font-size: 21px; font-weight: 700; line-height: 1.5; }
.rs-qc-complete__head p { margin: 0; color: var(--qc-muted); line-height: 1.8; }
.rs-qc-complete__head.is-done h2 { color: var(--qc-success); }
.rs-qc-step { display: inline-block; padding: 2px 12px !important; border-radius: 999px; background: #e7f6ec; color: #14692f !important; font-size: 13px; font-weight: 600; }
.rs-qc-alert { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--qc-radius); background: #fdecec; color: #8f1d1d; font-weight: 600; }
.rs-qc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.rs-qc-field { display: grid; gap: 6px; margin: 0; }
.rs-qc-field.is-wide { grid-column: 1 / -1; }
.rs-qc-field label,
.rs-qc-shipping legend { font-size: 14px; font-weight: 600; }
.rs-qc-field input,
.rs-qc-field select,
.rs-qc-field textarea { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--rs-gray-300, #d1d5db); border-radius: var(--qc-radius); background: #fff; font: inherit; font-size: 15px; box-sizing: border-box; }
.rs-qc-field textarea { min-height: 90px; resize: vertical; }
.rs-qc-field input[readonly] { background: var(--qc-soft); color: var(--qc-muted); }
.rs-qc-field :focus { outline: 2px solid var(--qc-primary); outline-offset: 1px; }
.rs-qc-field [aria-invalid="true"] { border-color: var(--qc-danger); }
.rs-qc-field small,
.rs-qc-muted { color: var(--qc-muted); font-size: 13px; }
.rs-qc-error { display: block; margin: 0; color: var(--qc-danger); font-size: 13px; font-weight: 600; }
.rs-qc-shipping { margin: 18px 0 0; padding: 0; border: 0; }
.rs-qc-shipping .rs-qc-muted { margin: 2px 0 10px; }
.rs-qc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rs-qc-options[hidden] { display: none; }
.rs-qc-option { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--qc-line); border-radius: var(--qc-radius); cursor: pointer; font-weight: 600; }
.rs-qc-option:has(input:checked) { border-color: var(--qc-primary); background: var(--qc-primary-soft); }
.rs-qc-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--qc-primary); }
.rs-qc-form > .rs-qc-field.is-wide { margin-top: 16px; }
.rs-qc-submit { width: 100%; min-height: 50px; margin-top: 18px; font-size: 16px; justify-content: center; }
.rs-qc-address { margin: 0 0 6px; padding: 12px 14px; border-radius: var(--qc-radius); background: var(--qc-soft); font-weight: 600; line-height: 1.9; }
.rs-qc-account { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--qc-line); }
.rs-qc-account h3 { margin: 0 0 4px; font-size: 17px; }
.rs-qc-account > p { margin: 0 0 12px; color: var(--qc-muted); }
.rs-qc-account.is-linked { color: var(--qc-success); font-weight: 600; }
@media (max-width: 640px) {
	.rs-qc-complete { padding: 16px; }
	.rs-qc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.rs-qc-modal * { transition: none !important; }
}

/* The short form leaves the order summary beside it instead of below it. */
@media (min-width: 901px) {
	.woocommerce-checkout form.checkout > #customer_details { grid-row: 1 / span 3; }
	.woocommerce-checkout form.checkout > #order_review_heading { grid-row: 1; }
	.woocommerce-checkout form.checkout > #order_review { grid-row: 2; }
}
