/* Editable school-timetable generator (מערכת שעות להדפסה). Plain, no library. */

.in4u-tt {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px;
	margin: 16px 0;
	font-family: inherit;
	color: #212529;
	direction: rtl;
	text-align: right;
}

.in4u-tt input[type="text"] { direction: rtl; text-align: right; }

.in4u-tt-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: end;
	margin-bottom: 12px;
}

.in4u-tt-ctrl {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 14px;
	margin: 0;
}

.in4u-tt-ctrl > span { font-weight: 600; color: #495057; }

.in4u-tt-ctrl select,
.in4u-tt-ctrl input[type="text"] {
	padding: 6px 10px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	font-family: inherit;
	min-width: 120px;
}

.in4u-tt-toggle {
	flex-direction: row;
	align-items: center;
	gap: 6px;
	padding-top: 22px;
}

.in4u-tt-toggle input { margin: 0; }

.in4u-tt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
}

.in4u-tt-btn {
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	transition: filter 0.15s;
}

.in4u-tt-btn:hover { filter: brightness(0.95); }
.in4u-tt-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.in4u-tt-btn-primary { background: #2271b1; color: #fff; }
.in4u-tt-btn-secondary { background: #fff; color: #2271b1; border: 1px solid #2271b1; }

.in4u-tt-status { font-size: 13px; color: #6c757d; }

.in4u-tt-render { overflow-x: auto; }

.in4u-tt-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	background: #fff;
}

.in4u-tt-caption {
	caption-side: top;
	font-size: 20px;
	font-weight: 700;
	padding: 8px;
	color: #212529;
	text-align: center;
	direction: rtl;
}

.in4u-tt-table th,
.in4u-tt-table td {
	border: 1px solid #adb5bd;
	padding: 6px 4px;
	text-align: center;
	vertical-align: middle;
	font-size: 14px;
}

.in4u-tt-table thead th {
	font-weight: 700;
	padding: 10px 4px;
}

.in4u-tt-table td[contenteditable],
.in4u-tt-table th[contenteditable] {
	min-height: 34px;
	cursor: text;
}

.in4u-tt-table td[contenteditable]:focus,
.in4u-tt-table th[contenteditable]:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.in4u-tt-num { background: #f1f3f5; font-weight: 700; width: 44px; }
.in4u-tt-hour { width: 74px; }

/* Color variant */
.tt-color thead th { background: #2271b1; color: #fff; }
.tt-color .in4u-tt-num { background: #e7f1fb; }
.tt-color tbody tr:nth-child(even) td { background: #f7fbff; }

/* Black & white variant */
.tt-bw thead th { background: #f1f3f5; color: #212529; }

@media (max-width: 560px) {
	.in4u-tt-table th,
	.in4u-tt-table td { font-size: 12px; padding: 4px 2px; }
}

@media print {
	.in4u-tt-controls,
	.in4u-tt-actions { display: none !important; }
	.in4u-tt { border: none; padding: 0; margin: 0; }
}
