/*
 * M2AIX Terminbuchung – Frontend-Styling (v0.2.0)
 *
 * Schriftart: wird bewusst nicht gesetzt – das Plugin erbt die
 * Typografie des umgebenden Themes (Avada).
 * Farben: alle als CSS-Variablen, zentral anpassbar.
 */

.tb-booking {
	--tb-color-primary:      #c00000;
	--tb-color-primary-dark: #a30000;
	--tb-color-text:         #2b2b28;
	--tb-color-text-muted:   #6b6b66;
	--tb-color-border:       #e1ddd3;
	--tb-color-bg-card:      #fffdfa;
	--tb-color-success-bg:   #eaf6ec;
	--tb-color-success-border: #bfe3c6;
	--tb-color-success-text: #235c2e;
	--tb-color-error-bg:     #fbeaea;
	--tb-color-error-border: #e3b8b8;
	--tb-color-error-text:   #7a2424;
	--tb-color-danger:       #7a2424;
	--tb-radius:             8px;

	width: 100%;
	max-width: 100%;
	font-size: 18px;
	line-height: 1.6;
	color: var(--tb-color-text);
}

/* Einleitung ---------------------------------------------------------------- */

.tb-intro {
	margin-bottom: 24px;
}

.tb-intro__heading {
	margin: 0 0 8px;
	font-weight: 600;
}

.tb-intro__text {
	margin: 0;
	color: var(--tb-color-text-muted);
}

/* Status-Meldungen ---------------------------------------------------------- */

.tb-message {
	padding: 12px 16px;
	border-radius: var(--tb-radius);
	margin-bottom: 20px;
}

.tb-message--success {
	background: var(--tb-color-success-bg);
	border: 1px solid var(--tb-color-success-border);
	color: var(--tb-color-success-text);
}

.tb-message--error {
	background: var(--tb-color-error-bg);
	border: 1px solid var(--tb-color-error-border);
	color: var(--tb-color-error-text);
}

/* Schritt-Abschnitte -------------------------------------------------------- */

.tb-step {
	margin-bottom: 28px;
}

.tb-step__label {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tb-color-text-muted);
	margin: 0 0 14px;
}

/* Slot-Liste (Datums-Gruppen) ----------------------------------------------- */

.tb-slot-list {
	margin-bottom: 8px;
}

.tb-slot-group {
	margin-bottom: 20px;
}

.tb-slot-group__date {
	font-weight: 600;
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--tb-color-border);
	color: var(--tb-color-text);
}

.tb-slot-group__times {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Slot-Buttons (Radio als klickbares Pill) ---------------------------------- */

.tb-slot input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tb-slot label {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid var(--tb-color-border);
	border-radius: 999px;
	color: var(--tb-color-text);
	cursor: pointer;
	font-weight: 600;
	font-size: 17px;
	white-space: nowrap;
	transition: border-color 0.12s ease, color 0.12s ease;
}

.tb-slot label:hover {
	border-color: var(--tb-color-primary);
	color: var(--tb-color-primary-dark);
}

.tb-slot input[type="radio"]:checked + label {
	background: var(--tb-color-primary);
	border-color: var(--tb-color-primary);
	color: #fff;
}

.tb-slot input[type="radio"]:focus-visible + label {
	outline: 2px solid var(--tb-color-primary-dark);
	outline-offset: 2px;
}

/* Kein Termin verfügbar ----------------------------------------------------- */

.tb-no-slots {
	font-style: italic;
	color: var(--tb-color-text-muted);
}

/* Formularfelder ------------------------------------------------------------ */

.tb-fields label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.tb-fields input[type="text"],
.tb-fields input[type="email"],
.tb-fields input[type="tel"],
.tb-fields select {
	width: 100%;
	max-width: 400px;
	padding: 9px 12px;
	margin-bottom: 14px;
	border: 1px solid var(--tb-color-border);
	border-radius: 6px;
	background: var(--tb-color-bg-card);
	color: var(--tb-color-text);
}

.tb-fields input:focus {
	outline: 2px solid var(--tb-color-primary);
	outline-offset: 1px;
}

.tb-hint {
	font-size: 15px;
	color: var(--tb-color-text-muted);
}

/* Buchen-Button ------------------------------------------------------------- */

.tb-button {
	background: var(--tb-color-primary);
	color: #fff;
	border: none;
	padding: 13px 30px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 18px;
	cursor: pointer;
	transition: background-color 0.12s ease;
}

.tb-button:hover {
	background: var(--tb-color-primary-dark);
}

.tb-button:focus-visible {
	outline: 2px solid var(--tb-color-primary-dark);
	outline-offset: 2px;
}

.tb-button--danger {
	background: var(--tb-color-danger);
}

/* Barrierefreiheit ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.tb-slot label,
	.tb-button {
		transition: none;
	}
}

/* ==========================================================================
   Kalenderansicht
   ========================================================================== */

.tb-type-select {
	margin-bottom: 16px;
}

.tb-type-select select {
	border: 1px solid var(--tb-color-border);
	border-radius: 6px;
	padding: 6px 10px;
}

.tb-week-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 16px;
}

.tb-week-nav__label {
	font-weight: 600;
	min-width: 160px;
	text-align: center;
}

.tb-week-nav__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--tb-color-text-muted);
	text-decoration: none;
	transition: background-color 0.12s ease, color 0.12s ease;
}

a.tb-week-nav__arrow:hover {
	background: var(--tb-color-border);
	color: var(--tb-color-text);
}

.tb-week-nav__arrow--disabled {
	color: var(--tb-color-border);
}

.tb-days {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.tb-day {
	background: var(--tb-color-bg-card);
	border: 1px solid var(--tb-color-border);
	border-radius: var(--tb-radius);
	padding: 12px 8px;
}

.tb-day__heading {
	text-align: center;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--tb-color-text);
}

.tb-day__slots {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
}

.tb-day__none {
	color: var(--tb-color-text-muted);
	text-align: center;
	display: block;
	font-size: 14px;
}

/* Slot-Buttons im Kalender-Modus (schmäler als in der Liste) */
.tb-days .tb-slot label {
	padding: 7px 6px;
	font-size: 16px;
}

/* ==========================================================================
   Abwesenheits-Hinweis
   ========================================================================== */

.tb-message--info {
	background: #f2f0ea;
	border: 1px solid var(--tb-color-border);
	color: var(--tb-color-text);
}

/* ==========================================================================
   Wochen-Reiter (Kalenderansicht) – Ueberblick + direktes Anspringen
   ========================================================================== */

.tb-week-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.tb-week-tab {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--tb-color-border);
	border-radius: 999px;
	color: var(--tb-color-text-muted);
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.tb-week-tab:hover {
	border-color: var(--tb-color-primary);
	color: var(--tb-color-primary-dark);
}

.tb-week-tab--active {
	background: var(--tb-color-primary);
	border-color: var(--tb-color-primary);
	color: #fff;
}

/* ==========================================================================
   Anker fuer Wochennavigation – verhindert Sprung an den Seitenanfang
   ========================================================================== */

.tb-week-anchor {
	display: block;
	position: relative;
	top: -90px;
	visibility: hidden;
}
