/* ----------------------------------------------
   FAQ accordion (inc/td-faq/td-faq.php, js/td-faq.js)

   Page markup:  <div class="td-faq"> <h2>Title</h2> <h3>Q</h3> <p>A</p> ... </div>
   td-faq.js adds the buttons/classes below. Without JavaScript the
   plain headings and answers show as normal content.
------------------------------------------------- */

.td-faq {
	margin-top: 20px;
}

/* Buttons that replace heading text: look like the heading, not a button. */
.td-faq-toggle,
.td-faq-question-btn {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.td-faq-toggle:focus-visible,
.td-faq-question-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Title (the H2): no extra margin so the +/- sits level with it. */
.td-faq-title {
	margin: 0;
}

/* Shared "+/-" icon for the title and every question. */
.td-faq-icon {
	flex: 0 0 auto;
	font-size: 1.4em;
	font-weight: normal;
	line-height: 1;
}

.td-faq-list {
	margin-top: 6px;
}

.td-faq-item {
	border-bottom: 1px solid #ddd;
	padding: 16px 0;
}

/* Question (the H3): sized like body text, bold. */
.td-faq-question {
	margin: 0;
	font-size: 1.05em;
	font-weight: bold;
	line-height: 1.4;
}

.td-faq-answer {
	margin-top: 12px;
	line-height: 1.6;
}
.td-faq-answer > :last-child {
	margin-bottom: 0;
}

/* Closed parts (set by td-faq.js via the hidden attribute). */
.td-faq [hidden] {
	display: none !important;
}
