/* Custom Styles */
.nav-btn.active {
	background-color: #ebf8ff;
	color: #2b6cb0;
	font-weight: 700;
}

/* Overtime Table Layout */
.overtime-table {
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	overflow: hidden;
}

.table-header {
	display: flex;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	font-weight: 600;
	font-size: 0.875rem;
	color: #374151;
}

.header-date {
	flex: 2;
	padding: 0.75rem 1rem;
	border-right: 1px solid #e5e7eb;
}

.header-hours {
	flex: 1;
	padding: 0.75rem 1rem;
	border-right: 1px solid #e5e7eb;
	text-align: center;
}

.header-actions {
	flex: 2;
	padding: 0.75rem 1rem;
	text-align: center;
}

.table-body {
	max-height: 60vh;
	overflow-y: auto;
}

.overtime-row {
	display: flex;
	border-bottom: 1px solid #e5e7eb;
	align-items: center;
	transition: background-color 0.2s;
}

.overtime-row:hover {
	background-color: #f9fafb;
}

.overtime-row:last-child {
	border-bottom: none;
}

.row-date {
	flex: 2;
	padding: 0.75rem 1rem;
	border-right: 1px solid #e5e7eb;
}

.date-text {
	font-weight: 600;
	color: #111827;
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
}

.week-text {
	font-size: 0.75rem;
	color: #6b7280;
}

.row-hours {
	flex: 1;
	padding: 0.75rem 1rem;
	border-right: 1px solid #e5e7eb;
	text-align: center;
}

.hours-number {
	font-weight: 700;
	font-size: 1.125rem;
	margin-bottom: 0.25rem;
}

.hours-detail {
	font-size: 0.75rem;
	color: #6b7280;
}

.row-actions {
	flex: 2;
	padding: 0.5rem 1rem;
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
}

.action-btn {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
}

.consume-btn {
	background: #3b82f6;
	color: white;
}

.consume-btn:hover {
	background: #2563eb;
}

.cancel-btn {
	background: #ef4444;
	color: white;
}

.cancel-btn:hover {
	background: #dc2626;
}

.undo-btn {
	background: #f97316;
	color: white;
}

.undo-btn:hover {
	background: #ea580c;
}

.disabled-btn {
	background: #d1d5db;
	color: #9ca3af;
	cursor: not-allowed;
}

.action-btn i {
	font-size: 0.75rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
	.overtime-table {
		font-size: 0.75rem;
	}

	.header-date,
	.header-hours,
	.header-actions {
		padding: 0.5rem 0.75rem;
	}

	.row-date,
	.row-hours,
	.row-actions {
		padding: 0.5rem 0.75rem;
	}

	.action-btn {
		padding: 0.25rem 0.5rem;
		font-size: 0.625rem;
	}

	.action-btn span {
		display: none;
	}

	.action-btn i {
		font-size: 0.875rem;
	}
}

/* Day navigation row - side by side layout */
.day-navigation-row {
	background: #ffffff;
	padding: 1rem;
	border-radius: 0.75rem;
	box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
	border: 1px solid #f1f5f9;
	margin-bottom: 1rem;
}

.day-picker-section input[type="date"] {
	font-size: 0.875rem;
	font-weight: 600;
}

.day-picker-section input[type="date"]::-webkit-calendar-picker-indicator {
	background: #3b82f6;
	cursor: pointer;
	border-radius: 4px;
	padding: 2px;
	height: 20px;
	width: 20px;
}

.day-picker-section input[type="date"]::-webkit-calendar-picker-indicator:hover {
	background: #2563eb;
}

.day-nav-section .nav-day-btn {
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
}

/* Mobile responsive - stack on mobile */
@media (max-width: 768px) {
	.day-navigation-row {
		flex-direction: column !important;
		gap: 0.75rem;
		padding: 0.75rem;
	}

	.day-picker-section,
	.day-nav-section {
		width: 100% !important;
	}

	.day-nav-section {
		justify-content: center !important;
	}
}

/* Map specific styles */
#map {
	height: 50vh;
	width: 100%;
	z-index: 10;
	min-height: 300px;
	max-height: 600px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
	#map {
		height: 40vh;
		min-height: 250px;
		max-height: 400px;
	}

	.day-nav-container {
		padding: 0.75rem 1rem;
		margin-bottom: 1rem;
	}

	.nav-day-btn {
		width: 36px;
		height: 36px;
	}

	.stop-marker-bubble {
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	#map {
		height: 35vh;
		min-height: 200px;
		max-height: 350px;
	}

	.day-nav-container {
		padding: 0.5rem 0.75rem;
		flex-direction: column;
		gap: 0.5rem;
	}

	.nav-day-btn {
		width: 32px;
		height: 32px;
	}

	.stop-marker-bubble {
		font-size: 11px;
	}
}

/* Touch-friendly improvements */
.leaflet-control-zoom {
	font-size: 14px !important;
}

@media (max-width: 768px) {
	.leaflet-control-zoom {
		font-size: 16px !important;
	}

	.leaflet-control-zoom a {
		width: 30px !important;
		height: 30px !important;
		line-height: 30px !important;
	}

	/* Mobile stops list improvements */
	#stops-list {
		max-height: 200px !important;
	}

	/* Mobile modal improvements */
	.modal-container > div {
		margin: 1rem !important;
		max-width: calc(100vw - 2rem) !important;
	}
}

@media (max-width: 480px) {
	/* Small mobile adjustments */
	#stops-list {
		max-height: 150px !important;
	}

	/* Compact stop items on mobile */
	.p-4 {
		padding: 0.75rem !important;
	}

	/* Mobile navigation buttons */
	.nav-btn {
		font-size: 0.875rem !important;
		padding: 0.5rem 1rem !important;
	}
}

/* Modal transition */
#modal-container {
	transition: opacity 0.3s ease;
}

/* Leaflet popup customization if needed */
.leaflet-popup-content-wrapper {
	border-radius: 0.5rem;
}

/* Table styles for editor */
.data-table-container {
	overflow-x: auto;
}

.stop-marker-bubble {
	background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
	border: 3px solid #3b82f6;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
	cursor: pointer;
	font-size: 14px;
	font-weight: 800;
	color: #1e40af;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 500 !important;
}

.stop-marker-bubble:hover {
	transform: scale(1.15) translateY(-2px);
	box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
	background: white;
}

.stop-marker-bubble.is-break {
	border-color: #10b981;
	color: #065f46;
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.stop-marker-bubble.is-break:hover {
	background: #ecfdf5;
	box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.day-nav-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	padding: 1rem 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	margin-bottom: 1.5rem;
	border: 1px solid #f1f5f9;
}

.nav-day-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f8fafc;
	color: #64748b;
	transition: all 0.2s;
	border: none;
	cursor: pointer;
}

.nav-day-btn:hover:not(:disabled) {
	background: #eff6ff;
	color: #3b82f6;
	transform: scale(1.05);
}

.nav-day-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.stop-line {
	pointer-events: none;
}

/* Spinner center */
.spinner-container {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
}
