.tdb-wrap { max-width: 720px; margin: 0 auto; }
.tdb-wrap [hidden] { display: none !important; }

.tdb-form {
	position: relative;
	box-sizing: border-box;
	padding: 24px;
	background: #fff;
	border: 1px solid #dfe2e6;
	border-radius: 10px;
}

.tdb-title { margin: 0 0 16px; }

.tdb-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) {
	.tdb-grid { grid-template-columns: 1fr 1fr; }
	.tdb-full { grid-column: 1 / -1; }
}

.tdb-field { position: relative; min-width: 0; }
.tdb-field label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }

.tdb-field input,
.tdb-field select,
.tdb-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c3c8cf;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font: inherit;
}
.tdb-field input:focus,
.tdb-field select:focus,
.tdb-field textarea:focus {
	outline: 2px solid #1d6fb8;
	outline-offset: 1px;
	border-color: #1d6fb8;
}

.tdb-addr-row { display: flex; gap: 8px; }
.tdb-addr-row input { flex: 1; min-width: 0; }

.tdb-find {
	flex: none;
	padding: 0 14px;
	border: 0;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.tdb-find:disabled { opacity: .6; cursor: wait; }

.tdb-suggest {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 260px;
	margin: 2px 0 0;
	padding: 4px 0;
	overflow: auto;
	list-style: none;
	background: #fff;
	border: 1px solid #c3c8cf;
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.tdb-suggest button {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.tdb-suggest button:hover,
.tdb-suggest button:focus-visible { background: #e8f1fa; outline: none; }

.tdb-pick { margin-top: 8px; }
.tdb-addr-msg { display: block; min-height: 1em; margin-top: 4px; color: #b32d2e; font-size: 13px; }

.tdb-submit {
	display: block;
	width: 100%;
	margin-top: 18px;
	padding: 13px 20px;
	border: 0;
	border-radius: 6px;
	background: #1d6fb8;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.tdb-submit:hover,
.tdb-submit:focus-visible { background: #155a96; }
.tdb-submit:disabled { opacity: .6; cursor: wait; }

.tdb-msg { margin-bottom: 14px; padding: 12px 14px; border-radius: 6px; }
.tdb-msg.is-ok { background: #edfaef; border: 1px solid #b8e6bf; color: #116329; }
.tdb-msg.is-err { background: #fcf0f1; border: 1px solid #f0b8bb; color: #8a2424; }

/* Spam trap: hidden from people, visible to bots */
.tdb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Phone with country code */
.tdb-phone-row { display: flex; gap: 8px; }
.tdb-phone-row select { flex: 0 0 132px; width: auto; }
.tdb-phone-row input { flex: 1; min-width: 0; }

/* Extra stops */
.tdb-stops { display: grid; gap: 14px; }
.tdb-stops:empty { display: none; }
.tdb-addstop-row { margin-top: -6px; text-align: right; }
.tdb-add-stop {
	padding: 4px 0;
	border: 0;
	background: none;
	color: #1d6fb8;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.tdb-add-stop:hover { text-decoration: underline; }
.tdb-stop-remove {
	flex: none;
	width: 42px;
	border: 1px solid #c3c8cf;
	border-radius: 6px;
	background: #fff;
	color: #50575e;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.tdb-stop-remove:hover { background: #f6f7f7; }

/* Now / Schedule */
.tdb-toggle { display: inline-flex; border: 1px solid #c3c8cf; border-radius: 6px; overflow: hidden; }
.tdb-toggle label { margin: 0; }
.tdb-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tdb-toggle span {
	display: block;
	padding: 10px 22px;
	background: #fff;
	color: #1d2327;
	font-weight: 600;
	cursor: pointer;
}
.tdb-toggle input:checked + span { background: #1d6fb8; color: #fff; }
.tdb-toggle input:focus-visible + span { outline: 2px solid #1d6fb8; outline-offset: -2px; }

/* Note to driver */
.tdb-note { padding: 0; border: 1px solid #c3c8cf; border-radius: 6px; }
.tdb-note summary { padding: 10px 12px; font-weight: 600; cursor: pointer; }
.tdb-note textarea { border: 0; border-top: 1px solid #c3c8cf; border-radius: 0 0 6px 6px; resize: vertical; }
