/* =========================================================
   Buy a Car request form (Arabic / RTL, white text on dark)
   Uses the theme's Elementor global colors when available.
========================================================= */
.av-buy-car {
	--av-primary: var(--e-global-color-primary, #FF3600);
	--av-secondary: var(--e-global-color-secondary, #1F1F25);
	--av-white: #ffffff;
	max-width: 900px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--av-white);
	text-align: right;
}

.av-buy-car * {
	box-sizing: border-box;
}

/* =========================================================
   Action buttons (Buy Request / WhatsApp) — usable on car pages
========================================================= */
.av-action-wrap {
	text-align: center;
}

.av-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 30px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: all .3s ease;
}

.av-action-btn.is-full {
	display: flex;
	width: 100%;
}

.av-action-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	flex: 0 0 auto;
}

.av-buy-request-btn {
	background: var(--e-global-color-primary, #FF3600);
	color: #fff;
}

.av-buy-request-btn:hover {
	opacity: .9;
	color: #fff;
}

.av-whatsapp-btn {
	background: #25D366;
	color: #fff;
}

.av-whatsapp-btn:hover {
	background: #1ebe5b;
	color: #fff;
}

.av-finance-request-btn {
	background: var(--e-global-color-secondary, #1F1F25);
	color: #fff;
}

.av-finance-request-btn:hover {
	opacity: .9;
	color: #fff;
}

/* Combined widget layout: two buttons in a row + full-width WhatsApp below */
.av-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.av-actions-row {
	display: flex;
	gap: 12px;
}

.av-actions-row .av-action-btn {
	flex: 1 1 0;
}

.av-actions .av-whatsapp-btn {
	width: 100%;
}

@media (max-width: 480px) {
	.av-actions-row {
		flex-direction: column;
	}
}

/* =========================================================
   Tabs — segmented, professional look
========================================================= */
.av-tabs--main,
.av-tabs--sub {
	display: flex;
	width: -webkit-fit-content;
	width: fit-content;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	gap: 6px;
	padding: 6px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Main tabs (Individuals / Companies) — larger. */
.av-tabs--main {
	margin-bottom: 14px;
}

/* Sub tabs (Cash / Finance) — smaller, secondary. Right-aligned, just above the car field. */
.av-tabs--sub {
	margin-top: 32px;
	margin-bottom: 12px;
	margin-right: 0;
	margin-left: auto;
	border-radius: 12px;
	padding: 4px;
}

.av-tab,
.av-subtab {
	cursor: pointer;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, .85);
	font-weight: 700;
	border-radius: 11px;
	transition: all .3s ease;
	white-space: nowrap;
}

/* Main tab sizing — clearly bigger. */
.av-tab {
	font-size: 19px;
	padding: 15px 46px;
}

/* Sub tab sizing — smaller. */
.av-subtab {
	font-size: 14px;
	padding: 9px 32px;
	border-radius: 9px;
}

.av-tab:hover,
.av-subtab:hover {
	color: #fff;
	background: rgba(255, 255, 255, .12);
}

.av-tab.is-active,
.av-subtab.is-active {
	background: var(--av-primary);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	padding-right: 90px;
	padding-left: 90px;
}

/* =========================================================
   Company intro
========================================================= */
.av-company-intro {
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 12px;
	padding: 22px 25px;
	margin-bottom: 25px;
	line-height: 1.9;
	color: #fff;
}

.av-company-intro__title {
	font-weight: 700;
	margin: 12px 0 8px;
}

.av-company-contacts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
}

.av-company-contacts li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.av-company-contacts a {
	color: #fff;
}

.av-company-contacts a:hover {
	color: var(--av-primary);
}

.av-company-contacts .av-ico {
	color: var(--av-primary);
	font-size: 18px;
}

/* =========================================================
   Fields
========================================================= */
.av-fields {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}

.av-field {
	display: flex;
	flex-direction: column;
}

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

.av-label {
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	margin-bottom: 8px;
	display: block;
}

.av-req {
	color: var(--av-primary);
}

.av-buy-car input[type="text"],
.av-buy-car input[type="tel"],
.av-buy-car input[type="number"],
.av-buy-car input[type="email"],
.av-buy-car select,
.av-buy-car textarea {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 15px;
	background: rgba(255, 255, 255, .07);
	color: #fff;
	outline: none;
	transition: border-color .3s ease, background .3s ease;
}

.av-buy-car input:focus,
.av-buy-car select:focus,
.av-buy-car textarea:focus {
	border-color: var(--av-primary);
	background: rgba(255, 255, 255, .12);
}

.av-buy-car ::placeholder {
	color: rgba(255, 255, 255, .55);
}

/* Native dropdown options render on a light menu — keep them dark. */
.av-buy-car select option {
	color: var(--av-secondary);
	background: #fff;
}

.av-price {
	background: rgba(255, 255, 255, .14) !important;
	font-weight: 700;
	color: #fff !important;
}

/* Phone field with fixed +966 prefix */
.av-phone {
	display: flex;
	align-items: stretch;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, .07);
	transition: border-color .3s ease;
}

.av-phone:focus-within {
	border-color: var(--av-primary);
}

.av-phone__prefix {
	display: flex;
	align-items: center;
	padding: 0 14px;
	font-weight: 700;
	color: #fff;
	background: rgba(255, 255, 255, .12);
	border-left: 1px solid rgba(255, 255, 255, .2);
	white-space: nowrap;
	direction: ltr;
}

.av-buy-car .av-phone__input {
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	flex: 1 1 auto;
	letter-spacing: 1px;
}

.av-invalid {
	border-color: #ff6b6b !important;
}

/* Hidden states */
.av-only.is-hidden {
	display: none !important;
}

/* hidden attribute on a flex field needs an explicit override */
.av-field[hidden] {
	display: none !important;
}

.av-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* =========================================================
   Car combobox (floating list stays light for readability)
========================================================= */
.av-combo {
	position: relative;
}

.av-combo__list {
	list-style: none;
	margin: 4px 0 0;
	padding: 6px;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 50;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	color: var(--av-secondary);
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.av-combo__list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	color: var(--av-secondary);
}

.av-combo__list li:hover {
	background: #f6f6f6;
}

.av-combo__price {
	color: var(--av-primary);
	font-weight: 700;
	white-space: nowrap;
}

.av-combo__msg {
	cursor: default;
	color: #777;
	justify-content: center;
}

/* =========================================================
   Company repeater
========================================================= */
.av-car-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 12px;
}

.av-car-row .av-combo {
	flex: 1 1 auto;
}

.av-car-qty {
	flex: 0 0 90px;
	width: 90px;
	text-align: center;
}

.av-row-remove {
	flex: 0 0 44px;
	height: 47px;
	border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(255, 255, 255, .07);
	border-radius: 8px;
	font-size: 22px;
	line-height: 1;
	color: #ff6b6b;
	cursor: pointer;
	transition: all .3s ease;
}

.av-row-remove:hover {
	background: #ff6b6b;
	color: #fff;
	border-color: #ff6b6b;
}

.av-add-row {
	display: inline-block;
	margin-top: 4px;
	background: transparent;
	border: 1px dashed var(--av-primary);
	color: var(--av-primary);
	font-weight: 700;
	padding: 10px 20px;
	border-radius: 8px;
	cursor: pointer;
	transition: all .3s ease;
}

.av-add-row:hover {
	background: var(--av-primary);
	color: #fff;
}

/* =========================================================
   Footer / submit
========================================================= */
.av-form__footer {
	margin-top: 28px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.av-submit {
	background: var(--av-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 15px 45px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .3s ease;
}

.av-submit:hover {
	opacity: .9;
}

.av-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.av-form__message {
	font-weight: 600;
	color: #fff;
}

.av-form__message.is-error {
	color: #ff8a8a;
}

.av-form__message.is-success {
	color: #5be08a;
}

/* =========================================================
   Success modal
========================================================= */
body.av-modal-open {
	overflow: hidden;
}

.av-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.av-modal[hidden] {
	display: none;
}

.av-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .6);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.av-modal__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	background: #fff;
	color: var(--av-secondary);
	border-radius: 18px;
	padding: 40px 35px 35px;
	text-align: center;
	box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
	animation: avModalIn .3s ease;
}

@keyframes avModalIn {
	from { opacity: 0; transform: translateY(20px) scale(.96); }
	to   { opacity: 1; transform: none; }
}

.av-modal__close {
	position: absolute;
	top: 14px;
	left: 16px;
	width: 34px;
	height: 34px;
	border: none;
	background: #f1f1f1;
	color: #555;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: all .3s ease;
}

.av-modal__close:hover {
	background: var(--av-primary);
	color: #fff;
}

.av-modal__icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--av-primary);
	color: #fff;
	font-size: 38px;
	line-height: 72px;
	font-weight: 700;
}

.av-modal__title {
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--av-secondary);
}

.av-modal__text {
	font-size: 16px;
	color: #555;
	margin: 0 0 22px;
}

.av-modal__sub {
	font-size: 15px;
	font-weight: 600;
	color: var(--av-secondary);
	margin: 0 0 16px;
}

.av-modal__btn {
	display: inline-block;
	background: var(--av-primary);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	padding: 13px 40px;
	border-radius: 10px;
	transition: opacity .3s ease;
}

.av-modal__btn:hover {
	opacity: .9;
	color: #fff;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 600px) {
	.av-fields {
		grid-template-columns: 1fr;
	}
	.av-car-qty {
		flex-basis: 70px;
		width: 70px;
	}
	.av-tab {
		font-size: 16px;
		padding: 13px 30px;
	}
}
