/**
 * Beaba Word Cloud – Frontend styles.
 *
 * Theme colors: $green-dark #28412d, $grey #707070, $green-background-light #CDDACD.
 *
 * @package Beaba_Word_Cloud
 */

/* -----------------------------------------------
   Screen-reader only utility
   ----------------------------------------------- */
.sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* -----------------------------------------------
   Section wrapper
   ----------------------------------------------- */
.beaba-wc {
	max-width: 800px;
	margin: 30px auto;
	padding: 0 15px;
}

/* -----------------------------------------------
   Cloud
   ----------------------------------------------- */
.beaba-wc-cloud {
	background: #fff;
	border-radius: 30px;
	padding: 25px;
	margin-bottom: 20px;
}

.beaba-wc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px 16px;
	min-height: 60px;
}

.beaba-wc-list li {
	display: inline;
	color: #28412d;
	font-family: 'Roboto', sans-serif;
	line-height: 1.3;
	cursor: default;
}

.beaba-wc-list li:focus {
	outline: 2px solid #28412d;
	outline-offset: 2px;
	border-radius: 3px;
}

/* -----------------------------------------------
   Checkbox selection form
   ----------------------------------------------- */
.beaba-wc-form {
	margin-bottom: 10px;
}

/* -----------------------------------------------
   Categories grid – 6 cols desktop, 2 cols mobile
   ----------------------------------------------- */
.beaba-wc-categories-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

/* -----------------------------------------------
   Category card
   ----------------------------------------------- */
.beaba-wc-category-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 8px;
}

/* Header: green background, white text, rounded top */
.beaba-wc-category-header {
	background: #9abaa0;
	color: #28412d;
	font-family: 'Roboto', sans-serif;
	font-weight: 600;
	font-size: 14px;
	padding: 10px 12px;
	text-align: center;
	border-radius: 8px 8px 0 0;
}

/* Body: contains the checkbox rows */
.beaba-wc-category-body {
	display: flex;
	flex-direction: column;
	border-radius: 0 0 8px 8px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-top: none;
}

/* Checkbox label rows with alternating backgrounds */
.beaba-wc-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	color: #28412d;
	cursor: pointer;
	margin: 0;
}

.beaba-wc-checkbox-label:nth-child(odd) {
	background: #f8fafc;
}

.beaba-wc-checkbox-label:nth-child(even) {
	background: #ffffff;
}

/* Checkbox input */
.beaba-wc-checkbox {
	accent-color: #28412d;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	cursor: pointer;
}

.beaba-wc-checkbox:focus-visible {
	outline: 2px solid #28412d;
	outline-offset: 2px;
}

/* -----------------------------------------------
   Submit button
   ----------------------------------------------- */
.beaba-wc-submit {
	display: block;
	margin: 20px auto 0;
	background: #28412d;
	border: 1px solid #fff;
	border-radius: 33px;
	padding: 8px 24px;
	font-size: 16px;
	font-weight: 500;
	font-family: 'Roboto', sans-serif;
	color: #fff;
	cursor: pointer;
	text-decoration: none;
}

.beaba-wc-submit:hover {
	opacity: 0.9;
}

.beaba-wc-submit:focus {
	outline: 2px solid #28412d;
	outline-offset: 2px;
}

.beaba-wc-submit:disabled {
	background: #707070;
	cursor: default;
	opacity: 0.5;
}

/* -----------------------------------------------
   Feedback & login notice
   ----------------------------------------------- */
.beaba-wc-feedback {
	text-align: center;
	padding: 5px 0;
	font-family: 'Roboto', sans-serif;
	color: #28412d;
	min-height: 1.5em;
}

.beaba-wc-login-notice {
	text-align: center;
	font-family: 'Roboto', sans-serif;
	color: #707070;
	font-style: italic;
}

/* -----------------------------------------------
   Responsive: mobile – 2 columns, no horizontal gap
   ----------------------------------------------- */
@media (max-width: 768px) {
	.beaba-wc-categories-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px 0;
	}

	.beaba-wc-category-card:nth-child(odd) {
		border-radius: 8px 0 0 8px;
	}

	.beaba-wc-category-card:nth-child(odd) .beaba-wc-category-header {
		border-radius: 8px 0 0 0;
	}

	.beaba-wc-category-card:nth-child(odd) .beaba-wc-category-body {
		border-radius: 0 0 0 8px;
	}

	.beaba-wc-category-card:nth-child(even) {
		border-radius: 0 8px 8px 0;
	}

	.beaba-wc-category-card:nth-child(even) .beaba-wc-category-header {
		border-radius: 0 8px 0 0;
	}

	.beaba-wc-category-card:nth-child(even) .beaba-wc-category-body {
		border-radius: 0 0 8px 0;
		border-left: none;
	}

	.beaba-wc-category-header {
		font-size: 13px;
		padding: 8px 10px;
	}

	.beaba-wc-checkbox-label {
		font-size: 13px;
		padding: 6px 10px;
	}
}
