/* Time picker popover (also the frame of the date picker): shared by the front-end booking
   views and wp-admin (settings page, booking edit screen). Core Framework tokens only. */

.tc-time-input-wrapper {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
}

.tc-time-input-wrapper input {
	width: 100% !important;
	padding-right: var(--space-xl) !important;
	cursor: pointer;
}

.tc-time-picker-trigger {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	padding: var(--space-3xs) var(--space-2xs);
	margin: 0;
	cursor: pointer;
	border-radius: var(--radius-s);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--text-m);
	color: var(--primary-l-2);
	transition: background-color 0.15s ease, color 0.15s ease;
	z-index: 2;
}

.tc-time-picker-trigger:hover {
	background: var(--primary-5);
	color: var(--tertiary);
}

/* Popover container */
.tc-timepicker-popover {
	position: absolute;
	z-index: 999999;
	background: var(--bg-surface);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-m);
	box-shadow: var(--shadow-xl);
	width: 320px;
	max-width: 95vw;
	box-sizing: border-box;
	padding: var(--space-s) var(--space-s);
	font-family: inherit;
	animation: tcFadeIn 0.15s ease-out;
}

@keyframes tcFadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.tc-tp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--space-xs);
	border-bottom: 1px solid var(--primary-10);
	margin-bottom: var(--space-xs);
}

.tc-tp-title {
	font-weight: 700;
	font-size: var(--text-s);
	color: var(--text-title);
	display: flex;
	align-items: center;
	gap: var(--space-3xs);
}

.tc-tp-close {
	background: transparent;
	border: none;
	font-size: var(--text-l);
	line-height: 1;
	color: var(--primary-l-3);
	cursor: pointer;
	padding: 2px var(--space-3xs);
	border-radius: var(--radius-xs);
}
.tc-tp-close:hover {
	background: var(--primary-5);
	color: var(--text-body);
}

.tc-tp-body {
	display: flex;
	gap: var(--space-xs);
	margin-bottom: var(--space-xs);
}

.tc-tp-col {
	flex: 1;
}

.tc-tp-col-label {
	font-size: var(--text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--primary-l-2);
	margin-bottom: var(--space-3xs);
	text-align: center;
}

.tc-tp-grid {
	display: grid;
	gap: var(--space-4xs);
	max-height: 190px;
	overflow-y: auto;
	padding: 2px;
}

.tc-tp-hours-grid {
	grid-template-columns: repeat(3, 1fr);
}

.tc-tp-minutes-grid {
	grid-template-columns: repeat(3, 1fr);
}

.tc-tp-btn {
	background: var(--primary-5);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-s);
	padding: var(--space-3xs) 0;
	font-size: var(--text-s);
	font-weight: 600;
	color: var(--text-body);
	cursor: pointer;
	text-align: center;
	transition: all 0.12s ease;
	user-select: none;
}

.tc-tp-btn:hover:not(:disabled) {
	background: var(--tertiary-10);
	color: var(--tertiary-d-1);
	border-color: var(--tertiary-40);
}

.tc-tp-btn.is-selected {
	background: var(--tertiary) !important;
	color: var(--light) !important;
	border-color: var(--tertiary) !important;
	font-weight: 700;
}

.tc-tp-btn:disabled {
	opacity: 0.25;
	cursor: not-allowed;
	background: var(--primary-5);
	color: var(--primary-l-3);
	border-color: var(--primary-10);
	text-decoration: line-through;
}

.tc-tp-presets {
	background: var(--primary-5);
	border-radius: var(--radius-s);
	padding: var(--space-2xs) var(--space-xs);
	margin-bottom: var(--space-xs);
}

.tc-tp-presets-label {
	display: block;
	font-size: var(--text-xs);
	font-weight: 700;
	color: var(--primary-l-2);
	text-transform: uppercase;
	margin-bottom: var(--space-3xs);
}

.tc-tp-presets-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4xs);
}

.tc-tp-preset-chip {
	background: var(--bg-surface);
	border: 1px solid var(--primary-20);
	border-radius: var(--radius-xs);
	padding: 3px var(--space-3xs);
	font-size: var(--text-xs);
	font-weight: 600;
	color: var(--text-body);
	cursor: pointer;
	transition: all 0.12s ease;
}

.tc-tp-preset-chip:hover {
	background: var(--tertiary);
	color: var(--light);
	border-color: var(--tertiary);
}

.tc-tp-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: var(--space-xs);
	border-top: 1px solid var(--primary-10);
}

.tc-tp-preview {
	font-size: var(--text-s);
	color: var(--primary-l-2);
}

.tc-tp-preview strong {
	font-size: var(--text-m);
	color: var(--text-title);
	margin-left: var(--space-4xs);
}

.tc-tp-confirm-btn {
	background: var(--tertiary);
	color: var(--light);
	border: none;
	border-radius: var(--radius-s);
	padding: var(--space-3xs) var(--space-s);
	font-size: var(--text-s);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.tc-tp-confirm-btn:hover {
	background: var(--tertiary-d-1);
}
