/* Symptom Checker
 * Colors and font are driven by CSS custom properties set inline by the
 * shortcode (from the Appearance settings); the values below are fallbacks.
 */

.symptom-checker {
	--sc-primary: #0a4e68;
	--sc-button-text: #ffffff;
	--sc-card-bg: #0a4e68;
	--sc-card-text: #ffffff;
}

.symptom-checker {
	font-family: var(--sc-font, inherit);
}

#symptom-checker-wrapper {
	margin-bottom: 45px;
}

ul.sc-results-tips {
	padding-left: 20px;
}

ul.sc-results-tips li:not(:last-of-type) {
	margin-bottom: 10px;
}

.symptom-checker select {
	background: #fff
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath fill='none' stroke='%230a4e68' stroke-width='2' d='M1 1l9 9 9-9'/%3E%3C/svg%3E")
		no-repeat right 12px center / 18px 11px !important;
	padding: 0 32px 0 10px;
	width: 100%;
	height: 46px;
	border: 2px solid var(--sc-primary);
	border-radius: 5px;
	font-style: italic;
	font-weight: 300;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* Row 1: full-width intro */
#symptom-checker-instructions {
	width: 100%;
	margin-bottom: 30px;
}

/* Row 2: form (left) + results (right) */
@media only screen and (min-width: 1180px) {
	#symptom-checker-wrapper {
		display: flex;
		flex-direction: row;
		gap: 30px;
		box-sizing: border-box;
	}

	#symptom-checker-form {
		width: calc(50% - (30px * 1 / 2));
	}

	#symptom-checker-output {
		width: calc(50% - (30px * 1 / 2));
	}
}

@media only screen and (max-width: 1179px) {
	#symptom-checker-wrapper {
		display: flex;
		flex-direction: column;
		gap: 30px;
		box-sizing: border-box;
	}

	#symptom-checker-form,
	#symptom-checker-output {
		width: 100%;
	}
}

#symptom-checker-form {
	padding: 15px;
}

.symptom-checker-form-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.symptom-checker-form-inner h4 {
	margin: 0;
}

.symptom-checker-form-inner label {
	font-size: 18px;
	line-height: 1.2;
	font-weight: 600;
}

#symptom-checker-form {
	background-color: #eef3f7;
	border-radius: 10px;
}

.symptom-checker-age,
.symptom-checker-symptoms,
.symptom-checker-gender {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.symptom-checker-actions {
	display: flex;
	flex-direction: row;
	gap: 30px;
	align-items: center;
	justify-content: space-between;
}

/* Sex + Match toggles (shared styling) */
.gender-button-wrapper,
.sc-match-wrapper {
	display: inline-flex;
	border: 2px solid var(--sc-primary);
	border-radius: 4px;
	overflow: hidden;
}

.gender-btn,
.sc-match-btn {
	cursor: pointer;
	flex: 1;
	text-align: center;
	padding: 10px 20px;
	transition: background-color 0.2s, color 0.2s;
	background-color: #fff;
	color: #333;
}

.gender-btn:not(:last-child),
.sc-match-btn:not(:last-child) {
	border-right: 1px solid #ccc;
}

.gender-btn.active,
.sc-match-btn.active {
	background-color: var(--sc-primary);
	color: var(--sc-button-text);
}

.gender-btn span,
.sc-match-btn span {
	pointer-events: none;
}

.symptom-checker-match {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.sc-match-help {
	margin: 4px 0 0;
	font-size: 13px;
	opacity: 0.75;
}

/* Symptom multiselect */
.custom-multiselect {
	position: relative;
	border: 2px solid var(--sc-primary);
	border-radius: 5px;
	padding: 8px;
	background: #fff;
}

.custom-multiselect .selected-items {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.custom-multiselect .selected-items:not(:empty) {
	margin-bottom: 8px;
}

.custom-multiselect .tag {
	display: inline-flex;
	align-items: center;
	background: var(--sc-primary);
	color: var(--sc-button-text);
	border-radius: 3px;
	padding: 4px 8px;
	font-size: 14px;
}

.custom-multiselect .remove-tag {
	cursor: pointer;
	margin-left: 4px;
	font-weight: bold;
}

.custom-multiselect .search-input {
	width: 100%;
	border: none;
	outline: none;
	padding: 6px 2px;
	font-size: 15px;
	background: transparent;
}

.custom-multiselect .suggestions {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 20;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	max-height: 240px;
	overflow-y: auto;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.custom-multiselect .suggestions:empty {
	display: none;
}

.custom-multiselect .suggestions li {
	padding: 10px 12px;
	cursor: pointer;
}

.custom-multiselect .suggestions li:hover,
.custom-multiselect .suggestions li.active {
	background: #eef3f7;
}

/* Actions */
#symptom-check-get-results.btn {
	background: var(--sc-primary);
	color: var(--sc-button-text);
	border: none;
	border-radius: 5px;
	padding: 12px 28px;
	font-size: 15px;
	cursor: pointer;
}

#symptom-check-get-results.btn:hover {
	filter: brightness(0.92);
}

#symptom-check-get-results.btn:disabled {
	opacity: 0.6;
	cursor: default;
}

#symptom-check-clear {
	cursor: pointer;
	text-decoration: underline;
}

/* Results */
#symptom-checker-results:not(:empty) {
	margin-bottom: 24px;
}

.sc-results-heading {
	margin: 0 0 12px;
}

.sc-message {
	margin: 0;
	padding: 14px 0;
}

.symptom-checker-alllink {
	margin: 0;
	font-size: 14px;
}

/* Result buttons */
.sc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.sc-button {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	padding: 14px 22px;
	border-radius: 8px;
	background-color: var(--sc-card-bg);
	color: var(--sc-card-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	transition: filter 0.15s ease, transform 0.15s ease;
}

.sc-button:hover,
.sc-button:focus {
	color: var(--sc-card-text);
	filter: brightness(0.92);
	transform: translateY(-1px);
	text-decoration: none !important;
}

@media (max-width: 640px) {
	.sc-buttons {
		flex-direction: column;
	}

	.sc-button {
		width: 100%;
	}
}

.symptom-checker-notice {
	font-size: 14px;
}
