/**
 * State Laws Block Styles
 *
 * Styles for the state-specific content block with sticky dropdown selector.
 *
 * @package Corpay\Project\Components
 */

/* Block Container */
.block-state-laws {
	width: 100%;
}

.block-state-laws__container {
	margin: 0 auto;
}

/* Sticky Dropdown Selector */
.block-state-laws__selector-sticky {
	position: sticky;
	top: 5.0625rem;
	z-index: 9;
	margin: 0 auto 3.75rem;
  background-color: #fff;
  padding: 0.625rem;
}

.block-state-laws__selector-wrapper {
	width: 58.125rem;
	max-width: 100%;
	display: flex;
	padding: 2.5rem;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 1.5625rem;
	border-radius: 0.9375rem;
	background: #F5F5F5;
	box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
	margin: 0 auto;
}

.block-state-laws__label {
	display: block;
	color: #000;
	text-align: center;
	font-size: 1.875rem;
	font-style: normal;
	font-weight: 500;
	line-height: 1.5rem; /* 80% */
}

.block-state-laws__dropdown {
	display: flex;
	width: 26.25rem;
	max-width: 100%;
	padding: 0.9375rem;
	justify-content: space-between;
	align-items: center;
	font-size: 1rem;
	line-height: 1.5;
	color: #1f2937;
	background-color: #FFF;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='35' viewBox='0 0 35 35' fill='none'%3E%3Cpath d='M12.696 16.6451L16.4731 20.4222C17.0419 20.991 17.9606 20.991 18.5294 20.4222L22.3065 16.6451C23.2252 15.7264 22.569 14.1514 21.271 14.1514H13.7169C12.419 14.1514 11.7773 15.7264 12.696 16.6451Z' fill='%230D0D0D'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9375rem center;
	background-size: 2.1875rem;
	border-radius: 0.375rem;
	border: 1px solid #939393;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
}

.block-state-laws__dropdown:hover {
	border-color: #6b6b6b;
}

.block-state-laws__dropdown:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 0.1875rem rgba(59, 130, 246, 0.1);
}

/* Content Area */
.block-state-laws__content {
	width: 58.125rem;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2.9375rem;
	margin: 0 auto;
}

/* Individual State Section */
.block-state-laws__state {
	scroll-margin-top: 20rem; /* Account for sticky header + dropdown wrapper */
}

.block-state-laws__state:last-child {
	border-bottom: none;
}

/* Increased specificity to override .prose h2 */
.block-state-laws .block-state-laws__state h2.block-state-laws__state-title {
	color: var(--Text-Colors-950, #0D0D0D);
	font-size: 1.875rem;
	font-style: normal;
	font-weight: 500;
	line-height: 2.3125rem; /* 123.333% */
	letter-spacing: -0.009375rem;
	margin-top: 0;
	margin-bottom: 0.875rem;
}

.block-state-laws__state-content {
	color: #0D0D0D;
	font-size: 1rem;
	font-style: normal;
	font-weight: 300;
	line-height: 1.6875rem;
}

/* Content Styles */
.block-state-laws__state-content p {
	margin-bottom: 1rem;
}

.block-state-laws__state-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1f2937;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
}

.block-state-laws__state-content h4 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1f2937;
	margin-top: 1.25rem;
	margin-bottom: 0.75rem;
}

.block-state-laws__state-content ul,
.block-state-laws__state-content ol {
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.block-state-laws__state-content li {
	margin-bottom: 0.5rem;
}

.block-state-laws__state-content a {
	color: #3b82f6;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.block-state-laws__state-content a:hover {
	color: #2563eb;
}

.block-state-laws__state-content img {
	max-width: 100%;
	height: auto;
	border-radius: 0.375rem;
	margin: 1rem 0;
}

/* Editor Placeholder */
.block-state-laws__placeholder {
	padding: 3rem 2rem;
	text-align: center;
	background-color: #f9fafb;
	border: 2px dashed #d1d5db;
	border-radius: 0.5rem;
	color: #6b7280;
}

.block-state-laws__placeholder p {
	margin-bottom: 0.5rem;
	font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 48rem) {
	.block-state-laws__selector-sticky {
		top: 4.5625rem;
    padding: 0.625rem 0;
	}

	.block-state-laws__selector-wrapper {
		width: 100%;
		padding: 1.25rem;
		gap: 0.9375rem;
	}

	.block-state-laws__content {
		width: 100%;
	}

	.block-state-laws__label {
		font-size: 1.5rem;
		line-height: 1.875rem;
	}

	.block-state-laws__dropdown {
		width: 100%;
		max-width: 100%;
	}

	/* Increased specificity to override .prose h2 on mobile */
	.block-state-laws .block-state-laws__state h2.block-state-laws__state-title {
		font-size: 1.5rem;
	}

	.block-state-laws__state {
		scroll-margin-top: 16rem;
	}

	.block-state-laws__content {
		gap: 2rem;
	}
}
/* Print Styles */
@media print {
	.block-state-laws__selector-sticky {
		position: static;
	}

	.block-state-laws__selector-wrapper {
		box-shadow: none;
		background: #f5f5f5;
		border: 1px solid #ccc;
	}

	.block-state-laws__dropdown {
		border: 1px solid #000;
	}
}
