/**
 * Finance Calculator — Page Styles
 * Matches Drive EV design system (Barlow Condensed headings, DM Sans body, #00337a navy)
 */

/* =============================================
   Page Banner
   ============================================= */
.fc-banner {
	background-color: #00337a;
	padding: 90px 20px;
	text-align: center;
}

.fc-banner-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 3.167em;
	font-weight: 600;
	line-height: 1em;
	text-transform: capitalize;
	letter-spacing: -0.6px;
	color: #ffffff;
	margin: 0;
}

.fc-breadcrumb {
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 12px;
}

/* =============================================
   Calculator Layout
   ============================================= */
/* Override theme's page_content_wrap padding for this page */
.page-template-page-finance-calculator,
.page-template-page-finance-calculator .body_wrap,
.page-template-page-finance-calculator .page_wrap,
.page-template-page-finance-calculator .page_content_wrap {
	background-color: #f5f5f5;
}
.page-template-page-finance-calculator .page_content_wrap {
	padding-top: 0;
}

.fc-page-heading {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 40px;
	font-weight: 550;
	text-transform: capitalize;
	line-height: 1.2;
	color: #424242;
	margin: 0 0 20px;
	text-align: center;
}

.fc-page-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px 80px;
}

.fc-calculator {
	display: grid;
	grid-template-columns: 1fr auto 380px;
	gap: 0;
	align-items: stretch;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* =============================================
   Left Panel — Inputs
   ============================================= */
.fc-inputs {
	padding: 40px 36px;
	position: relative;
}
.fc-inputs::after {
	content: '';
	position: absolute;
	right: 0;
	top: 20%;
	height: 60%;
	width: 1px;
	background: #e5e7eb;
}

.fc-field {
	margin-bottom: 32px;
}

.fc-field:last-child {
	margin-bottom: 0;
}

.fc-label {
	display: block;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a2e;
	margin-bottom: 12px;
}

.fc-input-row {
	display: flex;
	align-items: center;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	padding: 0 14px;
	height: 48px;
	background: #fff;
	margin-bottom: 14px;
	transition: border-color 0.2s;
}

.fc-input-row:focus-within {
	border-color: #0F3D7A;
	box-shadow: 0 0 0 2px rgba(15, 61, 122, 0.12);
}

.fc-currency,
.fc-pct-sign {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: #8c8c8c;
	flex-shrink: 0;
}

.fc-currency {
	margin-right: 8px;
}

.fc-pct-sign {
	margin-left: 4px;
}

.fc-input,
.fc-input:focus,
.fc-input.filled,
.fc-input.fill_inited {
	border: none;
	border-bottom: none;
	outline: none;
	box-shadow: none;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #1a1a2e;
	flex: 1;
	min-width: 0;
	background: transparent;
}

.fc-input--select {
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230F3D7A' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 4px center;
	background-color: transparent;
	padding-right: 28px;
	height: 100%;
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	color: #0F3D7A;
}

.fc-input--pct {
	max-width: 48px;
	text-align: center;
	flex: 0 0 48px;
}

.fc-deposit-row .fc-input--deposit {
	flex: 1;
}

.fc-deposit-row .fc-input--pct {
	border-left: 1px solid #d0d5dd;
	padding-left: 12px;
	margin-left: 12px;
}

/* =============================================
   Custom Range Sliders
   ============================================= */
.fc-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 3px;
	background: #e0e0e0;
	outline: none;
	cursor: pointer;
}

.fc-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0F3D7A;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(15, 61, 122, 0.3);
	transition: transform 0.15s, box-shadow 0.15s;
}

.fc-slider::-webkit-slider-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 2px 10px rgba(15, 61, 122, 0.45);
}

.fc-slider::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0F3D7A;
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 6px rgba(15, 61, 122, 0.3);
}

.fc-slider::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
}

.fc-slider::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: #e0e0e0;
}

/* =============================================
   Loan Period Buttons
   ============================================= */
.fc-term-buttons {
	display: flex;
	gap: 10px;
}

.fc-term-btn {
	width: 52px;
	height: 44px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	background: #fff;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a2e;
	cursor: pointer;
	transition: all 0.2s;
}

.fc-term-btn:hover {
	border-color: #0F3D7A;
	color: #0F3D7A;
}

.fc-term-btn--active {
	background: #0F3D7A;
	border-color: #0F3D7A;
	color: #fff;
}

.fc-term-btn--active:hover {
	background: #0c3168;
	color: #fff;
}

/* =============================================
   Middle Panel — UAE Rates Info
   ============================================= */
.fc-rates-info {
	padding: 32px 28px;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 280px;
}
.fc-rates-info::after {
	content: '';
	position: absolute;
	right: 0;
	top: 20%;
	height: 60%;
	width: 1px;
	background: #e5e7eb;
}
.fc-rates-info__title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: #1a1a2e;
	text-align: center;
	margin: 0 0 20px;
	line-height: 1.3;
}
.fc-rates-info__section {
	margin-bottom: 20px;
}
.fc-rates-info__subtitle {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #00337a;
	margin: 0 0 10px;
	text-align: center;
}
.fc-rates-info__icon {
	font-size: 16px;
}
.fc-rates-info__list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.fc-rates-info__list li {
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	color: #374151;
	line-height: 1.6;
	padding: 4px 0 4px 16px;
	position: relative;
}
.fc-rates-info__list li::before {
	content: '•';
	position: absolute;
	left: 0;
	color: #00337a;
	font-weight: 700;
}
.fc-rates-info__note {
	border-top: 1px solid #e5e7eb;
	padding-top: 14px;
	margin-top: 8px;
}
.fc-rates-info__note p {
	font-family: 'DM Sans', sans-serif;
	font-size: 11px;
	color: #9ca3af;
	line-height: 1.5;
	margin: 0;
}

/* =============================================
   Right Panel — Summary Card
   ============================================= */
.fc-summary {
	background: #00337a;
	border-radius: 0 8px 8px 0;
	padding: 36px 32px;
	color: #fff !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.fc-summary,
.fc-summary *,
.fc-summary h3,
.fc-summary td,
.fc-summary span,
.fc-summary div,
.fc-summary table {
	color: #fff !important;
}

.fc-summary__heading {
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 8px;
	text-align: center;
}

.fc-summary__amount {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 42px;
	font-weight: 700;
	text-align: center;
	margin-bottom: 8px;
	letter-spacing: -0.5px;
}

.fc-summary__calc-type {
	text-align: center;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 24px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* Breakdown table — override theme zebra-stripe background */
.fc-breakdown,
.fc-breakdown tbody,
.fc-breakdown tr,
.fc-breakdown td {
	background: transparent !important;
	background-color: transparent !important;
}

.fc-breakdown {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 28px;
}

.fc-breakdown tr {
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.fc-breakdown tr:last-child {
	border-bottom: none;
}

.fc-breakdown td {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	padding: 10px 0;
}

.fc-breakdown td:first-child {
	color: rgba(255, 255, 255, 0.75) !important;
}

.fc-breakdown td:last-child {
	text-align: right;
	font-weight: 600;
	color: #fff !important;
}

/* CTA Button */
.fc-cta {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background: #ffffff;
	color: #00337a !important;
	border: none;
	border-radius: 6px;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s, transform 0.15s;
}

.fc-cta:hover {
	background: #f0f4f8;
	transform: translateY(-1px);
}

/* =============================================
   Eligibility Modal
   ============================================= */
.fc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.fc-modal-overlay--open {
	display: flex;
}

.fc-modal {
	background: #fff;
	border-radius: 12px;
	padding: 40px 36px;
	max-width: 480px;
	width: 100%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	animation: fcModalIn 0.25s ease-out;
}

@keyframes fcModalIn {
	from { opacity: 0; transform: translateY(20px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.fc-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 28px;
	color: #666;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

.fc-modal__close:hover {
	color: #1a1a2e;
}

.fc-modal__title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 26px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 6px;
}

.fc-modal__subtitle {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: #666;
	margin: 0 0 24px;
}

/* Form fields */
.fc-form-field {
	margin-bottom: 18px;
}

.fc-form-field label {
	display: block;
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a2e;
	margin-bottom: 6px;
}

.fc-form-field input[type="text"],
.fc-form-field input[type="tel"],
.fc-form-field select {
	width: 100%;
	height: 44px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	padding: 0 12px;
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: #1a1a2e;
	background: #fff;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.fc-form-field input:focus,
.fc-form-field select:focus {
	border-color: #0F3D7A;
	outline: none;
	box-shadow: 0 0 0 2px rgba(15, 61, 122, 0.12);
}

/* Phone field with country code */
.fc-phone-wrap {
	display: flex;
	gap: 0;
}
.fc-phone-code {
	display: flex;
	align-items: center;
	padding: 0 12px;
	height: 44px;
	border: 1px solid #d0d5dd;
	border-right: none;
	border-radius: 6px 0 0 6px;
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #00337a;
	background: #f8f9fb;
	white-space: nowrap;
	user-select: none;
	flex-shrink: 0;
}
.fc-phone-wrap .fc-form-field input[type="tel"],
.fc-phone-wrap input[type="tel"] {
	flex: 1;
	width: 100%;
	height: 44px;
	border: 1px solid #d0d5dd;
	border-left: none;
	border-radius: 0 6px 6px 0;
	padding: 0 12px;
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: #1a1a2e;
	background: #fff;
	box-sizing: border-box;
}
.fc-phone-wrap input[type="tel"]:focus {
	border-color: #0F3D7A;
	box-shadow: 0 0 0 2px rgba(15, 61, 122, 0.12);
}

.fc-form-field--checkbox {
	margin-top: 20px;
}

.fc-form-field--checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: 13px;
	color: #555;
	cursor: pointer;
	line-height: 1.6;
}
.fc-form-field--checkbox label a {
	color: #00337a;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.fc-form-field--checkbox label a:hover {
	color: #001f4d;
}

.fc-form-field--checkbox input[type="checkbox"] {
	margin-top: 4px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	accent-color: #00337a;
	flex-shrink: 0;
}

.fc-form-error {
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	color: #dc3545;
	margin-bottom: 12px;
	min-height: 18px;
}

.fc-modal__form button.fc-form-submit,
.fc-modal button.fc-form-submit,
button.fc-form-submit,
.fc-form-submit {
	all: unset;
	display: block;
	width: 100%;
	padding: 13px 20px;
	background: #00337a;
	color: #fff;
	border: none;
	border-radius: 4px;
	text-align: center;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
	box-sizing: border-box;
}

.fc-form-submit:hover {
	background: #0c3168;
}

.fc-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Success state */
.fc-modal__success {
	text-align: center;
	padding: 20px 0;
}

.fc-modal__success-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 32px;
	line-height: 64px;
	margin: 0 auto 20px;
}

.fc-modal__success h3 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 24px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 8px;
}

.fc-modal__success p {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	color: #666;
	margin: 0 0 24px;
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {
	.fc-banner {
		padding: 60px 16px;
	}

	.fc-banner-title {
		font-size: 2em;
	}

	.fc-page-wrap {
		padding: 24px 16px 60px;
	}

	.fc-calculator {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.fc-inputs {
		padding: 28px 20px;
	}

	.fc-calculator {
		grid-template-columns: 1fr;
		border-radius: 8px;
	}

	.fc-inputs::after {
		display: none;
	}
	.fc-inputs {
		border-bottom: 1px solid #e5e7eb;
	}

	.fc-rates-info::after {
		display: none;
	}
	.fc-rates-info {
		max-width: 100%;
		border-bottom: 1px solid #e5e7eb;
		order: 3;
	}

	.fc-summary {
		padding: 28px 24px;
		border-radius: 0 0 8px 8px;
		order: 2;
	}

	.fc-summary__amount {
		font-size: 34px;
	}

	.fc-term-buttons {
		flex-wrap: wrap;
	}

	.fc-modal {
		padding: 28px 20px;
	}
}

/* RTL support for Arabic */
[dir="rtl"] .fc-currency {
	margin-right: 0;
	margin-left: 8px;
}
[dir="rtl"] .fc-input {
	text-align: right;
	direction: ltr;
	unicode-bidi: plaintext;
}
[dir="rtl"] .fc-label {
	text-align: right;
}
[dir="rtl"] .fc-input-row {
	flex-direction: row-reverse;
}
[dir="rtl"] .fc-pct-sign {
	margin-right: 0;
	margin-left: 8px;
}
[dir="rtl"] .fc-slider {
	direction: ltr;
}
[dir="rtl"] .fc-cta {
	direction: rtl;
}
