/**
 * Minimal, theme-agnostic styling.
 *
 * Deliberately restrained: this ships into whatever theme a bureau runs, so it
 * sets layout and state and inherits everything else. No colours are used as
 * the SOLE carrier of meaning — every state also has text — because this is a
 * public-sector product under accessibility obligations.
 *
 * @package Tobalt_Specialistu_Registracija
 * @author  Tobalt — https://tobalt.lt
 */

.tsr-booking .tsr-field {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	margin: 0 0 1rem;
	max-width: 32rem;
}

.tsr-booking select,
.tsr-booking input[type="text"],
.tsr-booking input[type="email"],
.tsr-booking input[type="tel"] {
	width: 100%;
	max-width: 32rem;
}

/* The free times. Without a grid, a busy specialist renders up to 200 radios
   in one column and the citizen scrolls past the whole month. */
.tsr-slots {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 11rem, 1fr ) );
	gap: .5rem;
	margin: .5rem 0 1rem;
}

.tsr-slot {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .5rem .75rem;
	border: 1px solid currentColor;
	border-radius: .25rem;
	cursor: pointer;
	line-height: 1.3;
}

/* Focus must be visible on the label, not only the hidden-ish radio: keyboard
   users navigate this grid one slot at a time. */
.tsr-slot:focus-within {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.tsr-slots-group {
	border: 0;
	padding: 0;
	margin: 0 0 1rem;
}

.tsr-slots-group > legend {
	padding: 0;
	font-weight: 700;
}

/* State messages carry an icon-free text prefix in the markup ("Klaida:"), so
   these rules are emphasis, never the only signal. */
.tsr-status,
.tsr-notice,
.tsr-error {
	margin: .5rem 0;
	padding: .5rem .75rem;
	border-left: 4px solid currentColor;
}

.tsr-error {
	font-weight: 700;
}

.tsr-empty-state {
	font-style: italic;
}

/* Schedule screen */
.tsr-schedule table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5rem;
}

.tsr-schedule th,
.tsr-schedule td {
	text-align: left;
	padding: .5rem;
	border-bottom: 1px solid currentColor;
	vertical-align: top;
}

.tsr-conflict {
	border: 2px solid currentColor;
	padding: 1rem;
	margin: 0 0 1.5rem;
}

.tsr-conflict ul {
	margin: .5rem 0 1rem;
}

.tsr-schedule fieldset {
	margin: 0 0 1rem;
	padding: .75rem;
}

.tsr-schedule fieldset label {
	display: block;
	margin: .25rem 0;
}

/* Themes that do not ship .screen-reader-text would otherwise print our hidden
   button suffixes inline. Scoped so we never fight a theme that has its own. */
.tsr-booking .screen-reader-text,
.tsr-schedule .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	clip-path: inset( 50% );
	white-space: nowrap;
}
