/*
 * GutenBlocks  SSS (FAQ) bloğu
 *
 * Tren saatleri ile aynÄ± dilden: yumuşak kenarlar, ince çizgiler,
 * temaya uyum saÄŸlayan ses-tonlu (muted) ikinci yazÄ±.
 */

.gb-faq {
	--gb-faq-border: rgba(0, 0, 0, 0.12);
	--gb-faq-bg: transparent;
	--gb-faq-fg: inherit;
	--gb-faq-muted: rgba(0, 0, 0, 0.65);
	--gb-faq-accent: var(--wp--preset--color--primary, #2563eb);
	--gb-faq-radius: 12px;

	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--gb-faq-fg);
}

html[data-theme="dark"] .gb-faq,
.is-dark .gb-faq {
	--gb-faq-border: rgba(255, 255, 255, 0.14);
	--gb-faq-muted: rgba(255, 255, 255, 0.7);
}

.gb-faq__item {
	border: 1px solid var(--gb-faq-border);
	border-radius: var(--gb-faq-radius);
	background: var(--gb-faq-bg);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gb-faq__item[open],
.gb-faq__item.is-open {
	border-color: var(--gb-faq-accent);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gb-faq__q {
	list-style: none;
	cursor: pointer;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-weight: 600;
	font-size: clamp(15px, 1.6vw, 17px);
	line-height: 1.4;
	user-select: none;
	color: inherit;
}

.gb-faq__q::-webkit-details-marker {
	display: none;
}

.gb-faq__q-text {
	flex: 1 1 auto;
	min-width: 0;
}

.gb-faq__q-icon {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.2s ease;
	opacity: 0.55;
}

.gb-faq__item[open] .gb-faq__q-icon {
	transform: rotate(-135deg) translate(-2px, -2px);
	opacity: 1;
}

.gb-faq__a {
	padding: 0 20px 18px;
	color: var(--gb-faq-muted);
	line-height: 1.65;
	font-size: 15px;
}

.gb-faq__a > *:first-child {
	margin-top: 0;
}

.gb-faq__a > *:last-child {
	margin-bottom: 0;
}

.gb-faq__a a {
	color: var(--gb-faq-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gb-faq__a ul,
.gb-faq__a ol {
	padding-left: 1.25em;
	margin: 0.5em 0;
}

.gb-faq__a code {
	background: rgba(0, 0, 0, 0.06);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

html[data-theme="dark"] .gb-faq__a code,
.is-dark .gb-faq__a code {
	background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
 * Editor
 * ========================================================== */

.gb-faq--editor {
	padding: 2px;
}

.gb-faq--editor .gb-faq__item {
	cursor: default;
}

.gb-faq--editor .gb-faq__q-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px 10px 8px;
}

.gb-faq--editor .gb-faq__toggle {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border: 1px solid var(--gb-faq-border);
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	position: relative;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.gb-faq--editor .gb-faq__toggle::before {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.15s ease;
	opacity: 0.6;
}

.gb-faq--editor .gb-faq__toggle.is-open::before {
	transform: rotate(-135deg) translate(-2px, -2px);
	opacity: 1;
}

.gb-faq--editor .gb-faq__toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}

.gb-faq--editor .gb-faq__q-input {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	font-size: 16px;
	padding: 6px 8px;
	border-radius: 6px;
	outline: none;
}

.gb-faq--editor .gb-faq__q-input:focus {
	background: rgba(0, 0, 0, 0.04);
}

.gb-faq--editor .gb-faq__actions {
	display: flex;
	gap: 2px;
	flex-shrink: 0;
}

.gb-faq--editor .gb-faq__a-input {
	padding: 4px 16px 14px 44px;
	color: var(--gb-faq-muted);
	outline: none;
	border-top: 1px dashed var(--gb-faq-border);
	margin: 0 4px;
	line-height: 1.6;
}

.gb-faq--editor .gb-faq__a-input:focus {
	background: rgba(0, 0, 0, 0.02);
}

.gb-faq--editor .gb-faq__add {
	align-self: flex-start;
	margin-top: 4px;
}