.fusion-shipping-choice {
	background: #f9f9f9;
	border: 1px solid #ddd;
	margin: 0 0 20px;
	padding: 15px;
}

.fusion-shipping-choice h3 {
	margin: 0 0 10px;
	font-size: 16px;
}



.fusion-shipping-notice {
	color: #666;
	font-size: 13px;
	margin: 0 0 15px;
}

.fusion-shipping-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fusion-shipping-options li {
	margin: 0 0 10px;
}

.fusion-shipping-options label {
	cursor: pointer;
	display: inline-block;
}

.fusion-shipping-options input[type="radio"] {
	margin-right: 8px;
}

.fusion-delivery-address {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #ddd;
}

.fusion-delivery-address label {
	display: block;
	font-weight: 600;
	margin: 0 0 5px;
}

.fusion-delivery-address input[type="text"] {
	width: 100%;
}

.fusion-delivery-address .fusion-delivery-time {
	margin-top: 15px;
}

.fusion-delivery-address select {
	width: 100%;
}

.fusion-distance-info {
	color: #666;
	font-size: 13px;
	margin: 5px 0;
}

.fusion-api-warning {
	color: #e67e22;
	font-size: 13px;
	margin: 5px 0;
}

.fusion-delivery-fee {
	font-weight: 600;
	margin: 5px 0;
}

.fusion-delivery-notice {
	color: #d9534f;
	font-size: 12px;
	font-style: italic;
	margin: 5px 0;
}

/* Fallback scheduling UI */
.fusion-fallback-schedule {
	margin-top: 15px;
	padding: 15px;
	background: #fff8e6;
	border: 1px solid #ffd42a;
	border-radius: 4px;
}

.fusion-fallback-notice {
	background: #fff3cd;
	color: #856404;
	padding: 10px 15px;
	margin: 0 0 15px 0;
	border-left: 4px solid #ffc107;
	font-size: 14px;
	line-height: 1.5;
}

.fusion-fallback-notice strong {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.fusion-schedule-section {
	margin-top: 15px;
}

.fusion-schedule-section h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #333;
}

.fusion-delivery-map {
	margin-bottom: 15px;
	border-radius: 4px;
	overflow: hidden;
}

.fusion-delivery-map #fusion-map {
	height: 250px;
	background: #e8e8e8;
	border: 1px solid #ccc;
}

.fusion-date-picker-container {
	margin-bottom: 15px;
}

.fusion-date-picker-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
}

.fusion-date-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fusion-date-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 12px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	min-width: 70px;
	transition: all 0.2s ease;
}

.fusion-date-option:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.fusion-date-option.selected {
	background: #0073aa;
	color: #fff;
	border-color: #005a87;
}

.fusion-date-option.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #eee;
	border-color: #ddd;
}

.fusion-date-day {
	font-size: 11px;
	text-transform: uppercase;
	color: inherit;
	margin-bottom: 2px;
}

.fusion-date-day.fusion-date-selected {
	color: #fff;
}

.fusion-date-day.fusion-date-disabled {
	color: #999;
}

.fusion-date-number {
	font-size: 18px;
	font-weight: 600;
}

.fusion-date-month {
	font-size: 10px;
	color: inherit;
	margin-top: 2px;
}

.fusion-date-month.fusion-date-selected {
	color: #fff;
}

.fusion-date-month.fusion-date-disabled {
	color: #999;
}

.fusion-time-slot-container {
	margin-top: 15px;
}

.fusion-time-slot-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
}

.fusion-time-slots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
}

.fusion-time-slot-option {
	padding: 8px 16px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s ease;
}

.fusion-time-slot-option:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.fusion-time-slot-option.selected {
	background: #0073aa;
	color: #fff;
	border-color: #005a87;
}

.fusion-time-slot-option.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #eee;
	border-color: #ddd;
}

.fusion-schedule-summary {
	margin-top: 12px;
	padding: 10px;
	background: #e8f5e9;
	border: 1px solid #c8e6c9;
	border-radius: 4px;
	font-size: 13px;
	color: #2e7d32;
}

.fusion-schedule-summary.isEmpty {
	background: #ffebee;
	border-color: #ffcdd2;
	color: #c62828;
}

/* Improved time slot selector in delivery section */
.fusion-delivery-time {
	margin-top: 15px;
}

.fusion-delivery-time label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
}

.fusion-delivery-time .fusion-time-slots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.fusion-delivery-time .fusion-time-slot-option {
	padding: 8px 16px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s ease;
	text-align: center;
}

.fusion-delivery-time .fusion-time-slot-option:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.fusion-delivery-time .fusion-time-slot-option.selected {
	background: #0073aa;
	color: #fff;
	border-color: #005a87;
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.fusion-date-picker {
		gap: 6px;
	}
	
	.fusion-date-option {
		min-width: 60px;
		padding: 6px 8px;
	}
	
	.fusion-date-number {
		font-size: 16px;
	}
	
	.fusion-time-slot-option {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* Ensure map is responsive */
.fusion-delivery-map #fusion-map img {
	max-width: none !important;
}

.fusion-fallback-title {
	font-weight: 600;
	color: #856404;
	margin-bottom: 8px;
	font-size: 15px;
}

.fusion-schedule-section + .fusion-schedule-section {
	margin-top: 20px;
}

/* Next available delivery info (shown below fallback map) */
.fusion-next-delivery-info {
	margin-top: 10px;
	padding: 10px;
	background: #e8f5e9;
	border: 1px solid #c8e6c9;
	border-radius: 4px;
	font-size: 13px;
	color: #2e7d32;
}

.fusion-next-delivery-info strong {
	font-weight: 600;
}

.woocommerce-checkout #fusion-shipping-choice input[type="radio"] {
	display: inline-block;
}

.woocommerce-checkout #fusion_delivery_address,
.woocommerce-checkout #fusion_delivery_address_fallback {
	border: 1px solid #ccc;
	padding: 6px;
	background: #fff;
	min-width: 100%;
	box-sizing: border-box;
}
.fusion-address-input-wrapper {
	position: relative;
}

#fusion-detect-location-fallback,
#fusion-detect-location {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	padding: 10px;
	background: #efc475;
	border-radius: 10px;
}
#fusion-map-wrapper {
	margin: 10px 0;
}

#fusion-map {
	border-radius: 4px;
	overflow: hidden;
}

#fusion-map img {
	max-width: none !important;
}

/* Loading spinner for distance/fee calculation */
.fusion-delivery-distance-fee.loading {
	position: relative;
	min-height: 60px;
	opacity: 0.6;
	pointer-events: none;
	background: #f8f9fa;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.fusion-delivery-distance-fee.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0073aa;
	border-radius: 50%;
	animation: fusion-spin 1s linear infinite;
	z-index: 10;
}

.fusion-delivery-distance-fee.loading .fusion-distance-info,
.fusion-delivery-distance-fee.loading .fusion-delivery-fee {
	display: none;
}

.fusion-delivery-distance-fee.loading::before {
	content: "Calculating shipping cost...";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, 25px);
	width: 100%;
	text-align: center;
	color: #666;
	font-size: 13px;
	font-style: italic;
	z-index: 5;
}