.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.01);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 900;
	display: none;
	justify-content: center;
	align-items: flex-start;
	overflow-y: auto;
	padding: 20px 0;
}
.modal-overlay.open {
	display: flex;
	animation: modal-overlay-in 0.25s ease both;
}

.modal {
	width: 500px;
	max-width: calc(100vw - 30px);
	border-radius: 38px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: radial-gradient(#272727 0%, #161616 97%);
	overflow: hidden;
	display: none;
	margin: auto 0;
	flex-shrink: 0;
}
.modal.active {
	display: block;
	animation: modal-pop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modal-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes modal-pop-in {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.modal-overlay.open,
	.modal.active {
		animation: none;
	}
}

.modal__header {
	height: 115px;
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	margin: 15px;
	margin-bottom: 8px;
	padding: 35px 46px;
	position: relative;
	background: url('/assets/images/modal/header-bg.png') no-repeat center;
	background-size: cover;
	overflow: hidden;
}
.modal__header-label {
	font-size: 14px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.6);
	letter-spacing: -0.28px;
	line-height: 1;
}
.modal__header-name {
	font-size: 25px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.5px;
	margin-top: 1px;
	line-height: 30px;
}
.modal__close {
	position: absolute;
	top: 11px;
	right: 11px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}
.modal__close img {
	width: 30px;
	height: 30px;
}

.modal__body {
	margin: 0 15px 15px;
	padding: 26px;
	background: #212020;
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	position: relative;
	overflow: hidden;
}

.modal__input {
	width: 100%;
	height: 61px;
	background: #2c2c2c;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0 20px;
	font-family: 'Inter', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #ffffff;
	text-align: center;
	outline: none;
	transition: border-color 0.2s;
}
.modal__input::placeholder {
	color: #757575;
	font-weight: 700;
}
.modal__input:focus {
	border-color: rgba(255, 255, 255, 0.25);
}
.modal__input + .modal__input {
	margin-top: 10px;
}

.modal__field-error + .modal__input {
	margin-top: 10px;
}

.modal__field-error {
	display: grid;
	grid-template-rows: 0fr;
	overflow: hidden;
	opacity: 0;

	margin-top: 0;
	transition:
		grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1),
		opacity 0.2s ease,
		margin-top 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal__field-error.visible {
	grid-template-rows: 1fr;
	opacity: 1;
	margin-top: 10px;
}
.modal__field-error__inner {
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	padding: 13px 16px;
	background: linear-gradient(180deg, rgba(231, 108, 3, 0.14) 0%, rgba(231, 108, 3, 0.08) 100%);
	border: 1px solid rgba(231, 108, 3, 0.4);
	border-radius: 16px;
	font-size: 13px;
	font-weight: 700;
	line-height: 17px;
	letter-spacing: -0.1px;
	color: #f5b079;
	text-align: center;
}
.modal__field-error__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
}

.modal__input--invalid {
	border-color: rgba(231, 108, 3, 0.6);
	box-shadow: 0 0 0 3px rgba(231, 108, 3, 0.12);
}
.modal__input--invalid:focus {
	border-color: rgba(231, 108, 3, 0.8);
}

.modal__amount-row {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}
.modal__amount-row .modal__input {
	margin-top: 0;
	flex: 1 1 0;
	min-width: 0;
}
.modal__input--qty-result {
	cursor: default;
}

.modal__discount {
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0;
	margin-top: 20px;
	border-top: 1px solid #2f2f2f;
	border-bottom: 1px solid #2f2f2f;
}
.modal__discount.visible {
	display: flex;
}
.modal__discount-left {
	display: flex;
	align-items: center;
	gap: 8px;
}
.modal__discount-percent {
	color: #e76c03;
	font-size: 16px;
	font-weight: 700;
}
.modal__discount-text {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
}
.modal__discount-value {
	font-size: 16px;
	font-weight: 700;
	color: #e76c03;
}

.modal__bottom {
	display: flex;
	align-items: center;
	margin-top: 16px;
	height: 70px;
	background: #242424;
	border-radius: 20px;
	overflow: hidden;
}
.modal__total {
	display: flex;
	flex-direction: column;
	gap: 2px;

	min-width: 150px;
	align-items: center;
}
.modal__total-label {
	font-size: 12px;
	font-weight: 600;
	color: #ffffff;
	letter-spacing: -0.6px;
}
.modal__total-price {
	font-size: 18.6px;
	font-weight: 600;
	color: #ffffff;
	letter-spacing: -0.6px;
}
.modal__submit-btn {
	flex: 1;
	height: 100%;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	font-size: 17px;
	font-weight: 700;
	color: #000000;
	cursor: pointer;
	transition: opacity 0.2s;
}
.modal__submit-btn:hover {
	opacity: 0.85;
}

.modal__disclaimer {
	margin-top: 20px;
	font-size: 12px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.5);
	text-align: center;
	line-height: 15px;
	letter-spacing: 0.12px;
}
.modal__disclaimer-orange {
	color: #e76c03;
}
.modal__disclaimer-link {
	color: #F07309;
	text-decoration: underline;
	font-weight: 700;
}

.modal-payment__body {
	margin: 15px;
	padding: 26px;
	background: #212020;
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	position: relative;
}

.modal-payment__title {
	font-size: 20px;
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 30px;
}
.modal-payment__close {
	position: absolute;
	top: 11px;
	right: 11px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}
.modal-payment__close img {
	width: 30px;
	height: 30px;
}

.modal-payment__methods {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.payment-card {
	background: #2c2c2c;
	border-radius: 16px;
	padding: 18px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: border-color 0.35s ease, background-color 0.35s ease,
		box-shadow 0.35s ease,
		transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	will-change: transform;
}
.payment-card--disabled,
.payment-card[data-disabled] {
	background: #232323;
	opacity: 0.55;
	cursor: not-allowed;
	filter: grayscale(1);
	pointer-events: none;
}
.payment-card--disabled .payment-card__name,
.payment-card[data-disabled] .payment-card__name {
	color: rgba(255, 255, 255, 0.4);
}
.payment-card--disabled .payment-card__logo,
.payment-card--disabled .payment-card__icon img,
.payment-card[data-disabled] .payment-card__logo,
.payment-card[data-disabled] .payment-card__icon img {
	opacity: 0.5;
}

.payment-card:not(.payment-card--disabled):not(.active):hover {
	border-color: rgba(255, 255, 255, 0.15);
	transform: translateY(-3px);
}
.payment-card:not(.payment-card--disabled):active {
	transform: scale(0.97);
	transition: transform 0.12s ease;
}
.payment-card.active {
	border-color: rgba(255, 255, 255, 0.7);
	background: #383838;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15),
		0 10px 26px rgba(0, 0, 0, 0.38);
	transform: translateY(-3px);
}
.payment-card--recommended {
	background: #393939;
}
.payment-card--recommended.active {
	background: #434343;
}

.payment-card__icon {
	position: relative;
	display: flex;
	align-items: center;
	height: 30px;
	margin-bottom: 12px;
	transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.payment-card.active .payment-card__icon {
	transform: scale(1.08);
}
.payment-card__icon img {
	height: 30px;
	width: auto;
}
.payment-card__logo {
	height: 30px;
	width: auto;
	opacity: 0;
	transform: translateY(5px) scale(0.9);
	filter: blur(1.5px);
	transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		filter 0.42s ease;
}
.payment-card__logo.visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	filter: blur(0);
}
.payment-card__status {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 10px;
	height: 10px;
	animation: paymentDotPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes paymentDotPop {
	0% {
		opacity: 0;
		transform: scale(0);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}
.payment-card__name {
	font-size: 13px;
	font-weight: 500;
	color: #ffffff;
}
.payment-card__desc {
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.5);
	margin-top: 2px;
}
.payment-card__desc--orange {
	color: #e76c03;
}

.payment-methods__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.payment-card--full {
	grid-column: 1 / -1;
}

.modal-payment__email {
	width: 100%;
	height: 65px;
	background: #2c2c2c;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0 20px;
	font-family: 'Inter', sans-serif;
	font-size: 17px;
	font-weight: 500;
	color: #ffffff;
	text-align: center;
	outline: none;
	margin-top: 16px;
	transition: border-color 0.2s;
}
.modal-payment__email::placeholder {
	color: #757575;
	font-weight: 500;
}
.modal-payment__email:focus {
	border-color: rgba(255, 255, 255, 0.25);
}

.modal-payment__pay-btn {
	width: 100%;
	height: 67px;
	background: #ffffff;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 17px;
	font-weight: 500;
	color: #000000;
	cursor: pointer;
	margin-top: 8px;
	transition: opacity 0.2s;
}
.modal-payment__pay-btn:hover {
	opacity: 0.85;
}

.modal-payment__disclaimer {
	margin-top: 20px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.5);
	text-align: center;
	line-height: 15px;
	letter-spacing: 0.12px;
}

.modal-payment__reward-notice {
	margin: 12px 0;
	padding: 11px 13px;
	border: 1px solid rgba(240, 115, 9, 0.55);
	border-radius: 8px;
	background: rgba(240, 115, 9, 0.09);
	color: #f1f1f1;
	font-size: 12px;
	line-height: 1.4;
}

.modal-payment__reward-notice--command {
	display: block;
	margin-top: 14px;
}
.modal-payment__disclaimer-orange {
	color: #e76c03;
}
.modal-payment__disclaimer-link {
	color: #F07309;
	text-decoration: underline;
	font-weight: 500;
}

.modal-command__body {
	position: relative;
	margin: 15px;
	padding: 26px;
	background: #212020;
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-command__title {
	font-size: 20px;
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 20px;
}
.modal-command__close {
	position: absolute;
	top: 11px;
	right: 11px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}
.modal-command__close img {
	width: 30px;
	height: 30px;
}
.modal-command__text {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	line-height: 19px;
	margin-bottom: 16px;
}
.modal-command__code {
	display: flex;
	align-items: center;
	background: #2c2c2c;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 16px 18px;
}
.modal-command__code-value {
	display: block;
	width: 100%;
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: 0.2px;
	color: #ffffff;
	word-break: break-all;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
	user-select: all;
	-webkit-user-select: all;
	text-align: center;
}
.modal-command__copy-btn {
	display: block;
	width: 100%;
	height: 48px;
	margin-top: 10px;
	padding: 0 18px;
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #000000;
	cursor: pointer;
	transition: opacity 0.2s;
}
.modal-command__copy-btn:hover {
	opacity: 0.85;
}
.modal-command__hint {
	margin-top: 16px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.5);
	line-height: 15px;
}
.modal-command__status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 500;
}
.modal-command__status-label {
	color: rgba(255, 255, 255, 0.7);
}
.modal-command__status-value {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #e7a33e;
	font-weight: 600;
}
.modal-command__status-value::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e7a33e;
	box-shadow: 0 0 6px rgba(231, 163, 62, 0.7);
}
.modal-command__status--paid .modal-command__status-value {
	color: #2ec77e;
}
.modal-command__status--paid .modal-command__status-value::before {
	background: #2ec77e;
	box-shadow: 0 0 8px rgba(46, 199, 126, 0.9);
}
.modal-command__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	padding: 14px 18px;
	background: #2c2c2c;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-command__total-left {
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.modal-command__total-label {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
}
.modal-command__total-price {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: #ffffff;
}
.modal-command__total-unit {
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
}
.modal-command__details {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 16px;
	padding: 14px 18px;
	background: #2c2c2c;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-command__detail-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.modal-command__detail-label {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	flex-shrink: 0;
}
.modal-command__detail-value {
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	text-align: right;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.modal-command__support {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	padding: 16px 18px;
	background: rgba(46, 199, 126, 0.08);
	border-radius: 16px;
	border: 1px solid rgba(46, 199, 126, 0.2);
	text-align: center;
}
.modal-command__support-text {
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	line-height: 18px;
}
.modal-command__support-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 44px;
	padding: 0 18px;
	background: #2ec77e;
	border-radius: 14px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #0b1f16;
	text-decoration: none;
	transition: opacity 0.2s;
}
.modal-command__support-btn:hover {
	opacity: 0.88;
}
.modal-command__support-btn svg {
	flex-shrink: 0;
}

@media (max-width: 580px) {
	.modal-command__body {
		margin: 10px;
		padding: 20px;
		border-radius: 22px;
	}
	.modal-command__title {
		font-size: 18px;
	}
	.modal-command__code {
		border-radius: 16px;
	}
	.modal-command__code-value {
		font-size: 14px;
	}
}

.modal-success__body {
	position: relative;
	margin: 15px;
	padding: 48px 40px 44px;
	border-radius: 28px;
	border: 1px solid rgba(46, 199, 126, 0.25);
	background: radial-gradient(120% 120% at 50% 0%, rgba(46, 199, 126, 0.16) 0%, rgba(22, 22, 22, 0) 60%), #161616;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.modal-success__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s;
}
.modal-success__close:hover {
	opacity: 1;
}
.modal-success__close img {
	width: 100%;
	height: 100%;
}

.modal-success__check {
	width: 96px;
	height: 96px;
	margin-bottom: 24px;
}
.modal-success__check svg {
	width: 100%;
	height: 100%;
}
.modal-success__check-circle {
	stroke: #2ec77e;
	stroke-width: 3;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
}
.modal-success__check-mark {
	stroke: #2ec77e;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
}
.modal-success--play .modal-success__check-circle {
	animation: successCircle 0.5s ease-out forwards;
}
.modal-success--play .modal-success__check-mark {
	animation: successMark 0.35s 0.45s ease-out forwards;
}
@keyframes successCircle {
	to { stroke-dashoffset: 0; }
}
@keyframes successMark {
	to { stroke-dashoffset: 0; }
}

.modal-success__title {
	font-size: 26px;
	font-weight: 700;
	color: #2ec77e;
	letter-spacing: -0.5px;
	margin-bottom: 12px;
}
.modal-success__text {
	font-size: 15px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	line-height: 21px;
	max-width: 320px;
}

@media (max-width: 580px) {
	.modal-success__body {
		margin: 10px;
		padding: 40px 24px 36px;
		border-radius: 22px;
	}
	.modal-success__check {
		width: 80px;
		height: 80px;
		margin-bottom: 20px;
	}
	.modal-success__title {
		font-size: 22px;
	}
	.modal-success__text {
		font-size: 14px;
	}

	.modal {
		width: 100%;
		max-width: calc(100vw - 20px);
		border-radius: 28px;
	}
	.modal__header {
		height: 95px;
		border-radius: 22px;
		margin: 10px;
		margin-bottom: 10px;
		padding: 25px 30px;
	}
	.modal__header-name {
		font-size: 22px;
	}
	.modal__body {
		margin: 0 10px 10px;
		padding: 20px;
		border-radius: 22px;
	}
	.modal__input {
		height: 54px;
		font-size: 15px;
		border-radius: 16px;
	}
	.modal__bottom {
		height: 60px;
		border-radius: 16px;
	}
	.modal__total {

		min-width: 100px;
	}
	.modal__total-price {
		font-size: 16px;
	}
	.modal__submit-btn {
		font-size: 15px;
		border-radius: 16px;
	}

	.modal-payment__body {
		margin: 10px;
		padding: 20px;
		border-radius: 22px;
	}
	.modal-payment__title {
		font-size: 18px;
		margin-bottom: 20px;
	}
	.payment-card {
		padding: 14px;
		border-radius: 14px;
	}
	.payment-card__icon {
		height: 24px;
		margin-bottom: 8px;
	}
	.payment-card__icon img {
		height: 24px;
	}
	.modal-payment__email {
		height: 54px;
		font-size: 15px;
		border-radius: 16px;
	}
	.modal-payment__pay-btn {
		height: 56px;
		font-size: 15px;
		border-radius: 16px;
	}
}

@media (max-width: 400px) {
	.modal__header {
		height: 85px;
		padding: 20px 24px;
	}
	.modal__header-label {
		font-size: 12px;
	}
	.modal__header-name {
		font-size: 20px;
	}
	.modal__close {
		width: 26px;
		height: 26px;
		top: 8px;
		right: 8px;
	}
	.modal__close img {
		width: 26px;
		height: 26px;
	}
	.payment-methods__grid {
		grid-template-columns: 1fr;
	}
	.modal__amount-row {
		flex-direction: column;
	}
	.modal__amount-row .modal__input {
		flex: inherit
	}
}
