/**
 * BranchOut Booking - Calendar Styles
 *
 * Responsive styling for FullCalendar integration.
 */

/* Calendar Wrapper */
.bo-calendar-wrapper {
	max-width: 100%;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Filters */
.bo-calendar-filters {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
	flex-wrap: wrap;
}

.bo-calendar-filters label {
	font-weight: 500;
	color: #333;
}

.bo-room-filter {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	min-width: 200px;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.bo-room-filter:hover {
	border-color: #999;
}

.bo-room-filter:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

/* Room Legend */
.bo-room-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-left: auto;
}

.bo-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #555;
}

.bo-legend-color {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	flex-shrink: 0;
}

/* Calendar Container */
.bo-calendar {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* FullCalendar Toolbar */
.bo-calendar .fc-toolbar {
	padding: 15px 20px;
	margin-bottom: 0 !important;
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}

.bo-calendar .fc-toolbar-title {
	font-size: 1.25rem !important;
	font-weight: 600;
	color: #333;
	text-transform: capitalize;
}

/* Toolbar Buttons */
.bo-calendar .fc-button {
	padding: 8px 16px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	border-radius: 6px !important;
	border: 1px solid #ddd !important;
	background: #fff !important;
	color: #333 !important;
	text-transform: none !important;
	transition: all 0.2s !important;
}

.bo-calendar .fc-button:hover {
	background: #f0f0f0 !important;
	border-color: #ccc !important;
}

.bo-calendar .fc-button:focus {
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2) !important;
}

.bo-calendar .fc-button-primary:not(:disabled).fc-button-active,
.bo-calendar .fc-button-primary:not(:disabled):active {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #fff !important;
}

.bo-calendar .fc-today-button {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #fff !important;
}

.bo-calendar .fc-today-button:hover {
	background: #1a5a8e !important;
	border-color: #1a5a8e !important;
}

.bo-calendar .fc-today-button:disabled {
	background: #ccc !important;
	border-color: #ccc !important;
	cursor: not-allowed;
}

/* Navigation Buttons */
.bo-calendar .fc-prev-button,
.bo-calendar .fc-next-button {
	padding: 8px 12px !important;
}

/* Column Headers */
.bo-calendar .fc-col-header {
	background: #f8f9fa;
}

.bo-calendar .fc-col-header-cell {
	padding: 12px 8px;
	font-weight: 600;
	font-size: 13px;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-color: #e9ecef;
}

.bo-calendar .fc-col-header-cell-cushion {
	color: inherit;
	text-decoration: none;
}

/* Day Cells */
.bo-calendar .fc-daygrid-day {
	transition: background-color 0.2s;
}

.bo-calendar .fc-daygrid-day:hover {
	background: #f8f9fa;
}

.bo-calendar .fc-daygrid-day-number {
	padding: 8px 10px;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	text-decoration: none;
}

/* Today Highlight */
.bo-calendar .fc-day-today {
	background: rgba(34, 113, 177, 0.05) !important;
}

.bo-calendar .fc-day-today .fc-daygrid-day-number {
	background: #2271b1;
	color: #fff;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Time Grid */
.bo-calendar .fc-timegrid-slot {
	height: 40px;
	border-color: #f0f0f0;
}

.bo-calendar .fc-timegrid-slot-minor {
	border-top-style: dotted;
	border-color: #f5f5f5;
}

.bo-calendar .fc-timegrid-slot-label {
	font-size: 12px;
	color: #888;
	vertical-align: top;
	padding-top: 4px;
}

.bo-calendar .fc-timegrid-axis {
	padding: 0 8px;
}

/* Events */
.bo-calendar .fc-event {
	border: none !important;
	border-radius: 4px !important;
	padding: 4px 8px !important;
	font-size: 13px !important;
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.1s;
}

.bo-calendar .fc-event:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bo-calendar .fc-event-main {
	padding: 2px 0;
}

.bo-calendar .fc-event-title {
	font-weight: 500;
}

.bo-calendar .fc-event-time {
	font-size: 11px;
	opacity: 0.9;
}

/* Event Colors */
.bo-calendar .fc-event.bo-status-confirmed,
.bo-calendar .fc-event.bo-status-bo_confirmed,
.bo-calendar .fc-event.bo-status-publish {
	background-color: #2271b1 !important;
}

.bo-calendar .fc-event.bo-status-pending,
.bo-calendar .fc-event.bo-status-bo_pending {
	background-color: #dba617 !important;
}

/* Day Grid Events */
.bo-calendar .fc-daygrid-event {
	margin: 2px 4px !important;
	padding: 2px 6px !important;
}

.bo-calendar .fc-daygrid-event-dot {
	display: none;
}

/* Scrollbar Styling */
.bo-calendar .fc-scroller::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.bo-calendar .fc-scroller::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 4px;
}

.bo-calendar .fc-scroller::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

.bo-calendar .fc-scroller::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Loading State */
.bo-calendar.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* No Events */
.bo-calendar .fc-list-empty {
	padding: 40px 20px;
	text-align: center;
	color: #888;
	font-style: italic;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
	.bo-calendar-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.bo-room-filter {
		width: 100%;
		min-width: auto;
	}

	.bo-room-legend {
		margin-left: 0;
		margin-top: 10px;
		justify-content: flex-start;
	}

	.bo-calendar .fc-toolbar {
		flex-direction: column;
		gap: 10px;
	}

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

/* Mobile */
@media (max-width: 768px) {
	.bo-calendar-wrapper {
		margin: 0 -10px;
	}

	.bo-calendar-filters {
		margin: 0 10px 15px;
		padding: 12px;
	}

	.bo-calendar {
		border-radius: 0;
		box-shadow: none;
		border-top: 1px solid #e9ecef;
		border-bottom: 1px solid #e9ecef;
	}

	.bo-calendar .fc-toolbar {
		padding: 10px;
	}

	.bo-calendar .fc-toolbar-title {
		font-size: 1rem !important;
	}

	.bo-calendar .fc-button {
		padding: 6px 10px !important;
		font-size: 12px !important;
	}

	/* Stack view buttons */
	.bo-calendar .fc-toolbar-chunk:last-child {
		flex-wrap: wrap;
		gap: 5px;
	}

	/* Smaller time labels */
	.bo-calendar .fc-timegrid-slot-label {
		font-size: 10px;
	}

	/* Smaller column headers */
	.bo-calendar .fc-col-header-cell {
		padding: 8px 4px;
		font-size: 11px;
	}

	/* Smaller events */
	.bo-calendar .fc-event {
		padding: 2px 4px !important;
		font-size: 11px !important;
	}

	.bo-calendar .fc-event-time {
		font-size: 10px;
	}

	/* Tighter time slots */
	.bo-calendar .fc-timegrid-slot {
		height: 32px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.bo-calendar-filters {
		padding: 10px;
	}

	.bo-calendar-filters label {
		font-size: 13px;
	}

	.bo-room-filter {
		padding: 10px;
		font-size: 14px;
	}

	.bo-room-legend {
		gap: 8px;
	}

	.bo-legend-item {
		font-size: 11px;
	}

	.bo-legend-color {
		width: 10px;
		height: 10px;
	}

	.bo-calendar .fc-toolbar {
		padding: 8px;
	}

	.bo-calendar .fc-toolbar-title {
		font-size: 0.9rem !important;
	}

	.bo-calendar .fc-button {
		padding: 5px 8px !important;
		font-size: 11px !important;
	}

	/* Hide some view buttons on very small screens */
	.bo-calendar .fc-dayGridMonth-button {
		display: none;
	}

	.bo-calendar .fc-col-header-cell {
		padding: 6px 2px;
		font-size: 10px;
		letter-spacing: 0;
	}

	.bo-calendar .fc-timegrid-slot {
		height: 28px;
	}

	.bo-calendar .fc-timegrid-slot-label {
		font-size: 9px;
	}
}

/* Print Styles */
@media print {
	.bo-calendar-filters {
		display: none;
	}

	.bo-calendar {
		box-shadow: none;
		border: 1px solid #ddd;
	}

	.bo-calendar .fc-button {
		display: none !important;
	}

	.bo-calendar .fc-toolbar {
		background: none;
		border: none;
	}
}

/* ============================================
   EVENT MODAL / LIGHTBOX
   ============================================ */

.bo-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.2s ease;
	padding: 20px;
}

.bo-modal-overlay.bo-modal-open {
	opacity: 1;
}

.bo-modal-overlay.bo-modal-closing {
	opacity: 0;
}

.bo-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 340px;
	width: 100%;
	position: relative;
	transform: scale(0.9) translateY(20px);
	transition: transform 0.2s ease;
	overflow: hidden;
}

.bo-modal-open .bo-modal {
	transform: scale(1) translateY(0);
}

.bo-modal-closing .bo-modal {
	transform: scale(0.9) translateY(20px);
}

.bo-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border: none;
	background: #f0f0f0;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	z-index: 1;
}

.bo-modal-close:hover {
	background: #e0e0e0;
	color: #333;
}

.bo-modal-body {
	padding: 24px;
}

.bo-modal-row {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.bo-modal-row:first-child {
	padding-top: 0;
}

.bo-modal-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bo-modal-label {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.bo-modal-value {
	font-size: 15px;
	color: #333;
	font-weight: 500;
}

/* Mobile Modal */
@media (max-width: 480px) {
	.bo-modal-overlay {
		padding: 10px;
		align-items: flex-end;
	}

	.bo-modal {
		max-width: none;
		border-radius: 12px 12px 0 0;
	}

	.bo-modal-open .bo-modal {
		transform: translateY(0);
	}

	.bo-modal-closing .bo-modal {
		transform: translateY(100%);
	}

	.bo-modal-body {
		padding: 20px;
	}
}
