.awscc-widget {
	--awscc-primary: #f2622e;
	--awscc-secondary: #111827;
	--awscc-bg: #ffffff;
	--awscc-text: #1f2937;
	--awscc-radius: 16px;
	--awscc-fs: 15px;
	--awscc-width: 480px;

	box-sizing: border-box;
	max-width: var(--awscc-width);
	width: 100%;
	margin: 24px auto;
	padding: 28px;
	background: var(--awscc-bg);
	color: var(--awscc-text);
	border-radius: var(--awscc-radius);
	box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
	font-size: var(--awscc-fs);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}
.awscc-widget * {
	box-sizing: border-box;
}

.awscc-header {
	margin-bottom: 18px;
}
.awscc-title {
	margin: 0 0 4px;
	font-size: 1.4em;
	font-weight: 700;
	color: var(--awscc-secondary);
}
.awscc-desc {
	margin: 0;
	font-size: 0.85em;
	color: #6b7280;
}

.awscc-field {
	background: #fafafa;
	border: 1px solid #e5e7eb;
	border-radius: calc(var(--awscc-radius) * 0.6);
	padding: 12px 16px;
	margin-bottom: 10px;
}
.awscc-field-from {
	border-color: var(--awscc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--awscc-primary) 12%, transparent);
}
.awscc-label {
	display: block;
	font-size: 0.72em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b7280;
	font-weight: 600;
	margin-bottom: 6px;
}
.awscc-input-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.awscc-amount-input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 1.7em;
	font-weight: 700;
	color: var(--awscc-secondary);
	outline: none;
	min-width: 0;
	padding: 0;
}

.awscc-result {
	flex: 1;
	font-size: 1.7em;
	font-weight: 700;
	color: var(--awscc-secondary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.awscc-currency-pill {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 6px 12px;
	font-weight: 700;
	font-size: 0.85em;
	white-space: nowrap;
	color: var(--awscc-secondary);
}

.awscc-flag {
	width: 18px;
	height: 13px;
	border-radius: 2px;
	background-size: cover;
	background-position: center;
	display: inline-block;
	background-color: #ddd;
}

.awscc-select-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.awscc-currency-switcher {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 8px 30px 8px 14px;
	font-weight: 700;
	font-size: 0.85em;
	color: var(--awscc-secondary);
	cursor: pointer;
	outline: none;
}
.awscc-currency-switcher:focus {
	border-color: var(--awscc-primary);
}

.awscc-select-arrow {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--awscc-primary);
	font-size: 0.75em;
}

.awscc-arrow {
	width: 34px;
	height: 34px;
	margin: 4px auto;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--awscc-primary);
	font-weight: 700;
	box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.awscc-meta {
	background: #fafafa;
	border-radius: calc(var(--awscc-radius) * 0.5);
	padding: 12px 16px;
	margin: 14px 0 18px;
	font-size: 0.85em;
}
.awscc-meta-row {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	color: #4b5563;
}
.awscc-meta-row span:last-child {
	font-weight: 600;
	color: var(--awscc-secondary);
}

.awscc-calc-btn {
	width: 100%;
	border: none;
	border-radius: 999px;
	padding: 14px 20px;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	background: var(--awscc-primary);
	color: #fff;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.awscc-calc-btn:hover {
	filter: brightness(0.95);
}
.awscc-calc-btn:active {
	transform: scale(0.98);
}

.awscc-btn-outline .awscc-calc-btn {
	background: transparent;
	color: var(--awscc-primary);
	border: 2px solid var(--awscc-primary);
}

.awscc-disclaimer {
	margin: 12px 0 0;
	font-size: 0.72em;
	color: #9ca3af;
	text-align: center;
}

/* Fee Calculator */
.awscc-fee-summary {
	background: #fafafa;
	border-radius: calc(var(--awscc-radius) * 0.5);
	padding: 4px 16px;
	margin: 16px 0 18px;
}
.awscc-fee-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #ececec;
	font-size: 0.92em;
	color: #4b5563;
}
.awscc-fee-row:last-child {
	border-bottom: none;
}
.awscc-fee-amount {
	font-weight: 700;
	color: var(--awscc-secondary);
}
.awscc-fee-negative {
	color: #d64545;
}
.awscc-fee-row-total {
	font-size: 1.05em;
}
.awscc-fee-row-total .awscc-fee-amount {
	color: var(--awscc-primary);
	font-size: 1.15em;
}
.awscc-fee-badge {
	display: inline-block;
	font-style: normal;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 1px 8px;
	font-size: 0.78em;
	font-weight: 700;
	color: var(--awscc-primary);
	margin-left: 4px;
}

.awscc-widget.awscc-loading .awscc-result {
	opacity: 0.5;
}

@media (max-width: 480px) {
	.awscc-widget {
		padding: 20px;
	}
	.awscc-amount-input,
	.awscc-result {
		font-size: 1.4em;
	}
}
