/* ADE State-Based Pricing - Frontend Styles */

/* State Selector Modal */
.ade-state-selector-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	justify-content: center;
	align-items: center;
}

.ade-state-selector-modal.active {
	display: flex !important;
}

.ade-state-selector-content {
	background: white;
	border-radius: 8px;
	padding: 40px 30px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	max-width: 500px;
	width: 90%;
	text-align: center;
}

.ade-state-selector-content h2 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 24px;
	color: #222;
}

.ade-state-selector-content p {
	color: #666;
	margin-bottom: 30px;
	font-size: 14px;
}

.ade-state-selector-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 20px;
}

.ade-state-button {
	padding: 15px 20px;
	border: 2px solid #ddd;
	background: white;
	color: #333;
	border-radius: 6px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.ade-state-button:hover {
	border-color: #0073aa;
	color: #0073aa;
	background: #f5f5f5;
}

.ade-state-button:active {
	transform: scale(0.98);
}

/* State Selector Widget (Dropdown) - Fixed top-right */
.ade-state-selector-widget {
	position: fixed;
	top: 80px;
	right: 20px;
	z-index: 9998;
}

.ade-state-selector-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	transition: all 0.2s ease;
}

.ade-state-selector-button:hover {
	background: #efefef;
	border-color: #999;
}

.ade-state-selector-icon {
	display: inline-block;
}

.ade-state-selector-arrow {
	font-size: 10px;
	transition: transform 0.2s ease;
}

.ade-state-selector-widget.open .ade-state-selector-arrow {
	transform: rotate(180deg);
}

.ade-state-selector-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	min-width: 200px;
	margin-top: 5px;
	z-index: 9999;
}

.ade-state-selector-options {
	display: flex;
	flex-direction: column;
}

.ade-state-option {
	padding: 12px 15px;
	background: white;
	border: none;
	text-align: left;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: background 0.2s ease;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ade-state-option:hover {
	background: #f9f9f9;
}

.ade-state-option.active {
	background: #f0f0f0;
	font-weight: 600;
	color: #0073aa;
}

.ade-state-checkmark {
	color: #0073aa;
	font-weight: bold;
}

/* Cart Display */
.ade-sbp-locked-price {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ade-sbp-locked-badge {
	font-size: 12px;
	opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
	.ade-state-selector-buttons {
		grid-template-columns: 1fr;
	}

	.ade-state-selector-content {
		padding: 30px 20px;
	}

	.ade-state-selector-content h2 {
		font-size: 20px;
	}

	.ade-state-selector-dropdown {
		min-width: 150px;
		left: auto;
		right: 0;
	}
}

/* Accessibility */
.ade-state-button:focus,
.ade-state-selector-button:focus,
.ade-state-option:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.ade-state-selector-modal {
	animation: fadeIn 0.3s ease;
}
