/**
 * Rusty Tractor customer portal.
 *
 * Scoped under .rtfc-portal so it can't leak into the surrounding theme, and
 * deliberately light on assumptions — Kubio's typography still shows through.
 */

.rtfc-portal {
	--rtfc-green: #4a5d3a;
	--rtfc-green-light: #6d8455;
	--rtfc-cream: #f4f1ea;
	--rtfc-ink: #2f2b25;
	--rtfc-muted: #7c7367;
	--rtfc-line: #e2ddd2;

	max-width: 680px;
	margin: 0 auto;
	padding: 8px 0 48px;
	color: var(--rtfc-ink);
	line-height: 1.6;
}

.rtfc-portal h1 {
	margin: 4px 0 8px;
	font-size: 1.9rem;
	line-height: 1.2;
}

.rtfc-portal h2 {
	margin: 0 0 14px;
	font-size: 1.15rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--rtfc-green);
}

.rtfc-portal h3 {
	margin: 18px 0 8px;
	font-size: 1rem;
	color: var(--rtfc-muted);
}

.rtfc-portal p { margin: 0 0 12px; }

/* --- Header ------------------------------------------------------------ */

.rtfc-head { margin-bottom: 24px; }

.rtfc-ref {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rtfc-muted);
}

.rtfc-greeting { color: var(--rtfc-muted); }

/* --- Fact strip -------------------------------------------------------- */

.rtfc-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1px;
	margin-bottom: 28px;
	background: var(--rtfc-line);
	border: 1px solid var(--rtfc-line);
	border-radius: 8px;
	overflow: hidden;
}

.rtfc-facts > div {
	padding: 14px 16px;
	background: #fff;
}

.rtfc-facts span {
	display: block;
	margin-bottom: 2px;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rtfc-muted);
}

.rtfc-facts strong { font-size: 1.02rem; }

/* --- Blocks ------------------------------------------------------------ */

.rtfc-block {
	padding: 22px 0;
	border-top: 1px solid var(--rtfc-line);
}

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

.rtfc-quote dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 16px;
	margin: 0 0 18px;
}

.rtfc-quote dt { color: var(--rtfc-muted); }
.rtfc-quote dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.rtfc-quote .rtfc-total { font-size: 1.3rem; font-weight: 700; color: var(--rtfc-green); }

.rtfc-accepted {
	padding: 12px 14px;
	background: var(--rtfc-cream);
	border-left: 3px solid var(--rtfc-green);
	border-radius: 0 4px 4px 0;
	font-weight: 600;
}

.rtfc-accept-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

/* --- Schedule ---------------------------------------------------------- */

.rtfc-schedule { margin: 0; padding: 0; list-style: none; }

.rtfc-schedule li {
	display: flex;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--rtfc-line);
}

.rtfc-schedule li:last-child { border-bottom: 0; }

.rtfc-time {
	flex: 0 0 78px;
	font-weight: 700;
	color: var(--rtfc-green);
	font-variant-numeric: tabular-nums;
}

.rtfc-schedule p { margin: 4px 0 0; color: var(--rtfc-muted); font-size: 0.94rem; }

/* --- Items ------------------------------------------------------------- */

.rtfc-items { margin: 0; padding: 0; list-style: none; }

.rtfc-items li {
	padding: 10px 0;
	border-bottom: 1px dashed var(--rtfc-line);
}

.rtfc-items li:last-child { border-bottom: 0; }
.rtfc-items p { margin: 4px 0 0; color: var(--rtfc-muted); font-size: 0.94rem; }

.rtfc-qty { margin-left: 6px; color: var(--rtfc-muted); }

.rtfc-dietary {
	display: inline-block;
	margin-top: 6px !important;
	padding: 2px 8px;
	background: var(--rtfc-cream);
	border-radius: 100px;
	font-size: 0.8rem !important;
}

/* --- Pipeline ---------------------------------------------------------- */

.rtfc-pipeline { margin: 0; padding: 0; list-style: none; }

.rtfc-pipeline li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
}

.rtfc-tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 0.8rem;
	font-weight: 700;
}

.rtfc-pipeline .is-done .rtfc-tick { background: var(--rtfc-green); color: #fff; }
.rtfc-pipeline .is-pending { color: var(--rtfc-muted); }
.rtfc-pipeline .is-pending .rtfc-tick { background: var(--rtfc-line); color: var(--rtfc-muted); }

.rtfc-when { margin-left: auto; font-size: 0.85rem; color: var(--rtfc-muted); }

/* --- Messages ---------------------------------------------------------- */

.rtfc-thread { margin: 0 0 24px; padding: 0; list-style: none; }

.rtfc-msg {
	margin-bottom: 14px;
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--rtfc-cream);
}

.rtfc-msg--in {
	margin-left: 32px;
	background: #fff;
	border: 1px solid var(--rtfc-line);
}

.rtfc-msg-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 6px;
	font-size: 0.82rem;
	color: var(--rtfc-muted);
}

.rtfc-msg-body p { margin: 0 0 8px; }
.rtfc-msg-body p:last-child { margin-bottom: 0; }

.rtfc-empty { color: var(--rtfc-muted); }

/* --- Forms ------------------------------------------------------------- */

.rtfc-portal label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.rtfc-portal textarea,
.rtfc-portal input[type="email"] {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--rtfc-line);
	border-radius: 6px;
	font: inherit;
	color: inherit;
	background: #fff;
	box-sizing: border-box;
}

.rtfc-portal textarea:focus,
.rtfc-portal input[type="email"]:focus {
	outline: 2px solid var(--rtfc-green-light);
	outline-offset: 1px;
	border-color: var(--rtfc-green-light);
}

.rtfc-btn {
	display: inline-block;
	margin-top: 12px;
	padding: 11px 22px;
	border: 0;
	border-radius: 6px;
	background: var(--rtfc-green);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.rtfc-btn:hover { background: var(--rtfc-green-light); }
.rtfc-btn:focus-visible { outline: 3px solid var(--rtfc-green-light); outline-offset: 2px; }

.rtfc-hint { font-size: 0.9rem; color: var(--rtfc-muted); }

/* --- Flash ------------------------------------------------------------- */

.rtfc-flash {
	padding: 12px 15px;
	margin-bottom: 22px;
	border-radius: 6px;
	border-left: 3px solid;
}

.rtfc-flash--ok { background: #eef3e8; border-color: var(--rtfc-green); }
.rtfc-flash--warn { background: #fdf3e3; border-color: #c48b28; }

/* --- Footer ------------------------------------------------------------ */

.rtfc-foot {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--rtfc-line);
	font-size: 0.9rem;
	color: var(--rtfc-muted);
}

.rtfc-portal--login { max-width: 460px; padding-top: 32px; }

@media (max-width: 600px) {
	.rtfc-schedule li { flex-direction: column; gap: 2px; }
	.rtfc-time { flex: none; }
	.rtfc-msg--in { margin-left: 16px; }
}

/* --- Menu and preorder ---------------------------------------------------- */

.rtfc-progress {
	padding: 11px 14px;
	background: var(--rtfc-cream);
	border-radius: 6px;
	font-size: 0.94rem;
}

.rtfc-chosen { margin: 0 0 20px; padding: 0; list-style: none; }

.rtfc-chosen li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--rtfc-line);
	font-size: 0.94rem;
}

.rtfc-chosen span { color: var(--rtfc-muted); }

.rtfc-course {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.rtfc-course legend {
	padding: 0;
	margin-bottom: 8px;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rtfc-green);
	font-weight: 700;
}

/* Big tap targets: most of these are filled in on a phone, often by someone
   working through a party of twelve. */
.rtfc-option {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	margin-bottom: 8px;
	background: #fff;
	border: 1px solid var(--rtfc-line);
	border-radius: 8px;
	cursor: pointer;
	font-weight: 400;
}

.rtfc-option:has(input:checked) {
	border-color: var(--rtfc-green);
	background: var(--rtfc-cream);
}

.rtfc-option input { margin-top: 3px; flex: 0 0 auto; }
.rtfc-option strong { display: block; font-size: 0.98rem; }
.rtfc-option em { display: block; margin-top: 2px; color: var(--rtfc-muted); font-size: 0.9rem; font-style: normal; }

.rtfc-diet {
	display: inline-block;
	margin-top: 5px;
	padding: 1px 8px;
	background: var(--rtfc-cream);
	border-radius: 100px;
	font-size: 0.78rem;
	color: var(--rtfc-muted);
}

.rtfc-preorder-form label { margin-top: 14px; }
.rtfc-preorder-form input[type="text"] {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--rtfc-line);
	border-radius: 6px;
	font: inherit;
	box-sizing: border-box;
}

/* --- Booking form --------------------------------------------------------- */

.rtfc-booking { max-width: 620px; }

.rtfc-booking-intro { margin-bottom: 20px; }

.rtfc-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--rtfc-line);
}

.rtfc-tab {
	padding: 11px 16px;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	font: inherit;
	font-weight: 600;
	color: var(--rtfc-muted);
	cursor: pointer;
}

.rtfc-tab.is-active {
	color: var(--rtfc-green);
	border-bottom-color: var(--rtfc-green);
}

.rtfc-panel { display: none; }
.rtfc-panel.is-active { display: block; }

/* The honeypot must be reachable by a bot parsing the HTML but never seen or
   focused by a person, so it is moved away rather than hidden with display
   none, which some bots check for. */
.rtfc-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rtfc-booking-form label {
	display: block;
	margin: 16px 0 6px;
	font-weight: 600;
	font-size: 0.94rem;
}

.rtfc-booking-form input[type="text"],
.rtfc-booking-form input[type="email"],
.rtfc-booking-form input[type="tel"],
.rtfc-booking-form input[type="date"],
.rtfc-booking-form input[type="number"],
.rtfc-booking-form select,
.rtfc-booking-form textarea {
	width: 100%;
	padding: 12px 13px;
	border: 1px solid var(--rtfc-line);
	border-radius: 6px;
	font: inherit;
	color: inherit;
	background: #fff;
	box-sizing: border-box;
}

.rtfc-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 520px) {
	.rtfc-row { grid-template-columns: 1fr; gap: 0; }
}

.rtfc-slots { margin: 20px 0 6px; }

.rtfc-slot-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin-top: 8px;
}

/* Big targets: most of these are tapped on a phone. */
.rtfc-slot {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 14px 12px;
	background: #fff;
	border: 1px solid var(--rtfc-line);
	border-radius: 8px;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.rtfc-slot strong { font-size: 0.98rem; }
.rtfc-slot span { font-size: 0.82rem; color: var(--rtfc-muted); }

.rtfc-slot:hover:not(:disabled) { border-color: var(--rtfc-green-light); }

.rtfc-slot.is-chosen {
	border-color: var(--rtfc-green);
	background: var(--rtfc-cream);
	box-shadow: inset 0 0 0 1px var(--rtfc-green);
}

.rtfc-slot:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: var(--rtfc-cream);
}

.rtfc-booking-form .rtfc-btn:disabled {
	background: var(--rtfc-line);
	cursor: not-allowed;
}

/* --- Special days, deposits and menus -------------------------------------- */

.rtfc-special-note {
	padding: 10px 13px;
	margin: 0 0 12px;
	background: var(--rtfc-cream);
	border-left: 3px solid var(--rtfc-green);
	border-radius: 0 6px 6px 0;
	font-size: 0.92rem;
	font-weight: 600;
}

/* Arrival times are numerous and uniform, so pack them tighter than the
   sitting cards, which carry a second line of detail. */
.rtfc-slot-list--times {
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 8px;
}

.rtfc-slot-list--times .rtfc-slot {
	padding: 11px 8px;
	align-items: center;
	text-align: center;
}

.rtfc-deposit {
	padding: 13px 15px;
	margin: 18px 0 0;
	background: #fdf3e3;
	border-radius: 8px;
	font-size: 0.94rem;
	line-height: 1.55;
}

.rtfc-menu { margin: 18px 0 0; }

.rtfc-menu-link {
	display: inline-block;
	padding: 11px 16px;
	background: #fff;
	border: 1px solid var(--rtfc-line);
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	color: var(--rtfc-green);
}

.rtfc-menu-link:hover { border-color: var(--rtfc-green); }
