/* Scope checker (EN / TC / SC) */

.disclaimer-section {
	width: 100%;
	box-sizing: border-box;
	background: #F6FAF3;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	scroll-margin-top: calc(1rem * (var(--height--outer--site-header) + var(--spacing--inline--site)) / 16 + 15px);
}

.disclaimer-title {
	display: inline-block;
	margin: 0 0 0.75rem 0;
	padding-bottom: 2px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: #000;
	border-bottom: 1px solid currentColor;
}

.disclaimer-section p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: #000;
}

/* Section-level styles */
	.content-section {
		margin-bottom: 2rem;
		background: #6B8E23;
		border-radius: 12px;
		box-shadow: 0 4px 8px rgba(0,0,0,0.15);
		border: 1px solid rgba(255,255,255,0.2);
	}
	.content-section-header {
		margin: 0;
	}
	.content-section-title {
		margin: 0;
	}
	.section-toggle {
		width: 100%;
		text-align: left;
		padding: 1.5rem 2rem;
		background: none;
		border: none;
		border-radius: 12px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		cursor: pointer;
		color: white;
		font-size: 20px;
		font-weight: 600;
		transition: all 0.3s ease;
	}
	.section-toggle:hover {
		background: rgba(255,255,255,0.15);
		transform: translateY(-1px);
	}
	.section-content {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.5s ease-out;
		background: white;
		border-bottom-left-radius: 12px;
		border-bottom-right-radius: 12px;
		margin-top: 0;
	}
	.section-expanded .section-content {
		max-height: 5000px;
	}
	
	/* Question-level styles */
	.faq-item {
		margin-bottom: 1rem;
	}
	.faq-toggle {
		width: 100%;
		text-align: left;
		padding: 1rem;
		background: none;
		border: none;
		border-radius: 4px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		cursor: pointer;
	}
	.faq-toggle:hover {
		background: #f8f9fa;
	}
	.faq-content {
		padding: 0 1rem;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease-out;
	}
	.faq-expanded .faq-content {
		max-height: 1000px;
	}
	.faq-answer {
		padding: 1rem 0;
	}
	.faq-answer-scrollable {
		max-height: 1800px;
		overflow-y: auto;
	}
	.has-red-color {
		color: #dc3545;
	}
	.has-green-color {
		color: #28a745;
	}
	/* Question label: same look as h3 but semantically appropriate (not a heading) */
	.question-label {
		display: block;
		font-size: calc(1.3rem + .3vw);
		font-weight: 500;
		line-height: 1.2;
		margin-top: 0;
		margin-bottom: 0.5rem;
	}
	
	/* Mobile responsive spacing to prevent sections from sticking together */
	@media (max-width: 767.98px) {
		.content-section {
			margin-bottom: 2.5rem;
		}
	}
	@media (max-width: 575.98px) {
		.content-section {
			margin-bottom: 3rem;
		}
	}
	.faq-icon {
		transition: transform 0.3s ease-out;
		flex-shrink: 0;
		margin-left: 1rem;
	}

			.hidden {
		display: none;
	}

		/* Question container styling */
	.question-container {
		padding: 1.5rem;
		background: #f8f9fa;
		border-radius: 8px;
		border: 1px solid #dee2e6;
		transition: all 0.3s ease;
		scroll-margin-top: calc(1rem * (var(--height--outer--site-header) + var(--spacing--inline--site)) / 16 + 15px);
	}

	/* These blocks are only focused programmatically (tabindex=-1) after
	   pointer/touch. iOS Safari treats that as :focus-visible and draws a
	   blue UA ring; hide it. Keyboard users tab to radios, not these cards. */
	.question-container:focus,
	.question-container:focus-visible,
	.disclaimer-section:focus,
	.disclaimer-section:focus-visible,
	#message:focus,
	#message:focus-visible {
		outline: none;
	}

	#message {
		scroll-margin-top: calc(1rem * (var(--height--outer--site-header) + var(--spacing--inline--site)) / 16 + 15px);
	}

/* Card option styling for Question 1 */
.option-card {
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
	border: 2px solid #dee2e6;
	background-color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	text-align: center;
	box-sizing: border-box;
}

.option-card img {
	display: block;
	margin: auto;
	max-width: 100%;
	height: auto;
	width: auto;
}

.option-card .fw-bold {
	margin-top: auto;
	text-align: center;
	width: 100%;
}

.option-card:hover {
	/*transform: translateY(-5px);*/
	/*box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);*/
	border-color: #4F832F;
	background-color: #E4F4D9;
	box-shadow: 0 0 0 2px #4F832F, 0 0 0 4px rgba(79, 131, 47, 0.2);
}

input[type="radio"]:checked + .option-card {
	border-color: #4F832F;
	background-color: #E4F4D9;
	box-shadow: 0 0 0 2px #4F832F, 0 0 12px rgba(79, 131, 47, 0.4);
}

/* Radio button styling for Questions 2-12 */
.form-check {
	padding: 0.5rem;
	border: 2px solid transparent;
	border-radius: 4px;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
	margin: 0.25rem 0;
	box-sizing: border-box;
}

.form-check-input {
	cursor: pointer;
	width: 1.25rem;
	height: 1.25rem;
	transition: all 0.2s ease;
}

.form-check-label {
	cursor: pointer;
	padding-left: 0.5rem;
	transition: color 0.2s ease;
}

.form-check:hover .form-check-label {
	color: #4F832F;
	font-weight: 600;
}

.form-check:hover {
	background-color: #E4F4D9;
	border-color: #4F832F;
	box-shadow: 0 0 0 2px #4F832F;
}

.form-check-input:hover {
	border-color: #4F832F;
	border-width: 2px;
}

.form-check-input:checked {
	background-color: #4F832F;
	border-color: #4F832F;
	box-shadow: 0 0 0 0.25rem rgba(79, 131, 47, 0.4);
}

.form-check-input:focus {
	border-color: #4F832F;
	border-width: 2px;
	outline: none;
	box-shadow: 0 0 0 0.25rem rgba(79, 131, 47, 0.5);
}

.form-check-input:focus + .form-check-label {
	color: #4F832F;
	font-weight: 600;
}

/* Enhanced focus indicator for yes/no options - creates clear rectangular block */
.form-check-input:focus-visible {
	border-color: #4F832F;
	border-width: 2px;
}

.form-check:has(.form-check-input:focus-visible) {
	background-color: #E4F4D9;
	border-color: #4F832F;
	box-shadow: 0 0 0 2px #4F832F, 0 0 0 4px rgba(79, 131, 47, 0.3);
	outline: 2px solid #4F832F;
	outline-offset: 2px;
}

/* Message styling */
.alert {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-weight: 500;
	white-space: pre-line;
}

.alert-info {
	background-color: #d1ecf1;
	border-color: #bee5eb;
	color: #0c5460;
}

.alert-danger {
	background-color: #f8d7da;
	border-color: #f5c6cb;
	color: #721c24;
}

.alert-success {
	background-color: #E4F4D9;
	border-color: #c3e6cb;
	color: #155724;
}

/* Reset button styling */
#resetBtn {
	padding: 0.5rem 2rem;
	font-weight: 500;
	transition: all 0.3s ease;
	border: 3px solid #4F832F;
	background-color: #FFF;
	color: #000000;
}

#resetBtn:hover {
	border-color: #9A2F2F;
	background-color: #9A2F2F;
	color: #FFFFFF;
	box-shadow: 0 0 0 2px #9A2F2F, 0 4px 8px rgba(154, 47, 47, 0.2);
}

#resetBtn:focus-visible {
	border-color: #9A2F2F;
	background-color: #9A2F2F;
	color: #FFFFFF;
	outline: 3px solid #9A2F2F;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #9A2F2F, 0 0 0 4px rgba(154, 47, 47, 0.3);
}

/* Hide the radio visually but keep it accessible for keyboard navigation */
input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Card base */
label.card {
  cursor:pointer;
  transition: background-color .2s, border-color .2s, box-shadow .2s, outline .2s;
  position: relative;
  border: 2px solid #dee2e6;
  box-sizing: border-box;
}

/* Hover effect */
label.card:hover {
  /*transform: translateY(-3px); */
  background-color:#E4F4D9;
  border-color: #4F832F;
  box-shadow: 0 0 0 2px #4F832F, 0 4px 8px rgba(79, 131, 47, 0.2);
}

/* Selected (checked) state – the radio is a sibling of the label */
input[type="radio"]:checked + label.card {
  border-color: #4F832F;                /* site green */
  background-color:#E4F4D9;                /* light green */
  box-shadow: 0 0 0 2px #4F832F, 0 0 8px rgba(79, 131, 47, 0.4); /* subtle glow */
}

/* Focus styles for keyboard accessibility - creates clear rectangular block */
input[type="radio"]:focus + label.card {
  border-color: #4F832F;
  background-color: #E4F4D9;
  outline: 3px solid #4F832F;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #4F832F, 0 0 0 4px rgba(79, 131, 47, 0.3);
}

/* Focus-within for additional accessibility */
label.card:focus-within {
  border-color: #4F832F;
  background-color: #E4F4D9;
  outline: 3px solid #4F832F;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #4F832F, 0 0 0 4px rgba(79, 131, 47, 0.3);
}

/* WGCA Hyperlink background handle */
.highlighted-link:hover,
.highlighted-link:focus-visible {
color: #000 !important;
background-color: #FF804D;
}

/* ENG only: wrap at spaces, not mid-word. Do not apply to TC/SC. */
html[lang="en"] .page-header,
html[lang="en"] .page-header *,
html[lang="en"] .page-content,
html[lang="en"] .page-content * {
	-webkit-hyphens: none;
	hyphens: none;
	word-break: normal;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.content-section-form {
	margin-bottom: 2rem;
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

html[lang="zh-hk"] ul {
	list-style-type: '- ';
}

#surveyForm .option-card .fw-bold {
	min-width: 0;
}

#surveyForm [role="group"]:not(.row) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1rem;
}

.page-content .container {
	max-width: 100%;
	box-sizing: border-box;
}
