/*
 * YBB site styling.
 *
 * Colours come from the child theme's custom properties, with literal
 * fallbacks so pages still look right if the child theme is ever inactive.
 *
 * RTL-first: logical properties throughout, so the layout mirrors without a
 * second stylesheet.
 */

:root {
	--ybb-o: var(--ybb-orange, #FF8A00);
	--ybb-k: var(--ybb-black, #111111);
	--ybb-d: var(--ybb-dark-gray, #2B2B2B);
	--ybb-g: var(--ybb-gray, #A6A6A6);
	--ybb-l: var(--ybb-bg, #F7F7F7);
}

/* ── Hero ─────────────────────────────────────────────────────────────────
 * A workshop-floor treatment rather than a supercar photo: diagonal hazard
 * banding and a subtle grid, in brand colours. Reads as industrial and real,
 * and needs no photography — which matters, because no authentic photography
 * of the centre exists yet and stock supercars are explicitly out (D-015).
 */

.ybb-hero {
	position: relative;
	overflow: hidden;
}

.ybb-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		repeating-linear-gradient(
			135deg,
			rgba(255, 138, 0, 0.08) 0 18px,
			transparent 18px 46px
		),
		linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: auto, 46px 46px, 46px 46px;
	pointer-events: none;
}

.ybb-hero::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	block-size: 6px;
	background: repeating-linear-gradient(
		135deg,
		var(--ybb-o) 0 22px,
		var(--ybb-k) 22px 44px
	);
}

.ybb-hero > .elementor-container {
	position: relative;
	z-index: 1;
}

.ybb-hero-en {
	margin-block-start: 1.25rem;
	text-align: center;
	color: var(--ybb-g);
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	direction: ltr;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.ybb-hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	justify-content: center;
	margin-block-start: 1.75rem;
}

.ybb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-block-size: 54px;
	padding: 0 2.1rem;
	border-radius: 6px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.ybb-btn--primary {
	/* Dark text on orange: white on #FF8A00 is 2.3:1 and fails WCAG AA. */
	background: var(--ybb-o);
	color: var(--ybb-k);
}

.ybb-btn--primary:hover,
.ybb-btn--primary:focus-visible {
	background: #E67B00;
	color: var(--ybb-k);
}

.ybb-btn--ghost {
	background: transparent;
	color: #FFFFFF;
	border-color: rgba(255, 255, 255, 0.55);
}

.ybb-btn--ghost:hover,
.ybb-btn--ghost:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	color: #FFFFFF;
	border-color: #FFFFFF;
}

.ybb-btn[disabled],
.ybb-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* ── Service / feature cards ──────────────────────────────────────────── */

.elementor-widget-icon-box .elementor-icon-box-wrapper {
	text-align: start;
}

.elementor-widget-icon-box .elementor-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 62px;
	block-size: 62px;
	border-radius: 10px;
	background: rgba(255, 138, 0, 0.12);
	transition: background-color .25s ease, transform .25s ease;
}

.elementor-widget-icon-box:hover .elementor-icon {
	background: var(--ybb-o);
	transform: translateY(-2px);
}

.elementor-widget-icon-box:hover .elementor-icon svg,
.elementor-widget-icon-box:hover .elementor-icon i {
	color: var(--ybb-k) !important;
	fill: var(--ybb-k) !important;
}

/* Dark sections need light card text. */
.elementor-section[data-settings*="111111"] .elementor-icon-box-title,
.ybb-dark .elementor-icon-box-title {
	color: #FFFFFF;
}

/* ── Empty states ─────────────────────────────────────────────────────────
 * Visible to logged-in editors only. Visitors see nothing at all, so the
 * public site never displays a placeholder that could be mistaken for real
 * information (content rule).
 */

.ybb-empty-state {
	display: none;
	border: 1px dashed var(--ybb-g);
	border-radius: 10px;
	padding: 1.5rem 1.75rem;
	background: rgba(166, 166, 166, 0.07);
	text-align: start;
}

body.logged-in .ybb-empty-state {
	display: block;
}

.ybb-empty-state__title {
	margin: 0 0 .5rem;
	font-weight: 700;
	color: var(--ybb-k);
}

.ybb-empty-state__body {
	margin: 0 0 .65rem;
	color: var(--ybb-d);
	line-height: 1.85;
}

.ybb-empty-state__meta {
	margin: 0;
	font-size: .82rem;
	color: var(--ybb-g);
	direction: ltr;
	text-align: start;
}

.ybb-empty-state__meta code {
	background: rgba(17, 17, 17, .06);
	padding: .1rem .35rem;
	border-radius: 3px;
}

/* ── Forms ────────────────────────────────────────────────────────────── */

.ybb-form {
	max-inline-size: 860px;
	margin-inline: auto;
	background: #FFFFFF;
	border: 1px solid rgba(166, 166, 166, .35);
	border-radius: 12px;
	padding: 2rem;
}

.ybb-form__note {
	margin-block-end: 1.5rem;
	padding: .85rem 1rem;
	border-inline-start: 4px solid var(--ybb-o);
	background: rgba(255, 138, 0, .07);
	color: var(--ybb-d);
	border-radius: 4px;
}

.ybb-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.1rem;
}

@media (min-width: 720px) {
	.ybb-form__grid { grid-template-columns: 1fr 1fr; }
}

.ybb-field {
	display: flex;
	flex-direction: column;
	gap: .45rem;
}

.ybb-field--full { grid-column: 1 / -1; }

.ybb-field > span {
	font-weight: 600;
	color: var(--ybb-k);
	font-size: .95rem;
}

.ybb-field input,
.ybb-field select,
.ybb-field textarea {
	inline-size: 100%;
	min-block-size: 48px;
	padding: .75rem .9rem;
	border: 1px solid rgba(166, 166, 166, .6);
	border-radius: 6px;
	background: #FFFFFF;
	color: var(--ybb-k);
	font: inherit;
	font-size: 1rem; /* 16px stops iOS zooming on focus. */
}

.ybb-field textarea { min-block-size: 120px; resize: vertical; }

.ybb-field input:focus,
.ybb-field select:focus,
.ybb-field textarea:focus {
	outline: 3px solid var(--ybb-o);
	outline-offset: 1px;
	border-color: var(--ybb-o);
}

.ybb-form .ybb-btn { margin-block-start: 1.5rem; }

.ybb-form__disabled-note {
	margin-block-start: .75rem;
	font-size: .88rem;
	color: var(--ybb-g);
}

/* ── Legal pages ──────────────────────────────────────────────────────── */

.ybb-legal {
	max-inline-size: 820px;
	margin-inline: auto;
	line-height: 1.95;
	color: var(--ybb-d);
}

.ybb-legal h2 {
	margin-block: 2rem .6rem;
	font-size: 1.3rem;
	color: var(--ybb-k);
}

.ybb-legal__notice {
	padding: 1rem 1.15rem;
	background: rgba(255, 138, 0, .1);
	border-inline-start: 4px solid var(--ybb-o);
	border-radius: 4px;
	color: var(--ybb-k);
}

/* ── Navigation CTA ───────────────────────────────────────────────────── */

.ybb-nav-cta > a {
	background: var(--ybb-o);
	color: var(--ybb-k) !important;
	border-radius: 6px;
	padding-inline: 1.25rem !important;
	font-weight: 700;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.ybb-hero-cta { flex-direction: column; }
	.ybb-hero-cta .ybb-btn { inline-size: 100%; }
	.ybb-form { padding: 1.25rem; }
	.elementor-widget-icon-box .elementor-icon-box-wrapper { text-align: center; }
}
