.top-controls-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 1rem;
	margin-bottom: 1.5rem;
}
.top-controls-bar .btn {
	white-space: nowrap;
}
.schedule-top-notes {
	flex-grow: 1;
	min-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.875em;
	padding-left: 0.75rem;
	line-height: 1.5;
}

#interactiveScheduleArea {
	display: flex;
	flex-direction: row;
	align-items: flex-start; 
}

#timeGutterColumn {
	min-width: 90px;
	flex-shrink: 0;
	flex-grow: 0;
	flex-basis: auto;  
	background-color: #f8f9fa;
	border-right: 1px solid #dee2e6;
	display: flex;
	flex-direction: column;
	position: relative;
}

.time-gutter-header {
	padding: 8px 5px;
	text-align: center;
	font-weight: bold;
	font-size: 0.8em;
	border-bottom: 1px solid #dee2e6;
	height: 41px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	z-index: 150 !important;
}
.time-gutter-scrollable-content {
	flex-grow: 1;
	position: relative;
}
.time-gutter-week-segment {
	display: flex;
	flex-direction: column;
}
.time-gutter-week-header-placeholder {
	height: 29px;
	box-sizing: border-box;
	background-color: var(--bs-secondary, #6c757d);
	color: var(--bs-light, white);
	font-weight: bold;
	font-size: 0.8em;
	border-bottom: 1px solid #5a6268;
	position: sticky;
	top: 41px;
	z-index: 130 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
}
.time-gutter-slots-for-one-week {}
.time-gutter-hour-block {
	height: calc(12px * 4);
	border-top: 1px solid #ced4da;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.time-gutter-major-label {
	font-size: 0.75em;
	font-weight: bold;
	color: #495057;
	height: 12px;
	line-height: 12px;
	text-align: right;
	padding-right: 5px;
	padding-top: 2px;
}
.time-gutter-minor-labels {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	flex-grow: 1;
}
.time-gutter-minute-label {
	font-size: 0.65em;
	color: #6c757d;
	height: 12px;
	line-height: 12px;
	display: flex;
	align-items: center;
	padding-left: 5px;
}

#scheduleCanvasScrollable {
	flex-grow: 1;
	margin-right: 1rem;
	overflow-y: visible;
	position: relative;
	margin-right: 1rem;
}
.schedule-canvas {
	display: flex;
	flex-direction: column;
	position: relative;
}

.calendar-header-row {
	display: flex;
	flex-direction: row;
	z-index: 140 !important;
	height: 41px;
	box-sizing: border-box;
	background-color: rgb(248, 249, 250);
	border-bottom: 1px solid #dee2e6;
}

.week-specific-date-header-row {
	display: flex;
	flex-direction: row;
	background-color: var(--bs-secondary, #6c757d);
	color: var(--bs-light, white);
	font-weight: bold;
	border-bottom: 1px solid #5a6268;
	top: 41px;
	z-index: 120 !important;
	height: 29px;
	box-sizing: border-box;
	margin-bottom: 0;
}
.week-date-cell {
	flex-grow: 1;
	flex-basis: 0;
	min-width: 80px;
	padding: 0px 5px;
	text-align: center;
	font-size: 0.8em;
	border-left: 1px solid #868e96;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}
.week-date-cell:first-child {
	border-left: none;
}
.week-date-cell.out-of-range-date-header {
	opacity: 0.6;
}
.week-date-cell.today-date-header {
	background-color: var(--bs-primary-bg-subtle, #cfe2ff);
	color: var(--bs-primary-text-emphasis, #004085);
	font-weight: bold;
}

.canvas-week-segment {
	display: flex;
	flex-direction: column;
}
.calendar-week-data-row {
	display: flex;
	flex-direction: row;
	margin-top: 0;
}

.calendar-header-cell {
	flex-grow: 1;
	flex-basis: 0;
	min-width: 80px;
	border-left: 1px solid #e9ecef;
	box-sizing: border-box;
	padding: 8px 5px;
	text-align: center;
	font-weight: bold;
	font-size: 0.9em;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.calendar-header-cell:first-child {
	border-left: none;
}

.calendar-day-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	flex-basis: 0;
	min-width: 80px;
	border-left: 1px solid #e9ecef;
	box-sizing: border-box;
}
.calendar-day-cell:first-child {
	border-left: none;
}
.calendar-day-cell.weekend-day {}

.calendar-day-cell.day-out-of-schedule-range {
	background-color: #f1f3f5; 
	position: relative; 
}

.calendar-day-cell.day-out-of-schedule-range::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 7px,
		rgba(0, 0, 0, 0.08) 7px,
		rgba(0, 0, 0, 0.08) 8px
	);
	opacity: 0.7;
	pointer-events: none; 
	z-index: 1; 
}

.calendar-day-cell.day-out-of-schedule-range .assignment-block {
	opacity: 0.6; 
}

.calendar-day-cell.today {
	background-color: #e9f5ff;
}
.calendar-day-cell.today .time-slots-container::before {
	content: '';
	position: absolute;
	left: 0; right: 0;
	top: 50%;
	height: 2px;
	background-color: red;
	z-index: 10;
	opacity: 0.7;
}

.time-slots-container {
	position: relative;
	flex-grow: 1;
	overflow: hidden; /* This will clip assignment blocks taller than the container */
}
.time-slot {
	height: 12px;
	box-sizing: border-box;
	border-bottom: none;
	position: relative;
	overflow: hidden;
}
.time-slot.hour-mark {
	border-top: 1px solid #ced4da;
}
.time-slot.hour-mark::before { content: none; }

.time-slot.drop-target-hover {
  background-color: #d0eaff; 
  outline: 1px dashed #007bff;
}

.time-slot.unavailable-slot {
  background-color: #ffebee;
  outline: 1px solid #f44336;
  opacity: 0.8;
}

#colorPaletteColumn {
	flex: 0 0 220px; 
	background-color: #f8f9fa; 
	border: 1px solid #dee2e6; 
	border-radius: 0.375rem;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	align-self: flex-start; 
	height: calc(100vh - 60px);
	z-index: 20; 
}

.palette-header {
	padding: 8px 10px;
	text-align: center;
	font-weight: bold;
	border-bottom: 1px solid #dee2e6;
	font-size: 0.9em;
	height: 41px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}
.palette-content {
	padding: 10px;
	flex-grow: 1;
	overflow-y: auto;
}

.palette-item {
	padding: 16px 12px;
	margin-bottom: 12px;
	border-radius: 0.5rem;
	font-size: 1em;
	font-weight: bold;
	cursor: grab;
	border: 1px solid rgba(0,0,0,0.1);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	align-items: center;
	justify-content: center;
}
.palette-item:last-child {
	margin-bottom: 0;
}
.palette-item:hover {
	opacity: 0.85;
	box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
.open-slot-palette-item {}
.user-palette-item {}

.assignment-block {
	position: absolute;
	left: 3px;
	right: 3px;
	background-color: rgba(0, 123, 255, 0.7);
	color: white;
	font-size: 0.75em;
	padding: 1px 2px;
	border-radius: 3px;
	overflow: hidden; 
	z-index: 5;
	box-sizing: border-box;
	border: 1px solid rgba(0,0,0,0.1);
	cursor: grab;
	display: flex;
	flex-direction: column;
	align-items: center; 
	justify-content: center; 
}
.assignment-text-content {
	width: 100%;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 1px 24px; 
	flex-grow: 1; 
	display: flex;
	align-items: center;
	justify-content: center;
}
.assignment-block.opening {
	background-color: rgba(255, 193, 7, 0.6);
	border: 1px dashed #ffc107;
	color: #333;
}
.assignment-block.swap-request {
	background-color: rgba(220, 53, 69, 0.6);
	border: 1px solid #dc3545;
	color: white;
}
.assignment-block:hover {
	opacity: 0.85;
}
.assignment-block.dragging {
	opacity: 0.7;
	cursor: grabbing;
	z-index: 1000 !important;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.resize-handle {
	position: absolute;
	left: 0;
	right: 0;
	height: 6px;
	background-color: rgba(0, 0, 0, 0.1); 
	z-index: 6; 
}
.resize-handle:hover {
	background-color: rgba(0, 0, 0, 0.3);
}
.resize-handle-top {
	top: 0;
	cursor: ns-resize;
}
.resize-handle-bottom {
	bottom: 0;
	cursor: ns-resize;
}

body.is-resizing {
	cursor: ns-resize !important;
}
.assignment-block.resizing {
	opacity: 0.75;
	z-index: 999 !important; 
}

.delete-assignment-icon {
	position: absolute;
	top: 50%;
	right: 2px;
	transform: translateY(-50%);
	font-size: 1.1em; 
	color: rgba(255, 255, 255, 0.8); 
	cursor: pointer;
	z-index: 7; 
	padding: 2px; 
	line-height: 1;
	border-radius: 2px;
	transition: all 0.2s ease;
}
.delete-assignment-icon:hover {
	color: rgba(255, 255, 255, 1); 
	background-color: rgba(220, 53, 69, 0.8);
	transform: translateY(-50%) scale(1.15);
}
.assignment-block.opening .delete-assignment-icon {
	color: rgba(0, 0, 0, 0.6); 
}
.assignment-block.opening .delete-assignment-icon:hover {
	color: rgba(0, 0, 0, 0.9);
	background-color: rgba(220, 53, 69, 0.3);
}

.properties-assignment-icon {
	position: absolute;
	top: 50%;
	left: 2px;
	transform: translateY(-50%);
	font-size: 1.1em; 
	color: rgba(255, 255, 255, 0.8); 
	cursor: pointer;
	z-index: 7; 
	padding: 2px; 
	line-height: 1;
	border-radius: 2px;
	transition: all 0.2s ease;
}
.properties-assignment-icon:hover {
	color: rgba(255, 255, 255, 1); 
	background-color: rgba(0, 123, 255, 0.8);
	transform: translateY(-50%) scale(1.15);
}
.assignment-block.opening .properties-assignment-icon {
	color: rgba(0, 0, 0, 0.6); 
}
.assignment-block.opening .properties-assignment-icon:hover {
	color: rgba(0, 0, 0, 0.9);
	background-color: rgba(0, 123, 255, 0.3);
}

.assignment-block.clipped-end {
	overflow: hidden; 
}

.assignment-block.clipped-end::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 10px; /* Increased height for more presence */
	background-color: #e9ecef; /* Light gray background for the hatch area itself */
	background-image: repeating-linear-gradient(
		-45deg,
		transparent,
		transparent 2px, /* Make transparent part smaller */
		rgba(220, 53, 69, 0.65) 2px,  /* More opaque red, thinner line (Bootstrap's danger-ish) */
		rgba(220, 53, 69, 0.65) 4px   /* Make line part smaller, creating denser hatch */
	);
	pointer-events: none; 
	z-index: 1; /* Just above the block's main background */
}

/* Force icon visibility and positioning - override any conflicting styles */
.assignment-block .delete-assignment-icon,
.assignment-block .properties-assignment-icon {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.assignment-block .delete-assignment-icon {
	position: absolute !important;
	top: 2px !important;
	right: 2px !important;
	left: auto !important;
	transform: none !important;
	font-size: 1.1em !important; 
	color: rgba(255, 255, 255, 0.8) !important; 
	cursor: pointer !important;
	z-index: 10 !important; 
	padding: 2px !important; 
	line-height: 1 !important;
	border-radius: 50% !important;
	transition: all 0.2s ease !important;
	background-color: transparent !important;
}

.assignment-block .delete-assignment-icon:hover {
	color: rgba(255, 0, 0, 1) !important; 
	background-color: rgba(255, 255, 255, 0.9) !important;
	transform: scale(1.2) !important;
}

.assignment-block .properties-assignment-icon {
	position: absolute !important;
	top: 2px !important;
	left: 2px !important;
	right: auto !important;
	transform: none !important;
	font-size: 1.1em !important; 
	color: rgba(255, 255, 255, 0.8) !important; 
	cursor: pointer !important;
	z-index: 10 !important; 
	padding: 2px !important; 
	line-height: 1 !important;
	border-radius: 50% !important;
	transition: all 0.2s ease !important;
	background-color: transparent !important;
}

.assignment-block .properties-assignment-icon:hover {
	color: rgba(0, 123, 255, 1) !important; 
	background-color: rgba(255, 255, 255, 0.9) !important;
	transform: scale(1.2) !important;
}

/* Adjust text content to make room for icons */
.assignment-block .assignment-text-content {
	padding: 1px 4px !important; 
	margin: 0 !important;
}

/* Special styling for open slots */
.assignment-block.opening .delete-assignment-icon,
.assignment-block.opening .properties-assignment-icon {
	color: rgba(0, 0, 0, 0.7) !important;
	background-color: rgba(255, 255, 255, 0.2) !important;
}

.assignment-block.opening .delete-assignment-icon:hover {
	color: rgba(255, 255, 255, 1) !important;
	background-color: rgba(220, 53, 69, 0.8) !important;
}

.assignment-block.opening .properties-assignment-icon:hover {
	color: rgba(255, 255, 255, 1) !important;
	background-color: rgba(0, 123, 255, 0.8) !important;
}

/* Schedule Properties Modal Status Badge Styling */
#modalPropsScheduleStatus {
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.5rem 0.75rem;
	border-radius: 0.375rem;
	text-transform: capitalize;
	letter-spacing: 0.025em;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

#modalPropsScheduleStatus.bg-warning {
	background-color: #ffc107 !important;
	color: #212529 !important;
	border: 1px solid #ffca2c;
}

#modalPropsScheduleStatus.bg-success {
	background-color: #198754 !important;
	color: #ffffff !important;
	border: 1px solid #20c997;
}

#modalPropsScheduleStatus.bg-secondary {
	background-color: #6c757d !important;
	color: #ffffff !important;
	border: 1px solid #adb5bd;
}

#modalPropsScheduleStatus.bg-danger {
	background-color: #dc3545 !important;
	color: #ffffff !important;
	border: 1px solid #f5c2c7;
}

#modalPropsScheduleStatus.bg-info {
	background-color: #0dcaf0 !important;
	color: #000000 !important;
	border: 1px solid #9eeaf9;
}

/* === OVERLAP DETECTION STYLING === */

/* Overlap container - positioned over overlapping assignments */
.overlap-container {
	position: absolute;
	z-index: 100;
	pointer-events: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	padding: 3px;
	background-color: #ffeb3b;
	border: 2px solid #cddc39;
	border-radius: 4px;
	box-sizing: border-box;
	box-shadow: 0 2px 8px rgba(205, 220, 57, 0.4);
	cursor: pointer;
	transition: all 0.2s ease;
}

/* Add lemon and lime diagonal pattern */
.overlap-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: repeating-linear-gradient(
		45deg,
		#ffeb3b 0px,
		#ffeb3b 6px,
		#cddc39 6px,
		#cddc39 12px
	);
	border-radius: 2px;
	pointer-events: none;
	z-index: -1;
}

/* Hover effects for overlap container */
.overlap-container:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(205, 220, 57, 0.6);
	border-color: #c0ca33;
}

/* Individual overlap tokens within the container */
.overlap-token {
	pointer-events: auto;
	background-color: #007bff;
	color: #ffffff;
	border: 2px solid rgba(255, 255, 255, 0.8);
	border-radius: 4px;
	padding: 2px 6px;
	margin: 1px;
	font-size: 0.7em;
	font-weight: bold;
	cursor: pointer;
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 80px;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.overlap-token:hover {
	transform: scale(1.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	z-index: 101;
}

/* Overlap modal assignment items */
.overlap-assignment-item {
	transition: all 0.2s ease;
}

.overlap-assignment-item:hover {
	background-color: #e9ecef !important;
	border-color: #007bff !important;
	transform: translateX(4px) !important;
}

/* Dimmed state for assignment blocks during drag operations */
.assignment-block.dimmed {
	opacity: 0.3;
	transition: opacity 0.2s ease;
}


/* Ghosting effect for assignment blocks during native drag */
.assignment-block.ghosting {
	opacity: 0.5;
	pointer-events: none;
}

/* === COLUMN-BASED OVERLAP STYLING === */

/* Squeezed assignment blocks in narrow columns */
.assignment-block.squeezed {
	font-size: 0.65em; /* Smaller text for narrow columns */
	padding: 1px; /* Reduced padding */
}

.assignment-block.squeezed .assignment-text-content {
	padding: 0 2px; /* Minimal padding for text */
	font-weight: normal; /* Regular font weight for squeezed text */
}

/* Hide icons for very narrow squeezed assignments */
.assignment-block.squeezed .delete-assignment-icon,
.assignment-block.squeezed .properties-assignment-icon {
	display: none !important;
}

/* Show icons on hover for squeezed assignments */
.assignment-block.squeezed:hover .delete-assignment-icon,
.assignment-block.squeezed:hover .properties-assignment-icon {
	display: block !important;
	font-size: 0.9em !important; /* Slightly smaller icons */
}

/* Conflict warning styling - yellow hatch pattern for availability violations */
.assignment-block.conflict-warning::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 4px,
		rgba(255, 193, 7, 0.6) 4px,
		rgba(255, 193, 7, 0.6) 8px
	);
	pointer-events: none;
	z-index: 2;
	border-radius: 3px;
}

/* === TIME RANGE SLIDER STYLING === */

.time-range-slider-container {
	position: relative;
	height: 120px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	margin: 8px 0;
	user-select: none;
	overflow: visible;
	padding: 16px;
}

.time-scale-container {
	position: absolute;
	left: 0;
	right: 0;
	top: 16px;
	height: 50px;
	margin: 0;
	padding: 0;
}

.hour-markers {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 20px;
	margin: 0;
	padding: 0;
}

.hour-marker {
	position: absolute;
	width: 1px;
	height: 20px;
	background: #6c757d;
	font-size: 0.7em;
	color: #6c757d;
	margin: 0;
	padding: 0;
}

.hour-marker::after {
	content: attr(data-hour);
	position: absolute;
	top: -15px;
	left: -10px;
	width: 20px;
	text-align: center;
	margin: 0;
	padding: 0;
}

.minute-markers {
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	height: 10px;
	margin: 0;
	padding: 0;
}

.minute-marker {
	position: absolute;
	width: 1px;
	height: 10px;
	background: #dee2e6;
	margin: 0;
	padding: 0;
}

.time-range-bar {
	position: absolute;
	top: 55px;
	height: 40px;
	background-color: rgba(0, 123, 255, 0.7);
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 6px;
	cursor: grab;
	box-shadow: 0 2px 6px rgba(0,0,0,0.2);
	transition: opacity 0.2s ease;
}

.time-range-bar:hover {
	opacity: 0.85;
}

.time-range-bar.dragging {
	cursor: grabbing;
	opacity: 0.7;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.time-range-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 6px;
	background-color: rgba(0, 0, 0, 0.1);
	cursor: ew-resize;
	transition: background-color 0.2s ease;
}

.time-range-handle:hover {
	background-color: rgba(0, 0, 0, 0.3);
}

.time-range-handle.dragging {
	background-color: rgba(0, 0, 0, 0.4);
}

.time-range-handle-start {
	left: 0;
	border-radius: 3px 0 0 3px;
}

.time-range-handle-end {
	right: 0;
	border-radius: 0 3px 3px 0;
}

.time-range-bar.dragging {
	cursor: grabbing;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.time-range-handle.dragging {
	transform: scale(1.15);
	box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

/* Enhanced tactile feedback for 15-minute snapping */
.time-range-bar {
	transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.time-range-handle {
	transition: transform 0.1s ease-out, background-color 0.2s ease;
}

/* Snap feedback animation */
@keyframes snapFeedback {
	0% { transform: scale(1); }
	50% { transform: scale(1.02); }
	100% { transform: scale(1); }
}

.time-range-bar.snap-feedback {
	animation: snapFeedback 0.1s ease-out;
}
