/* === YamanShop CusRev Extension — Badge Display === */

.ys-review-categories {
	margin: 12px 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.4;
}

.ys-review-goals,
.ys-review-ages {
	margin-bottom: 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

.ys-review-goals:last-child,
.ys-review-ages:last-child {
	margin-bottom: 0;
}

.ys-review-label {
	font-weight: 600;
	margin-right: 8px;
	color: #333;
	font-size: 13px;
}

.ys-goal-badge {
	display: inline-block;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	padding: 3px 10px;
	margin: 2px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}

.ys-age-badge {
	display: inline-block;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: #ffffff;
	padding: 3px 10px;
	margin: 2px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}

@media (max-width: 600px) {
	.ys-review-goals,
	.ys-review-ages {
		flex-direction: column;
		align-items: flex-start;
	}

	.ys-review-label {
		margin-bottom: 4px;
	}
}

/* === Form Selectors === */

.ys-review-categories-selector {
	margin: 15px 0;
	padding: 15px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.ys-review-goals-selector,
.ys-review-ages-selector {
	margin-bottom: 20px;
}

.ys-review-ages-selector:last-child {
	margin-bottom: 0;
}

.ys-category-label {
	display: block;
	font-weight: 600;
	font-size: 16px;
	color: #333;
	margin-bottom: 12px;
	cursor: default;
}

.ys-tags-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
}

.ys-tag-option {
	display: inline-flex;
	align-items: center;
	background: #ffffff;
	border: 2px solid #e1e5e9;
	border-radius: 20px;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
	user-select: none;
	position: relative;
	margin: 0;
}

.ys-tag-option:hover {
	border-color: #4A90E2;
	background: #f8fbff;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ys-tag-option input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
}

.ys-tag-label {
	color: #555;
	font-size: 14px;
	line-height: 1.2;
	margin: 0;
	padding: 0;
}

.ys-tag-option input[type="checkbox"]:checked + .ys-tag-label {
	color: #ffffff;
}

.ys-review-goals-selector .ys-tag-option:has(input[type="checkbox"]:checked) {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-color: #667eea;
	color: white;
}

.ys-review-ages-selector .ys-tag-option:has(input[type="checkbox"]:checked) {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	border-color: #f093fb;
	color: white;
}

.ys-tag-option input[type="checkbox"]:checked + .ys-tag-label {
	animation: ysTagSelected 0.3s ease;
}

@keyframes ysTagSelected {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

.ys-tag-option input[type="checkbox"]:focus + .ys-tag-label {
	outline: 2px solid #4A90E2;
	outline-offset: 2px;
}

/* === Filter Buttons === */

.ys-filter-section {
	margin: 10px 0;
}

.ys-filter-label {
	font-weight: 600;
	font-size: 13px;
	color: #333;
	margin-right: 8px;
}

.ys-filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

.ys-filter-goal,
.ys-filter-age {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid #ddd;
	background: #f5f5f5;
	color: #555;
}

.ys-filter-goal:hover,
.ys-filter-age:hover {
	border-color: #999;
	background: #eee;
}

.ys-filter-goal.ys-filter-selected {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-color: #667eea;
	color: #fff;
}

.ys-filter-age.ys-filter-selected {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	border-color: #f093fb;
	color: #fff;
}

/* === Responsive === */

@media (max-width: 768px) {
	.ys-tags-inline {
		gap: 6px;
	}

	.ys-tag-option {
		padding: 6px 10px;
		font-size: 13px;
	}

	.ys-category-label {
		font-size: 15px;
		margin-bottom: 10px;
	}

	.ys-review-categories-selector {
		padding: 12px;
	}
}

@media (max-width: 480px) {
	.ys-tags-inline {
		gap: 4px;
	}

	.ys-tag-option {
		padding: 5px 8px;
		font-size: 12px;
	}

	.ys-category-label {
		font-size: 14px;
	}
}

/* === WooCommerce/CusRev Form Context === */

.comment-form .ys-review-categories-selector {
	margin: 20px 0;
}

.cr-review-form-wrap .ys-review-categories-selector {
	max-width: 500px;
	margin: 0 auto 24px auto;
	padding: 20px 24px 24px 24px;
	position: relative;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #ddd;
	border-radius: 8px;
}

/* === CusRev Submit Button Override === */

.cr-all-reviews-shortcode .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-ajax-reviews-review-form .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-reviews-grid .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-qna-block .cr-review-form-buttons .cr-review-form-submit {
	background-color: #000000;
}

.cr-all-reviews-shortcode .cr-review-form-buttons .cr-review-form-submit:hover,
.cr-ajax-reviews-review-form .cr-review-form-buttons .cr-review-form-submit:hover,
.cr-reviews-grid .cr-review-form-buttons .cr-review-form-submit:hover,
.cr-qna-block .cr-review-form-buttons .cr-review-form-submit:hover {
	background-color: #333333;
}
