/* Stripe-style checkout — Withdraw to card */

:root {
	--purple: #635bff;
	--bg-page: #ffffff;
	--bg-summary: #f8f9fa;
	--text: #1a1a1a;
	--text-muted: #6b7280;
	--text-light: #9ca3af;
	--border: #e6e6e6;
	--radius: 7px;
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	color: var(--text);
	background: var(--bg-page);
}

.checkout {
	display: flex;
	min-height: 100vh;
	margin: 0 auto;
}

/* ——— Left: summary ——— */
.checkout__summary {
	width: 50%;
	background: var(--bg-summary);
	padding: 48px 64px;
	display: flex;
	flex-direction: column;
}

.summary__header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 48px;
}

.summary__back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: transparent;
	color: #374151;
	cursor: pointer;
	border-radius: var(--radius);
}

.summary__back:hover {
	background: rgba(0, 0, 0, 0.05);
}

.summary__brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.summary__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--border);
	color: #374151;
}

.summary__merchant {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #374151;
}

.summary__body {
	flex: 0 0 auto;
}

.summary__label {
	margin: 0 0 10px;
	font-size: 1.0625rem;
	color: var(--text-muted);
	font-weight: 600;
}

.summary__amount {
	margin: 0;
	font-size: clamp(2.75rem, 5.5vw, 3.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--text);
}

.summary__breakdown {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 0;
	box-sizing: border-box;
}

.summary__breakdown > * {
	width: 100%;
}

.breakdown__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.0625rem;
	color: var(--text);
	padding: 10px 0;
}

.breakdown__row--muted {
	color: var(--text-light);
}

.breakdown__tax {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.info-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 1px solid #d1d5db;
	border-radius: 50%;
	background: #fff;
	font-size: 0.6875rem;
	font-style: normal;
	font-weight: 600;
	color: var(--text-light);
	cursor: pointer;
	line-height: 1;
}

.breakdown__divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 16px 0 12px;
}

.breakdown__row--total {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--text);
	padding-top: 6px;
}

/* ——— Right: form ——— */
.checkout__form-panel {
	width: 50%;
	padding: 48px 64px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
}

.form__title {
	margin: 0 0 32px;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text);
}

.payment-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.field__label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-muted);
}

.field__input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--text);
	background: #fff;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input::placeholder {
	color: #b0b0b0;
}

.field__input:focus {
	border-color: var(--purple);
	box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

/* Combined card field */
.card-field {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s;
}

.card-field:focus-within {
	border-color: var(--purple);
	box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.card-field__number {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px 0 14px;
	min-height: 44px;
	border-bottom: 1px solid var(--border);
}

.card-field__number input {
	flex: 1;
	min-width: 0;
	height: 44px;
	border: none;
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--text);
	background: transparent;
	outline: none;
}

.card-field__number input::placeholder {
	color: #b0b0b0;
}

.card-field__brands {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.brand {
	display: flex;
	line-height: 0;
}

.brand img {
	display: block;
	width: auto;
	height: 15px;
	border-radius: 3px;
}

.card-field__row {
	display: grid;
	grid-template-columns: 1fr 1fr 1.1fr;
	min-height: 44px;
}

.card-field__exp-wrap {
	position: relative;
	display: flex;
	align-items: center;
	border-right: 1px solid var(--border);
}

.card-field__exp-wrap:last-of-type {
	border-right: none;
}

.card-field__select {
	appearance: none;
	width: 100%;
	height: 44px;
	padding: 0 28px 0 12px;
	border: none;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--text-muted);
	background: transparent;
	cursor: pointer;
	outline: none;
}

.card-field__select option {
	color: var(--text);
}

.card-field__chev {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #9ca3af;
}

.card-field__cvc {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	border-left: 1px solid var(--border);
}

.card-field__cvc input {
	flex: 1;
	min-width: 0;
	height: 44px;
	border: none;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--text);
	background: transparent;
	outline: none;
}

.card-field__cvc input::placeholder {
	color: #b0b0b0;
}

.card-field__cvc-icon {
	flex-shrink: 0;
	opacity: 0.85;
}

.btn-withdraw {
	margin-top: 8px;
	width: 100%;
	height: 48px;
	border: none;
	border-radius: var(--radius);
	background: var(--purple);
	color: #fff;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}

.btn-withdraw:hover {
	background: #5248e6;
}

.btn-withdraw:active {
	transform: scale(0.99);
}

.btn-withdraw:disabled,
.btn-withdraw[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

.btn-withdraw:disabled:hover,
.btn-withdraw[disabled]:hover {
	background: var(--purple);
}

.form__footer {
	padding-top: 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 20px;
	font-size: 0.8125rem;
	color: var(--text-light);
}
.form__powered-strong {
	font-weight: 800;
	color: #ABABAB;
	letter-spacing: -0.01em;
	font-size: 18px;
}

.form__powered {
	margin: 0;
}

.form__powered strong {
	font-weight: 600;
	color: #635bff;
	letter-spacing: -0.01em;
}

.form__links {
	display: flex;
	gap: 16px;
}

.form__links a {
	color: var(--text-light);
	text-decoration: none;
}

.form__links a:hover {
	color: var(--text-muted);
	text-decoration: underline;
}

/* Floating support */
.fab-support {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: var(--purple);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(99, 91, 255, 0.4);
	transition: transform 0.15s, box-shadow 0.15s;
}

.fab-support:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(99, 91, 255, 0.45);
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--font);
}

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

.modal__backdrop {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: none;
	background: rgba(15, 23, 42, 0.4);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	padding: 28px 28px 24px;
	background: var(--bg-page);
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) + 2px);
	box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
}

.modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.modal__close:hover {
	background: var(--bg-summary);
	color: var(--text);
}

.modal__title {
	margin: 0 0 20px;
	padding-right: 40px;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text);
	line-height: 1.3;
}

.modal__field {
	margin-bottom: 20px;
}

.modal__label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-muted);
}

.modal__input {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	color: var(--text);
	background: #fff;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.modal__input::placeholder {
	color: #b0b0b0;
}

.modal__input--otp {
	text-align: center;
	font-size: 1.25rem;
	letter-spacing: 0.35em;
	font-variant-numeric: tabular-nums;
	padding-left: 1.25rem;
}

.modal__input:focus {
	border-color: var(--purple);
	box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.modal__hint {
	margin: 0;
	padding-top: 8px;
	font-size: 0.8125rem;
	color: var(--text-light);
	line-height: 1.4;
}

.modal__btn {
	margin-top: 0;
}

body.modal-open {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 880px) {
	.checkout {
		flex-direction: column;
		max-width: none;
	}

	.checkout__summary {
		flex: none;
		max-width: none;
		width: 100%;
		padding: 20px 24px 28px;
	}

	.summary__header {
		margin-bottom: 24px;
	}

	.summary__body {
		flex: none;
	}

	.summary__breakdown {
		flex: none;
		justify-content: flex-start;
		max-width: none;
		margin-left: 0;
		margin-right: 0;
		padding-top: 24px;
	}

	.summary__amount {
		font-size: 2.25rem;
	}

	.checkout__form-panel {
		padding: 32px 24px 100px;
		width: 100%;
		height: 100%;
	}

	.card-field__row {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
	}

	.card-field__cvc {
		grid-column: 1 / -1;
		border-left: none;
		border-top: 1px solid var(--border);
	}
}
