/**
 * Laws & Regulations listing.
 * Colors and spacing can be overridden from the Breakdance design panel.
 */

.omsar-laws-widget {
	width: 100%;
	font-family: 'Inter', var(--font-main, sans-serif);
	color: #1a1a1a;
	direction: ltr;
	text-align: start;
}

.omsar-laws-widget[dir="rtl"],
.omsar-laws-widget.omsar-bd-rtl {
	direction: rtl;
	text-align: right;
	font-family: 'Almarai', sans-serif;
}

.omsar-laws-grid {
	display: grid;
	grid-template-columns: repeat(var(--omsar-laws-columns, 3), minmax(0, 1fr));
	gap: var(--omsar-laws-gap, 20px);
	width: 100%;
}

.omsar-laws-widget.is-list .omsar-laws-grid {
	grid-template-columns: minmax(0, 1fr);
}

.omsar-laws-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 18px;
	min-width: 0;
	background: var(--omsar-laws-card-bg, #ffffff);
	border: 1px solid var(--omsar-laws-border, #e5e7eb);
	border-radius: var(--omsar-laws-radius, 12px);
	padding: 22px 24px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.omsar-laws-card:hover {
	border-color: rgba(48, 127, 226, 0.35);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.omsar-laws-widget.is-list .omsar-laws-card {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.omsar-laws-card-main {
	min-width: 0;
	flex: 1 1 auto;
}

.omsar-laws-type {
	display: inline-flex;
	align-items: center;
	margin-bottom: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	border: 1px solid var(--omsar-laws-badge, #307FE2);
	background: var(--omsar-laws-badge-bg, #ffffff);
	color: var(--omsar-laws-badge, #307FE2);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	box-sizing: border-box;
}

.omsar-laws-title {
	margin: 0;
	color: var(--omsar-laws-title, #1a1a1a);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.45;
	text-align: start;
}

.omsar-laws-title-link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.omsar-laws-title-link:hover,
.omsar-laws-title-link:focus {
	color: var(--omsar-laws-badge, #307FE2);
	text-decoration: underline;
}

.omsar-laws-subtitle {
	margin: 8px 0 0;
	color: var(--omsar-laws-subtitle, #6b7280);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
}

.omsar-laws-widget[dir="ltr"] .omsar-laws-subtitle,
.omsar-laws-widget:not([dir="rtl"]):not(.omsar-bd-rtl) .omsar-laws-subtitle {
	font-family: 'Almarai', sans-serif;
	text-align: right;
}

.omsar-laws-widget[dir="rtl"] .omsar-laws-subtitle,
.omsar-laws-widget.omsar-bd-rtl .omsar-laws-subtitle {
	font-family: 'Inter', sans-serif;
	text-align: left;
}

.omsar-laws-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 16px;
	border-radius: 8px;
	border: 0 solid transparent;
	background: var(--omsar-laws-btn-bg, #307FE2);
	color: var(--omsar-laws-btn-text, #ffffff);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.omsar-laws-widget.is-list .omsar-laws-download {
	margin-top: 0;
	flex-shrink: 0;
}

.omsar-laws-download:hover,
.omsar-laws-download:focus {
	background: var(--omsar-laws-btn-hover, #1f6bc7);
	color: var(--omsar-laws-btn-text, #ffffff);
	text-decoration: none;
}

.omsar-laws-download-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.omsar-laws-load-more-wrap {
	display: block;
	text-align: center;
	margin-top: 28px;
}

.omsar-laws-load-more {
	appearance: none;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border-radius: 8px;
	background: var(--omsar-laws-btn-bg, #307FE2);
	color: var(--omsar-laws-btn-text, #ffffff);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.omsar-laws-load-more:hover,
.omsar-laws-load-more:focus {
	background: var(--omsar-laws-btn-hover, #1f6bc7);
	color: var(--omsar-laws-btn-text, #ffffff);
}

.omsar-laws-load-more:disabled,
.omsar-laws-load-more.loading {
	opacity: 0.7;
	cursor: wait;
	pointer-events: none;
}

.omsar-laws-load-more.loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: omsar-laws-spin 0.6s linear infinite;
	flex-shrink: 0;
}

@keyframes omsar-laws-spin {
	to {
		transform: rotate(360deg);
	}
}

.omsar-laws-empty {
	margin: 0;
	color: #6b7280;
	font-size: 16px;
	line-height: 1.6;
}

@media (max-width: 1024px) {
	.omsar-laws-widget:not(.is-list) .omsar-laws-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.omsar-laws-widget:not(.is-list) .omsar-laws-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.omsar-laws-widget.is-list .omsar-laws-card {
		flex-direction: column;
		align-items: stretch;
	}

	.omsar-laws-widget.is-list .omsar-laws-download {
		align-self: flex-start;
	}
}
