/**
 * NexaGulf GCC Calculators
 * Scoped to .ngc-scope so nothing leaks into the host theme.
 */

.ngc-scope {
	--ngc-accent: #2FC992;
	--ngc-accent-d: #0D6B4E;
	--ngc-ink: #0B0F14;
	--ngc-body: #55606B;
	--ngc-line: #E4E8EA;
	--ngc-surface: #F4F6F7;
	--ngc-white: #FFFFFF;
	--ngc-radius: 14px;
	--ngc-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ngc-ease: cubic-bezier(.2, .7, .2, 1);

	font-family: var(--ngc-font);
	color: var(--ngc-body);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.ngc-scope *,
.ngc-scope *::before,
.ngc-scope *::after {
	box-sizing: border-box;
}

/* Never widen a grid or flex parent. */
.ngc-scope,
.ngc-suite,
.ngc-panels,
.ngc-panel,
.ngc-card,
.ngc-tabs {
	min-width: 0;
	max-width: 100%;
}

.ngc-scope :focus-visible {
	outline: 2px solid var(--ngc-accent);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ---------- suite heading + tabs ---------- */

.ngc-suite-title {
	margin: 0 0 18px;
	font-size: clamp(22px, 2.6vw, 30px);
	font-weight: 700;
	letter-spacing: -.03em;
	color: var(--ngc-ink);
	line-height: 1.15;
}

.ngc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
	padding: 5px;
	background: var(--ngc-surface);
	border-radius: 999px;
	border: 1px solid var(--ngc-line);
}

.ngc-tab {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: -.01em;
	color: var(--ngc-body);
	background: transparent;
	padding: 8px 16px;
	border-radius: 999px;
	transition: background .22s var(--ngc-ease), color .22s var(--ngc-ease);
	white-space: nowrap;
}

.ngc-tab:hover {
	color: var(--ngc-ink);
	background: rgba(255, 255, 255, .7);
}

.ngc-tab.is-on {
	background: var(--ngc-ink);
	color: #fff;
}

.ngc-panel.is-hidden {
	display: none;
}

/* ---------- card ---------- */

.ngc-card {
	background: var(--ngc-white);
	border: 1px solid var(--ngc-line);
	border-radius: var(--ngc-radius);
	overflow: hidden;
}

.ngc-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 22px 24px 20px;
	border-bottom: 1px solid var(--ngc-line);
}

.ngc-kicker {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ngc-accent-d);
	margin-bottom: 8px;
}

.ngc-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.03em;
	color: var(--ngc-ink);
	line-height: 1.2;
}

.ngc-desc {
	margin: 6px 0 0;
	font-size: 14px;
	max-width: 52ch;
	color: var(--ngc-body);
}

.ngc-mark {
	flex: none;
	width: 26px;
	color: var(--ngc-accent);
}

.ngc-mark svg {
	width: 100%;
	height: auto;
	display: block;
}

/* ---------- body layout ---------- */

.ngc-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.ngc-inputs {
	padding: 22px 24px 26px;
	display: grid;
	gap: 16px;
	align-content: start;
}

.ngc-field {
	display: grid;
	gap: 7px;
}

.ngc-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ngc-ink);
}

.ngc-hint {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--ngc-body);
}

.ngc-input {
	position: relative;
	display: flex;
	align-items: center;
}

.ngc-scope input[type="number"],
.ngc-scope .ngc-select {
	width: 100%;
	font: inherit;
	font-size: 15px;
	color: var(--ngc-ink);
	background: var(--ngc-white);
	border: 1px solid var(--ngc-line);
	border-radius: 10px;
	padding: 11px 14px;
	transition: border-color .2s, box-shadow .2s;
	-moz-appearance: textfield;
}

.ngc-scope input[type="number"]::-webkit-outer-spin-button,
.ngc-scope input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ngc-scope input[type="number"]:focus,
.ngc-scope .ngc-select:focus {
	outline: none;
	border-color: var(--ngc-accent);
	box-shadow: 0 0 0 3px rgba(47, 201, 146, .16);
}

.ngc-scope .ngc-select {
	appearance: none;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2355606B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 11px;
	padding-right: 36px;
	cursor: pointer;
}

.ngc-input.has-suffix input {
	padding-right: 46px;
}

.ngc-suffix {
	position: absolute;
	right: 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ngc-body);
	pointer-events: none;
}

/* segmented control */

.ngc-seg {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: var(--ngc-surface);
	border: 1px solid var(--ngc-line);
	border-radius: 10px;
}

.ngc-seg-btn {
	flex: 1;
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--ngc-body);
	background: transparent;
	padding: 8px 10px;
	border-radius: 7px;
	transition: background .2s var(--ngc-ease), color .2s var(--ngc-ease);
	line-height: 1.3;
}

.ngc-seg-btn:hover {
	color: var(--ngc-ink);
}

.ngc-seg-btn.is-on {
	background: var(--ngc-white);
	color: var(--ngc-ink);
	box-shadow: 0 1px 3px rgba(11, 15, 20, .1);
}

/* currency pair */

.ngc-pair {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 10px;
	align-items: end;
}

.ngc-swap {
	appearance: none;
	border: 1px solid var(--ngc-line);
	background: var(--ngc-white);
	color: var(--ngc-ink);
	width: 42px;
	height: 42px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
	transition: background .2s, border-color .2s, transform .3s var(--ngc-ease);
}

.ngc-swap:hover {
	background: var(--ngc-surface);
	border-color: var(--ngc-accent);
	transform: rotate(180deg);
}

/* ---------- output ---------- */

.ngc-out {
	background: var(--ngc-ink);
	color: rgba(255, 255, 255, .72);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ngc-primary {
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.ngc-out-label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ngc-accent);
	margin-bottom: 10px;
}

.ngc-out-value {
	display: block;
	font-size: clamp(26px, 3.4vw, 36px);
	font-weight: 700;
	letter-spacing: -.04em;
	color: #fff;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.ngc-breakdown {
	margin: 0;
	display: grid;
	gap: 0;
	flex: 1;
	align-content: start;
}

.ngc-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	font-size: 13.5px;
}

.ngc-row:last-child {
	border-bottom: 0;
}

.ngc-row dt {
	margin: 0;
	color: rgba(255, 255, 255, .62);
}

.ngc-row dd {
	margin: 0;
	color: #fff;
	font-weight: 600;
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ngc-flag {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .8);
	background: rgba(47, 201, 146, .12);
	border-left: 2px solid var(--ngc-accent);
	padding: 10px 12px;
	border-radius: 0 8px 8px 0;
}

.ngc-acts {
	display: flex;
	gap: 8px;
}

.ngc-btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -.01em;
	padding: 10px 18px;
	border-radius: 8px;
	background: var(--ngc-accent);
	color: var(--ngc-ink);
	transition: background .2s var(--ngc-ease), opacity .2s;
}

.ngc-btn:hover {
	background: #3FDDA4;
}

.ngc-btn.is-done {
	background: #fff;
}

.ngc-btn-ghost {
	background: transparent;
	color: rgba(255, 255, 255, .78);
	border: 1px solid rgba(255, 255, 255, .2);
}

.ngc-btn-ghost:hover {
	background: rgba(255, 255, 255, .08);
	color: #fff;
}

/* ---------- note ---------- */

.ngc-note {
	margin: 0;
	padding: 14px 24px;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--ngc-body);
	background: var(--ngc-surface);
	border-top: 1px solid var(--ngc-line);
}

/* ---------- grid layout variant ---------- */

.ngc-suite.is-grid .ngc-panels {
	display: grid;
	gap: 16px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
	.ngc-body {
		grid-template-columns: 1fr;
	}

	.ngc-head {
		padding: 20px 18px 18px;
	}

	.ngc-inputs {
		padding: 20px 18px 22px;
	}

	.ngc-out {
		padding: 20px 18px;
	}

	.ngc-note {
		padding: 14px 18px;
	}

	.ngc-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		border-radius: 12px;
		scrollbar-width: none;
	}

	.ngc-tabs::-webkit-scrollbar {
		display: none;
	}
}

/* ---------- dark theme support ---------- */

@media (prefers-color-scheme: dark) {
	.ngc-scope.ngc-auto-dark {
		--ngc-white: #12181F;
		--ngc-surface: #0F151B;
		--ngc-line: #232C35;
		--ngc-ink: #F2F5F7;
		--ngc-body: #97A3AE;
	}

	.ngc-scope.ngc-auto-dark .ngc-out {
		background: #070B0F;
	}
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.ngc-scope *,
	.ngc-scope *::before,
	.ngc-scope *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* ---------- print ---------- */

@media print {
	.ngc-acts,
	.ngc-tabs {
		display: none !important;
	}

	.ngc-out {
		background: #fff !important;
		color: #000 !important;
		border-top: 1px solid #ccc;
	}

	.ngc-out-value,
	.ngc-row dd {
		color: #000 !important;
	}

	.ngc-row dt {
		color: #444 !important;
	}

	.ngc-panel.is-hidden {
		display: block !important;
	}
}
