/**
 * RSI Toolkit — Contact Offices widget.
 *
 * Baked to the 2026 Figma "Contact us" section: light band, Alexandria heading
 * + Roboto subtitle, office tabs (name + address, active gets an accent edge)
 * that switch a map/photo pane. Side-by-side on desktop, stacked on mobile.
 */

.rsi-contact {
	/* Background + padding come from the Elementor container, not the widget. */
}

.rsi-contact__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.rsi-contact__head {
	margin-bottom: 56px;
}

.rsi-contact__heading {
	font-family: 'Alexandria', sans-serif;
	font-weight: 700;
	font-size: 34px;
	line-height: 41px;
	color: #0a0a0a;
	margin: 0;
}

.rsi-contact__sub {
	font-family: 'Roboto', sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 27px;
	color: #5b5b5b;
	margin: 24px 0 0;
}

/* Office tabs on one side, image pane on the other (matches rsi_v2). */
.rsi-contact__grid {
	display: grid;
	grid-template-columns: 460px minmax(0, 1fr);
	gap: 80px;
	align-items: stretch;
}

.rsi-contact__tabs {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Accordion tabs (baked to rsi_v2): all names show; only the active tab
   reveals its address; inactive names are greyed; active gets a dark edge. */
.rsi-contact__tab {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	flex-direction: column;
	/*
	 * flex-start is already direction-aware: in a column flex the cross axis
	 * follows `direction`, so this is the LEFT edge in English and the RIGHT edge
	 * in Arabic with no override. rtl.css used to force `flex-end` here, which
	 * pushed the whole phone/email group to the wrong edge in Arabic — the names
	 * sat right while the numbers and addresses sat left.
	 */
	align-items: flex-start !important;
	justify-content: flex-start !important;
	gap: 16px !important;
	width: 100%;
	min-height: 0 !important;
	/* `start`, not `left`: the tab is a <button>, so the alignment does have to be
	   stated (Woodmart centres button text) — but stating it physically is what
	   forced rtl.css to restate it back again. */
	text-align: start !important;
	text-transform: none !important;
	font-weight: 400 !important;
	background: none !important;
	border: 0 !important;
	border-inline-start: 2px solid rgba(0, 0, 0, .12) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	/* The accent edge is `border-inline-start`, so its clearance has to be inline
	   too — 32px against the border, 24px on the far side. */
	padding-block: 18px !important;
	padding-inline: 32px 24px !important;
	cursor: pointer;
	transition: border-color .2s;
}

.rsi-contact__tab.is-active {
	border-inline-start-color: #0a0a0a !important;
}

.rsi-contact__name {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.3;
	color: #9a9a9a;
	text-align: start !important;
	width: 100%;
	transition: color .2s;
}

.rsi-contact__tab.is-active .rsi-contact__name {
	color: #0a0a0a;
}

.rsi-contact__addr {
	font-family: 'Roboto', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #5b5b5b;
	text-align: start !important;
	width: 100%;
}

/*
 * Accordion: a closed office shows its NAME and nothing else.
 *
 * The phone and email belong to the open office just as much as the address does
 * — hiding only the address left every closed office listing its number and email
 * anyway, so the accordion looked broken rather than closed.
 */
.rsi-contact__tab:not(.is-active) .rsi-contact__addr,
.rsi-contact__tab:not(.is-active) .rsi-contact__contacts {
	display: none;
}

.rsi-contact__pane {
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	width: 100%;
	min-height: 440px;
}

.rsi-contact__map {
	width: 100% !important;
	height: 100% !important;
	min-height: 440px;
	object-fit: cover;
	display: block;
}

@media (max-width: 1024px) {
	.rsi-contact__grid {
		grid-template-columns: 1fr !important;
		gap: 40px;
	}

	.rsi-contact__pane {
		order: -1;
		min-height: 0;
	}

	.rsi-contact__map {
		height: 320px !important;
		min-height: 0;
	}
}

@media (max-width: 767px) {
	.rsi-contact__heading {
		font-size: 30px;
		line-height: 38px;
	}

	.rsi-contact__name {
		font-size: 21px;
		line-height: 30px;
	}
}

/* ------------------------- phone + email per office --------------------- */
/* Added 1.16.1 when the client supplied per-office phone/email. Both are
   links so they are tappable on a phone; each is dir="ltr" in the markup
   because a number or an address is a Latin run that would otherwise reorder
   inside an Arabic paragraph. */
.rsi-contact__contacts {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 6px;
}

.rsi-contact .rsi-contact__phone,
.rsi-contact .rsi-contact__email {
	font-family: 'Alexandria', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 24px;
	color: inherit;
	text-decoration: none;
	border: 0;
	box-shadow: none;
	/* Sit on the reading edge in both languages even though the value is LTR. */
	align-self: flex-start;
	opacity: .85;
	transition: opacity .2s ease, color .2s ease;
}

.rsi-contact .rsi-contact__phone:hover,
.rsi-contact .rsi-contact__email:hover,
.rsi-contact .rsi-contact__phone:focus-visible,
.rsi-contact .rsi-contact__email:focus-visible {
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: none;
}
