/* ==== Modal Overlay ==== */
.ctc_cal_modal_overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999997;
}

/* ==== Calendar Modal ==== */
.ctc_cal_modal {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	padding: 20px;
	border-radius: 16px;
	width: 90%;
	max-width: 400px;
	max-height: 80%;
	overflow-y: auto;
	z-index: 999999998;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==== Calendar Header ==== */
.ctc_cal_header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	color: #333;
	font-size: 1.1rem;
	font-weight: 600;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
}

.ctc_cal_header span {
	background: #f0f0f0;
	font-size: 1.25rem;
	padding: 6px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.3s ease;
}
.ctc_cal_header span:hover {
	background: #007bff;
	color: #fff;
}

/* ==== Calendar Grid ==== */
.ctc_cal_grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.ctc_cal_day_header {
	font-weight: bold;
	color: #666;
	font-size: 0.9rem;
	text-align: center;
	padding: 6px;
}

.ctc_cal_scroll_content {
	max-height: 400px;
	overflow-y: auto;
	padding-right: 5px;
	position: relative;
}

.ctc_cal_scroll_content::-webkit-scrollbar {
	width: 8px;
}

.ctc_cal_scroll_content::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 10px;
}

.ctc_cal_scroll_content::-webkit-scrollbar-thumb {
	background-color: #888;
	border-radius: 10px;
	border: 2px solid #f0f0f0;
}

.ctc_cal_scroll_content::-webkit-scrollbar-thumb:hover {
	background-color: #555;
}

/* ==== Day Cells ==== */
.ctc_cal_day {
	font-size: 0.95rem;
	text-align: center;
	padding: 10px;
	border-radius: 10px;
	cursor: pointer;
	user-select: none;
	transition: background 0.3s ease, color 0.3s ease;
}
.ctc_cal_day:hover:not(.disabled) {
	background: #007bff;
	color: #fff;
}
.ctc_cal_day.selected {
	background: #0056b3;
	color: #fff;
	font-weight: bold;
}
.ctc_cal_day.disabled {
	background: #f5f5f5;
	color: #ccc;
	cursor: not-allowed;
}
.ctc_cal_day.past {
	color: #aaa;
}

/* ==== Time Slot Group ==== */
.ctc_fd_time_slot_group {
	margin-top: 1rem;
	padding: 12px;
	border-top: 1px solid #ddd;
	background-color: #f9f9f9;
	border-radius: 10px;
	text-align: center;
}

/* Time Select */
.ctc_fd_time_slot_group select {
	width: 100%;
	padding: 12px;
	font-size: 1rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	outline: none;
	transition: border-color 0.3s ease;
}
.ctc_fd_time_slot_group select:focus {
	border-color: #007bff;
}

/* ==== Time Grid Layout ==== */
#ctc_fd_time_select {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
	margin-top: 10px;
}

/* Individual Time Slot */
.ctc_fd_time_slot_box {
	padding: 10px;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	text-align: center;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s;
}
.ctc_fd_time_slot_box:hover {
	background-color: #f0f8ff;
	border-color: #007bff;
}
.ctc_fd_time_slot_box.selected {
	background-color: #007bff;
	color: #fff;
	border-color: #0056b3;
}
.ctc_fd_time_slot_box.disabled {
	background-color: #f5f5f5;
	color: #ccc;
	cursor: not-allowed;
	border-color: #ddd;
}

/* ==== Calendar Footer ==== */
.ctc_cal_footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1rem;
	padding-top: 10px;
	border-top: 1px solid #eee;
}

.ctc_cal_clear_btn,
.ctc_cal_close_btn {
	padding: 8px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background-color 0.3s ease;
}

.ctc_cal_clear_btn {
	background: #f8f9fa;
	color: #6c757d;
	border: 1px solid #dee2e6;
}
.ctc_cal_clear_btn:hover {
	background: #e9ecef;
	color: #495057;
}

.ctc_cal_close_btn {
	background: #007bff;
	color: #fff;
	border: 1px solid #007bff;
}
.ctc_cal_close_btn:hover {
	background: #0056b3;
	border-color: #0056b3;
}

/* ==== Responsive Design ==== */
@media (max-width: 480px) {
	.ctc_cal_modal {
		width: 95%;
		padding: 15px;
		max-height: 85%;
	}
	
	.ctc_cal_header {
		font-size: 1rem;
	}
	
	.ctc_cal_day {
		padding: 8px;
		font-size: 0.85rem;
	}
	
	#ctc_fd_time_select {
		grid-template-columns: 1fr;
	}
}