/* Rückruf-Termine – Frontend */

:root {
	--t2c-primary: #2563eb;
	--t2c-primary-hover: #1d4ed8;
}

.t2c-open-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.7em 1.4em;
	font-size: 1rem;
	line-height: 1.2;
	color: #fff;
	background: var(--t2c-primary);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.t2c-open-btn--icon-only {
	width: 70px;
	height: 70px;
	padding: 0;
	border-radius: 50%;
}

.t2c-open-btn--icon-only .t2c-icon {
	width: 28px;
	height: 28px;
}

.t2c-open-btn:hover,
.t2c-open-btn:focus-visible {
	background: var(--t2c-primary-hover);
}

.t2c-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
}

.t2c-open-btn__label {
	white-space: nowrap;
}

/* ── Sticky-Button ───────────────────────────────────────── */

.t2c-sticky-btn {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	font-size: 1rem;
	color: #fff;
	background: var(--t2c-primary);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.t2c-sticky-btn:hover,
.t2c-sticky-btn:focus-visible {
	background: var(--t2c-primary-hover);
	transform: scale(1.08);
}

.t2c-sticky-btn .t2c-icon {
	width: 24px;
	height: 24px;
}

.t2c-modal[hidden] {
	display: none;
}

.t2c-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.t2c-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.t2c-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	color: #1e293b;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	padding: 28px 24px 24px;
}

.t2c-modal__close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	font-size: 24px;
	line-height: 36px;
	text-align: center;
	color: #64748b;
	background: transparent;
	border: 0;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.t2c-modal__close:hover,
.t2c-modal__close:focus-visible {
	background: #f1f5f9;
	color: #0f172a;
}

.t2c-modal__title {
	margin: 0 0 16px;
	font-size: 1.35rem;
}

.t2c-field {
	margin-bottom: 14px;
}

.t2c-row {
	display: flex;
	gap: 12px;
	margin-bottom: 14px;
}

.t2c-row .t2c-field {
	margin-bottom: 0;
}

.t2c-field--date {
	flex: 1 1 55%;
}

.t2c-field--time {
	flex: 1 1 45%;
}

.t2c-field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 0.92rem;
}

.t2c-field input,
.t2c-field select,
.t2c-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.7em;
	font-size: 1rem;
	line-height: 1.5;
	color: #1e293b;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}

.t2c-field input,
.t2c-field select {
	height: 2.8em;
}

.t2c-field textarea {
	height: auto;
}

/* ── Custom Datepicker ──────────────────────────────────── */

.t2c-datepicker {
	position: relative;
}

.t2c-datepicker__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.7em;
	font-size: 1rem;
	line-height: 1.5;
	height: 2.8em;
	color: #1e293b;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	cursor: pointer;
	text-align: left;
}

.t2c-datepicker__trigger:focus-visible {
	outline: none;
	border-color: var(--t2c-primary);
	box-shadow: 0 0 0 1px var(--t2c-primary);
}

.t2c-datepicker__display {
	flex: 1;
	color: #1e293b;
}

.t2c-datepicker__display:not(.has-value) {
	color: #94a3b8;
}

.t2c-datepicker__display:not(.has-value)::before {
	content: attr(data-placeholder);
}

.t2c-datepicker__icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-left: 8px;
	color: #64748b;
}

.t2c-datepicker__dropdown {
	position: absolute;
	z-index: 10;
	bottom: calc(100% + 4px);
	left: 0;
	width: 100%;
	min-width: 280px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	padding: 12px;
}

.t2c-datepicker__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.t2c-datepicker__month {
	font-weight: 600;
	font-size: 0.95rem;
	color: #1e293b;
}

.t2c-datepicker__prev,
.t2c-datepicker__next {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	color: #475569;
	background: transparent;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1;
}

.t2c-datepicker__prev:hover:not(:disabled),
.t2c-datepicker__next:hover:not(:disabled) {
	background: #f1f5f9;
	color: #1e293b;
}

.t2c-datepicker__prev:disabled,
.t2c-datepicker__next:disabled {
	opacity: 0.35;
	cursor: default;
}

.t2c-datepicker__grid {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.t2c-datepicker__grid th {
	font-size: 0.78rem;
	font-weight: 600;
	color: #64748b;
	text-align: center;
	padding: 4px 0;
}

.t2c-datepicker__day,
.t2c-datepicker__empty {
	text-align: center;
	padding: 0;
	height: 36px;
	width: 36px;
}

.t2c-datepicker__day {
	font-size: 0.88rem;
	color: #1e293b;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.1s ease;
}

.t2c-datepicker__day:not(.is-disabled):hover {
	background: color-mix(in srgb, var(--t2c-primary) 12%, #fff);
}

.t2c-datepicker__day.is-selected {
	background: var(--t2c-primary);
	color: #fff;
	font-weight: 600;
}

.t2c-datepicker__day.is-disabled {
	color: #cbd5e1;
	cursor: default;
}

.t2c-datepicker__empty {
	cursor: default;
}

.t2c-field input:focus,
.t2c-field select:focus,
.t2c-field textarea:focus {
	outline: none;
	border-color: var(--t2c-primary);
	box-shadow: 0 0 0 1px var(--t2c-primary);
}

.t2c-field select:disabled {
	background: #f1f5f9;
	color: #94a3b8;
}

/* Honeypot ausblenden – nicht via display:none (Bots erkennen das eher). */
.t2c-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.t2c-message {
	min-height: 1.2em;
	margin: 4px 0 12px;
	font-size: 0.9rem;
}

.t2c-message.is-error {
	color: #b91c1c;
}

.t2c-message.is-success {
	color: #15803d;
}

.t2c-actions {
	display: flex;
	justify-content: flex-end;
}

.t2c-submit {
	padding: 0.7em 1.5em;
	font-size: 1rem;
	color: #fff;
	background: var(--t2c-primary);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.t2c-submit:hover,
.t2c-submit:focus-visible {
	background: var(--t2c-primary-hover);
}

.t2c-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ── Success-Bereich ─────────────────────────────────────── */

.t2c-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
	padding: 24px 0;
}

.t2c-success[hidden] {
	display: none;
}

.t2c-success__icon {
	width: 64px;
	height: 64px;
	color: #15803d;
}

.t2c-success__text {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.5;
}

@media (max-width: 480px) {
	.t2c-modal {
		padding: 0;
	}

	.t2c-modal__dialog {
		max-width: 100%;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
		box-shadow: none;
		padding: 20px 16px 16px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.t2c-modal__close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 28px;
	}

	.t2c-row {
		flex-direction: column;
		gap: 14px;
	}

	.t2c-field--date,
	.t2c-field--time {
		flex: 1 1 100%;
	}

	.t2c-datepicker__dropdown {
		min-width: 0;
	}
}
