/* Calendar Component Styles */

/* FullCalendar Base Styles */
.fc-event {
	cursor: pointer;
	transition: all 0.3s ease-in-out;
	border-radius: 4px !important;
	font-size: 12px;
	font-weight: 500;
	padding: 2px 6px;
	margin: 1px 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.fc-event:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	z-index: 999;
	position: relative;
}

.fc-event-title {
	font-weight: 600;
}

/* Calendar List View Styles */
.fc-event {
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.fc-event:hover {
	transform: scale(1.02);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fc-day-today {
	background-color: rgba(0, 123, 255, 0.08) !important;
}

.fc-day-past {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Custom Tooltip */
.appointment-tooltip {
	position: absolute;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	min-width: 280px;
	font-size: 13px;
	display: none;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.appointment-tooltip:hover {
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
	transform: translateY(-2px);
}

.appointment-tooltip .tooltip-time {
	font-weight: 600;
	color: #007bff;
	font-size: 14px;
}

.appointment-tooltip .tooltip-patient {
	font-weight: 600;
	margin: 6px 0;
}

.appointment-tooltip .tooltip-therapist {
	color: #6c757d;
	margin-bottom: 6px;
}

.appointment-tooltip .tooltip-duration {
	color: #28a745;
	font-size: 12px;
}

.appointment-tooltip .tooltip-status {
	margin-top: 8px;
}

.appointment-tooltip .tooltip-click-hint {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #eee;
	text-align: center;
}

/* Calendar Layout Improvements */
.fc-toolbar {
	margin-bottom: 1.5rem;
	padding: 0 0.5rem;
}

.fc-toolbar-title {
	font-size: 1.8rem;
	font-weight: 600;
	color: #333;
}

.fc-button-group .fc-button {
	border-radius: 6px;
	margin: 0 2px;
	font-weight: 500;
}

/* Brand calendar navigation buttons with white background */
.fc-button-primary {
	background-color: #ffffff !important;
	border: 2px solid #d1d5db !important;
	color: #374151 !important;
	font-weight: 500;
	transition: all 0.2s ease-in-out;
}

.fc-button-primary:hover {
	background-color: #f9fafb !important;
	border-color: #9ca3af !important;
	color: #111827 !important;
}

.fc-button-primary:active,
.fc-button-primary.fc-button-active {
	background-color: var(--brand-primary) !important;
	border-color: var(--brand-primary) !important;
	color: #ffffff !important;
}

.fc-button-primary:active:hover,
.fc-button-primary.fc-button-active:hover {
	background-color: var(--brand-primary-hover, var(--brand-primary)) !important;
	border-color: var(--brand-primary-hover, var(--brand-primary)) !important;
}

/* Custom button icons using CSS - with proper color for white background */
.fc-customPrev-button:before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	content: "\f053";
	margin-right: 6px;
	color: inherit;
}

.fc-customNext-button:after {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	content: "\f054";
	margin-left: 6px;
	color: inherit;
}

.fc-customToday-button:before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	content: "\f017";
	margin-right: 6px;
	color: inherit;
}

.fc-dayGridMonth-button:before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	content: "\f073";
	margin-right: 6px;
	color: inherit;
}

.fc-timeGridWeek-button:before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	content: "\f5da";
	margin-right: 6px;
	color: inherit;
}

/* Replace FullCalendar icons with simple symbols */
.fc-icon {
	display: none !important;
}

.fc-daygrid-day-number {
	font-weight: 600;
	color: #495057;
}

/* Today's Appointments Cards */
.appointment-card {
	transition: all 0.2s ease-in-out;
	border: 1px solid #e9ecef;
}

.appointment-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: #007bff;
}

.appointment-time {
	font-family: "Courier New", monospace;
	font-size: 1.1rem;
	color: #007bff;
}

/* Sidebar Toggle */
#appointments-sidebar {
	transition: all 0.3s ease-in-out;
}

#appointments-sidebar.collapsed {
	display: none;
}

/* Responsive Improvements */
@media (max-width: 768px) {
	.fc-toolbar {
		flex-direction: column;
		gap: 10px;
	}

	.fc-toolbar-chunk {
		display: flex;
		justify-content: center;
	}

	.fc-toolbar-title {
		font-size: 1.4rem;
	}

	.fc-event {
		font-size: 10px;
		padding: 1px 4px;
	}

	.appointment-tooltip {
		min-width: 240px;
		font-size: 12px;
	}
}

@media (max-width: 576px) {
	.fc-event-title {
		display: none;
	}

	.fc-event:after {
		content: "•";
		font-size: 16px;
	}
}

/* Drag & Drop Styles */
.fc-event.event-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.fc-event.event-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.fc-event-dragging,
.fc-event-resizing {
	opacity: 0.8;
	z-index: 999;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.calendar-loading {
	position: relative;
	pointer-events: none;
}

.calendar-loading::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.7);
	z-index: 10;
}

/* Notification animations */
@keyframes slideIn {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOut {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(400px);
		opacity: 0;
	}
}

.calendar-notification {
	animation: slideIn 0.3s ease;
}

/* Make events more draggable-looking */
.fc-event.fc-h-event {
	border-left-width: 4px;
}

.fc-event:hover {
	cursor: grab;
}

.fc-event:active {
	cursor: grabbing;
}

/* Highlight droppable time slots */
.fc-highlight {
	background: rgba(59, 130, 246, 0.1) !important;
	border: 2px dashed rgba(59, 130, 246, 0.4) !important;
}

/* Room Availability - Busy Slots */
.fc-event.room-busy-slot {
	opacity: 0.6;
	pointer-events: none;
}

.fc-timegrid .room-busy-slot {
	border-left: 3px solid rgba(220, 38, 38, 0.5) !important;
}

.fc-daygrid .room-busy-slot {
	height: 4px !important;
	margin: 2px 0;
}

/* Visual indicator for overlapping times */
.fc-timegrid-event.room-busy-slot::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 100%;
	background: repeating-linear-gradient(
		45deg,
		rgba(220, 38, 38, 0.05),
		rgba(220, 38, 38, 0.05) 10px,
		rgba(220, 38, 38, 0.1) 10px,
		rgba(220, 38, 38, 0.1) 20px
	);
	pointer-events: none;
}

/* Resource Timeline View */
.fc-resource-timeline {
	background: white;
}

.fc-resource-timeline .fc-timeline-slot {
	border-color: #e5e7eb;
}

.fc-resource-timeline .fc-timeline-lane {
	border-color: #e5e7eb;
}

.fc-datagrid-cell {
	padding: 8px 12px;
	font-weight: 500;
	color: #374151;
}

.fc-datagrid-header .fc-datagrid-cell {
	background-color: var(--brand-primary, #3b82f6);
	color: white;
	font-weight: 600;
}

.fc-timeline-event {
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.fc-timeline-event:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 999;
}

.fc-timeline-event .fc-event-title {
	font-weight: 600;
}

/* Resource labels styling */
.fc-datagrid-cell-frame {
	transition: background-color 0.2s ease;
}

.fc-datagrid-cell-frame:hover {
	background-color: #f9fafb;
}

/* Business hours shading in timeline */
.fc-timeline-bg .fc-non-business {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Resource capacity indicator (if needed) */
.fc-datagrid-cell .resource-capacity {
	font-size: 11px;
	color: #6b7280;
	margin-left: 4px;
}

/* Room Assignment Context Menu */
.room-context-menu {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
}

.room-context-menu::-webkit-scrollbar {
	width: 8px;
}

.room-context-menu::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.room-context-menu::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.room-context-menu::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.room-menu-item {
	user-select: none;
	-webkit-user-select: none;
}

/* Prevent context menu on calendar events (we handle it manually) */
.fc-event {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

