@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Main Wrapper */
.mats-wrapper {
	font-family: 'Inter', sans-serif;
	max-width: 720px;
	margin: 40px auto;
	padding: 20px;
	box-sizing: border-box;
	background: radial-gradient(circle at 10% 20%, rgb(242, 246, 253) 0%, rgb(224, 234, 252) 90.1%);
	border-radius: 24px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

/* Form Title */
.mats-title {
	text-align: center;
	color: #0f172a;
	font-size: 32px;
	font-weight: 700;
	margin-top: 10px;
	margin-bottom: 25px;
	letter-spacing: -0.5px;
}

/* Premium Card Design */
.mats-card {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 20px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Generic Row Layout */
.mats-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	flex-wrap: wrap;
}

/* Label Styling */
.mats-label {
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mats-label-small {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 6px;
	display: block;
}

.label-muted {
	color: #94a3b8;
	font-weight: 400;
	font-size: 12px;
}

/* Gender Row Specifics */
.mats-gender-row {
	background: #f1f5f9;
	padding: 12px 20px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
}

.mats-gender-selection {
	display: flex;
	align-items: center;
	gap: 15px;
}

/* Toggle Group for Gender */
.mats-toggle-group {
	display: inline-flex;
	background: #cbd5e1;
	padding: 3px;
	border-radius: 30px;
	position: relative;
}

.mats-toggle-btn {
	background: transparent;
	border: none;
	padding: 6px 18px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	border-radius: 25px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	z-index: 2;
}

.mats-toggle-btn .toggle-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #94a3b8;
	transition: all 0.3s ease;
	display: inline-block;
}

.mats-toggle-btn.active {
	color: #ffffff;
	background: #1e53a4;
	box-shadow: 0 2px 8px rgba(30, 83, 164, 0.3);
}

.mats-toggle-btn.active .toggle-indicator {
	background: #10b981; /* Green dot when active */
}

/* Profile Count Badges */
.mats-count-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #1e53a4;
	color: #ffffff;
	padding: 8px 16px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 4px 10px rgba(30, 83, 164, 0.15);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mats-count-badge.primary-badge {
	background: #1e53a4;
}

.mats-count-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Fields & Dropdowns Layout */
.mats-field-container {
	flex: 1;
	min-width: 200px;
}

.mats-select-wrapper {
	position: relative;
	display: block;
	width: 100%;
}

.mats-select {
	width: 100%;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
	transition: all 0.2s ease;
}

.mats-select:focus {
	border-color: #1e53a4;
	outline: none;
	box-shadow: 0 0 0 3px rgba(30, 83, 164, 0.15);
}

/* Dropdown Right Arrow */
.mats-select-wrapper::after {
	content: "\f347"; /* arrow-down-alt2 */
	font-family: dashicons;
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	line-height: 1;
	height: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	pointer-events: none;
}

/* Marital Status Specifics */
.mats-marital-row {
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
}

.mats-marital-selection {
	width: 100%;
}

.mats-marital-selection .mats-label {
	margin-bottom: 12px;
	display: block;
}

.label-icon-marital::before {
	content: "\f110"; /* dashicons-businessman */
	font-family: dashicons;
	margin-right: 6px;
	color: #64748b;
}

.mats-marital-toggles {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	width: 100%;
}

.mats-marital-btn {
	flex: 1;
	min-width: 120px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 30px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	color: #475569;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.marital-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #94a3b8;
	transition: all 0.3s ease;
}

.mats-btn-count {
	background: #f1f5f9;
	color: #64748b;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.mats-marital-btn.active {
	background: #1e53a4;
	color: #ffffff;
	border-color: #1e53a4;
	box-shadow: 0 4px 12px rgba(30, 83, 164, 0.2);
}

.mats-marital-btn.active .marital-indicator {
	background: #34d399; /* Green dot when active */
}

.mats-marital-btn.active .mats-btn-count {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

/* Age Row Specifics */
.mats-age-row {
	flex-direction: column;
	align-items: stretch;
	gap: 15px;
	width: 100%;
	border-top: 1px dashed #e2e8f0;
	border-bottom: 1px dashed #e2e8f0;
	padding: 20px 0;
	margin: 10px 0;
}

.mats-age-label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.label-icon-age::before {
	content: "\f507"; /* dashicons-admin-users */
	font-family: dashicons;
	margin-right: 6px;
	color: #64748b;
}

.mats-age-display {
	font-size: 14px;
	font-weight: 600;
	color: #1e53a4;
	background: #eff6ff;
	padding: 4px 12px;
	border-radius: 6px;
}

/* Range Slider Styles */
.mats-range-slider-wrapper {
	position: relative;
	width: 100%;
	padding: 10px 0;
}

.mats-slider-track-container {
	position: relative;
	width: 100%;
	height: 6px;
}

.mats-slider-track {
	position: absolute;
	height: 100%;
	border-radius: 3px;
	background: #e2e8f0;
	left: 0;
	right: 0;
	z-index: 1;
}

.mats-range-input {
	position: absolute;
	width: 100%;
	height: 6px;
	top: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	z-index: 2;
}

/* Range Input Thumb styling */
.mats-range-input::-webkit-slider-thumb {
	height: 20px;
	width: 20px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid #1e53a4;
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: transform 0.1s ease;
}

.mats-range-input::-webkit-slider-thumb:active {
	transform: scale(1.2);
}

.mats-range-input::-moz-range-thumb {
	height: 14px;
	width: 14px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid #1e53a4;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mats-range-labels {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #64748b;
	margin-top: 10px;
	font-weight: 500;
}

.mats-age-btn-container {
	width: 100%;
	margin-top: 15px;
}

/* Religion & Mother Tongue Selector Row */
.mats-religion-tongue-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.mats-religion-field,
.mats-tongue-field {
	display: flex;
	flex-direction: column;
}

/* Submit Section */
.mats-submit-row {
	margin-top: 10px;
}

.mats-result-box {
	width: 100%;
	background: linear-gradient(270deg, #2563eb, #8b5cf6, #ec4899, #2563eb);
	background-size: 600% 600%;
	animation: mats-gradient-shimmer 8s ease infinite;
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 18px 24px;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 1.2px;
	text-align: center;
	box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
	box-sizing: border-box;
	text-transform: uppercase;
	display: block;
	transition: all 0.3s ease;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mats-result-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(139, 92, 246, 0.45);
	cursor: pointer;
}

@keyframes mats-gradient-shimmer {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Animation Utilities */
.mats-animate-value {
	animation: mats-pulse 0.4s ease-out;
}

@keyframes mats-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.06); filter: brightness(1.15); }
	100% { transform: scale(1); }
}

/* Responsive Breakpoints */
@media (max-width: 640px) {
	.mats-wrapper {
		margin: 10px auto;
		border-radius: 16px;
		padding: 10px;
	}
	.mats-card {
		padding: 20px 15px;
		gap: 15px;
	}
	.mats-row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	
	/* Location Dropdowns take full width, badge sits underneath */
	.mats-field-container {
		width: 100%;
	}
	.mats-select {
		padding: 12px 16px;
		font-size: 14px;
	}
	
	.mats-count-badge {
		font-size: 12px;
		padding: 8px 14px;
		border-radius: 20px;
		align-self: flex-end; /* Align badge to the right below the dropdown */
		width: auto;
		box-shadow: 0 2px 6px rgba(30, 83, 164, 0.1);
	}
	
	/* Gender Row layout: label + toggle on top, badge below */
	.mats-gender-row {
		padding: 12px;
		gap: 12px;
	}
	.mats-gender-selection {
		width: 100%;
		justify-content: space-between;
		display: flex;
		align-items: center;
	}
	.mats-toggle-btn {
		padding: 6px 16px;
		font-size: 13px;
	}

	/* Marital Status: side-by-side buttons */
	.mats-marital-row {
		flex-direction: column;
		align-items: stretch;
	}
	.mats-marital-selection .mats-label {
		margin-bottom: 10px;
	}
	.mats-marital-toggles {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		width: 100%;
	}
	.mats-marital-btn {
		width: 100%;
		padding: 8px 12px;
		font-size: 13px;
		justify-content: space-between;
	}
	.mats-marital-btn:last-child {
		grid-column: span 2;
	}
	.mats-btn-count {
		padding: 2px 5px;
		font-size: 10px;
	}

	/* Age Range row adjustments */
	.mats-age-row {
		padding: 15px 0;
		margin: 5px 0;
		border-top: 1px dashed #cbd5e1;
		border-bottom: 1px dashed #cbd5e1;
	}
	.mats-age-display {
		font-size: 13px;
		padding: 3px 10px;
	}
	.mats-age-btn-container {
		margin-top: 10px;
	}

	/* Religion & Mother Tongue stack vertically */
	.mats-religion-tongue-row {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.mats-result-box {
		font-size: 14px;
		padding: 15px 20px;
		border-radius: 12px;
	}
}
