/* ============================================
   Форма записи на техосмотр — обновлённый дизайн
   ============================================ */

:root {
	--to-primary: #0d6efd;
	--to-primary-hover: #0b5ed7;
	--to-primary-light: #e7f1ff;
	--to-success: #198754;
	--to-success-bg: #d1e7dd;
	--to-error: #dc3545;
	--to-error-bg: #f8d7da;
	--to-text: #212529;
	--to-text-muted: #6c757d;
	--to-border: #dee2e6;
	--to-bg: #f8f9fa;
	--to-radius: 8px;
	--to-radius-sm: 6px;
	--to-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	--to-shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.12);
	--to-transition: 0.2s ease;
}

.to-booking-form-widget,
.to-booking-schedule-widget {
	max-width: 720px;
	margin: 0 auto;
	padding: 32px;
	background: #fff;
	border-radius: 12px;
	box-shadow: var(--to-shadow);
	border: 1px solid var(--to-border);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.to-booking-form-title,
.to-booking-schedule-title {
	margin: 0 0 28px;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--to-text);
	letter-spacing: -0.02em;
	line-height: 1.3;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--to-primary-light);
}

.to-booking-step {
	margin-bottom: 28px;
}

.to-booking-step label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--to-text);
	font-size: 0.95rem;
}

.to-booking-select {
	width: 100%;
	max-width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--to-border);
	border-radius: var(--to-radius-sm);
	font-size: 1rem;
	background: #fff;
	color: var(--to-text);
	transition: border-color var(--to-transition), box-shadow var(--to-transition);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

.to-booking-select:hover {
	border-color: #adb5bd;
}

.to-booking-select:focus {
	outline: none;
	border-color: var(--to-primary);
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.to-booking-instruction {
	margin: 0 0 16px;
	color: var(--to-text-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Метка выбранного типа — компактный badge вместо дублирования */
.to-booking-type-label {
	display: inline-block;
	margin: 0 0 20px;
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--to-primary);
	background: var(--to-primary-light);
	border-radius: 20px;
}

.to-booking-day-block {
	margin-bottom: 28px;
	padding: 20px;
	background: var(--to-bg);
	border-radius: var(--to-radius);
	border: 1px solid var(--to-border);
}

.to-booking-day-block:last-child {
	margin-bottom: 0;
}

.to-booking-day-title {
	margin: 0 0 16px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--to-text);
	display: flex;
	align-items: center;
	gap: 8px;
}

.to-booking-day-title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 20px;
	background: var(--to-primary);
	border-radius: 2px;
}

.to-booking-day-off {
	margin: 0;
	color: var(--to-text-muted);
	font-size: 0.9rem;
	font-style: italic;
}

.to-booking-slots {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.to-booking-slot-btn {
	padding: 10px 18px;
	border: 2px solid var(--to-primary);
	background: #fff;
	color: var(--to-primary);
	border-radius: var(--to-radius-sm);
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 600;
	transition: all var(--to-transition);
}

.to-booking-slot-btn:hover {
	background: var(--to-primary-light);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.to-booking-slot-btn:active {
	transform: translateY(0);
}

.to-booking-no-slots {
	margin: 0;
	color: var(--to-text-muted);
	font-size: 0.9rem;
}

/* Шаг 3 — форма данных */
.to-booking-details-form p {
	margin-bottom: 20px;
}

.to-booking-details-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--to-text);
	font-size: 0.9rem;
}

.to-booking-details-form input[type="text"],
.to-booking-details-form input[type="tel"],
.to-booking-details-form input[type="email"] {
	width: 100%;
	max-width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--to-border);
	border-radius: var(--to-radius-sm);
	font-size: 1rem;
	transition: border-color var(--to-transition), box-shadow var(--to-transition);
}

.to-booking-details-form input:focus {
	outline: none;
	border-color: var(--to-primary);
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.to-booking-selected-slot {
	margin-bottom: 20px;
	padding: 12px 16px;
	font-weight: 600;
	color: var(--to-success);
	background: var(--to-success-bg);
	border-radius: var(--to-radius-sm);
	font-size: 0.95rem;
}

/* Согласие на обработку ПД */
.to-booking-consent-wrap {
	margin: 24px 0 20px;
}

.to-booking-consent-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	font-weight: 400;
	color: var(--to-text);
	font-size: 0.9rem;
	line-height: 1.5;
}

.to-booking-consent-label input[type="checkbox"] {
	margin-top: 4px;
	width: 18px;
	height: 18px;
	min-width: 18px;
	flex-shrink: 0;
	cursor: pointer;
	accent-color: var(--to-primary);
}

.to-booking-consent-text {
	flex: 1;
}

.to-booking-privacy-link {
	color: var(--to-primary);
	text-decoration: underline;
}

.to-booking-privacy-link:hover {
	text-decoration: none;
}

.to-booking-submit,
.to-booking-back {
	padding: 12px 24px;
	border-radius: var(--to-radius-sm);
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	margin-right: 12px;
	transition: all var(--to-transition);
}

.to-booking-submit {
	background: var(--to-primary);
	color: #fff;
	border: none;
}

.to-booking-submit:hover {
	background: var(--to-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35);
}

.to-booking-submit:active {
	transform: translateY(0);
}

.to-booking-back {
	background: #fff;
	color: var(--to-text);
	border: 2px solid var(--to-border);
}

.to-booking-back:hover {
	background: var(--to-bg);
	border-color: #adb5bd;
}

.to-booking-message {
	margin-top: 20px;
	padding: 14px 18px;
	border-radius: var(--to-radius-sm);
	font-weight: 500;
}

.to-booking-success {
	background: var(--to-success-bg);
	color: #0f5132;
	border: 1px solid #badbcc;
}

.to-booking-error {
	background: var(--to-error-bg);
	color: #842029;
	border: 1px solid #f5c2c7;
}

.to-booking-loading {
	color: var(--to-text-muted);
	font-style: italic;
}

/* ========== График ========== */
.to-booking-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.to-booking-filters label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.to-booking-filters input[type="date"] {
	padding: 10px 14px;
	border: 2px solid var(--to-border);
	border-radius: var(--to-radius-sm);
	font-size: 0.95rem;
}

.to-booking-filters .button,
.to-booking-show-btn {
	padding: 10px 20px;
	background: var(--to-primary);
	color: #fff;
	border: none;
	border-radius: var(--to-radius-sm);
	cursor: pointer;
	font-weight: 600;
	transition: all var(--to-transition);
}

.to-booking-filters .button:hover,
.to-booking-show-btn:hover {
	background: var(--to-primary-hover);
	transform: translateY(-1px);
}

.to-booking-table-wrap {
	overflow-x: auto;
	margin-bottom: 20px;
	border-radius: var(--to-radius);
	border: 1px solid var(--to-border);
}

.to-booking-schedule-table {
	width: 100%;
	border-collapse: collapse;
}

.to-booking-schedule-table th,
.to-booking-schedule-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--to-border);
}

.to-booking-schedule-table th {
	background: var(--to-bg);
	font-weight: 600;
	color: var(--to-text);
}

.to-booking-schedule-table tbody tr:hover {
	background: var(--to-primary-light);
}

.to-booking-empty {
	color: var(--to-text-muted);
	font-style: italic;
	margin-top: 20px;
}
