/* FAQ accordion. Quiet boxes, one open at a time, in the same shapes as the rest of the store. */

.mst-faq {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* The heading that starts a section ("Orders", "الشحن والتوصيل"). */
.mst-faq-group {
	margin: 22px 0 4px;
	/* The theme's secondary font, bold: Elementor publishes its global fonts as these variables. */
	font-family: var(--e-global-typography-secondary-font-family, inherit);
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: .01em;
	color: inherit;
}

.mst-faq-group:first-child {
	margin-top: 0;
}

.mst-faq-item {
	border: 1px solid #ececec;
	border-radius: 10px;
	background: #fff;
	color: inherit;
	overflow: hidden;
	/* Just enough to lift the box off the page; it deepens a little on hover and when open. */
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 16px rgba(0, 0, 0, .05);
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.mst-faq-item:hover {
	box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 10px 24px rgba(0, 0, 0, .07);
}

.mst-faq-item.is-open {
	border-color: #e4e4e4;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .06), 0 14px 30px rgba(0, 0, 0, .08);
}

/* The question is a real button: reachable with the keyboard and announced as expandable. */
/* Themes style every button on the site, so these say plainly that this one is a plain row of text.
   The !important is deliberate: without it the theme's button colour wins. */
.mst-faq .mst-faq-q,
.mst-faq .mst-faq-q:hover,
.mst-faq .mst-faq-q:focus,
.mst-faq .mst-faq-q:active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 18px 20px;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	color: inherit !important;
	box-shadow: none !important;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.5;
	text-align: start;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transform: none;
}

.mst-faq .mst-faq-q:hover .mst-faq-q-text {
	opacity: .78;
}

.mst-faq-q-text {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: break-word;
}

.mst-faq-q:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
	border-radius: inherit;
}

/* The icon is drawn in CSS, so there is no icon font to load. */
.mst-faq-icon {
	position: relative;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: #7a0c2e;
}

.mst-faq--icon-plus .mst-faq-icon::before,
.mst-faq--icon-plus .mst-faq-icon::after {
	content: "";
	position: absolute;
	inset: 50% 0 auto 0;
	height: 2px;
	background: currentColor;
	transform: translateY(-50%);
	transition: transform .25s ease, opacity .25s ease;
}

.mst-faq--icon-plus .mst-faq-icon::after {
	transform: translateY(-50%) rotate(90deg);
}

.mst-faq--icon-plus .is-open .mst-faq-icon::after {
	transform: translateY(-50%) rotate(0deg);
	opacity: 0;
}

.mst-faq--icon-chevron .mst-faq-icon::before {
	content: "";
	position: absolute;
	inset: 2px 3px auto 3px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .25s ease;
}

.mst-faq--icon-chevron .is-open .mst-faq-icon::before {
	transform: rotate(-135deg);
	inset: 5px 3px auto 3px;
}

/* The answer opens by growing its row, which animates smoothly whatever its height. */
.mst-faq-a {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .28s cubic-bezier(.22, .61, .36, 1);
}

.mst-faq-item.is-open .mst-faq-a {
	grid-template-rows: 1fr;
}

/* display:grid above would otherwise beat the browser's own [hidden] rule, leaving closed answers
   taking up space. */
.mst-faq-a[hidden] {
	display: none;
}

.mst-faq-a > .mst-faq-a-text {
	overflow: hidden;
	min-height: 0;
}

.mst-faq-a-text {
	padding: 0 20px 18px;
	line-height: 1.8;
	opacity: .9;
	overflow-wrap: break-word;
}

.mst-faq-a-text > :first-child {
	margin-top: 0;
}

.mst-faq-a-text > :last-child {
	margin-bottom: 0;
}

/* Without the grid trick (older browsers), the answer simply appears. */
@supports not (grid-template-rows: 0fr) {
	.mst-faq-a {
		display: block;
	}

	.mst-faq-a[hidden] {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mst-faq-a,
	.mst-faq-icon::before,
	.mst-faq-icon::after {
		transition: none;
	}
}
