/* Variables */
* {
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-content: center;
	height: 100vh;
	/* width: 100vw; */
}

form {
	width: 30vw;
	min-width: 500px;
	align-self: center;
	box-shadow:
		0px 0px 0px 0.5px rgba(50, 50, 93, 0.1),
		0px 2px 5px 0px rgba(50, 50, 93, 0.1),
		0px 1px 1.5px 0px rgba(0, 0, 0, 0.07);
	border-radius: 7px;
	padding: 40px;
	margin-top: auto;
	margin-bottom: auto;
}

#charge-title {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.5;
	margin-bottom: 10px;
}

#charge-description {
	margin-top: 16px;
	margin-bottom: 24px;
}

.hidden {
	display: none !important;
}

#payment-message {
	color: rgb(105, 115, 134);
	font-size: 16px;
	line-height: 20px;
	padding-top: 12px;
	text-align: center;
}

#payment-element {
	margin-bottom: 24px;
}

/* Buttons and links */
button {
	background: #0055de;
	font-family: Arial, sans-serif;
	color: #ffffff;
	border-radius: 4px;
	border: 0;
	padding: 12px 16px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: block;
	transition: all 0.2s ease;
	box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
	width: 100%;
}
button:hover {
	filter: contrast(115%);
}
button:disabled {
	opacity: 0.5;
	cursor: default;
}

/* spinner/processing state, errors */
.spinner,
.spinner:before,
.spinner:after {
	border-radius: 50%;
}
.spinner {
	color: #ffffff;
	font-size: 22px;
	text-indent: -99999px;
	margin: 0px auto;
	position: relative;
	width: 20px;
	height: 20px;
	box-shadow: inset 0 0 0 2px;
	-webkit-transform: translateZ(0);
	-ms-transform: translateZ(0);
	transform: translateZ(0);
}
.spinner:before,
.spinner:after {
	position: absolute;
	content: '';
}
.spinner:before {
	width: 10.4px;
	height: 20.4px;
	background: #0055de;
	border-radius: 20.4px 0 0 20.4px;
	top: -0.2px;
	left: -0.2px;
	-webkit-transform-origin: 10.4px 10.2px;
	transform-origin: 10.4px 10.2px;
	-webkit-animation: loading 2s infinite ease 1.5s;
	animation: loading 2s infinite ease 1.5s;
}
.spinner:after {
	width: 10.4px;
	height: 10.2px;
	background: #0055de;
	border-radius: 0 10.2px 10.2px 0;
	top: -0.1px;
	left: 10.2px;
	-webkit-transform-origin: 0px 10.2px;
	transform-origin: 0px 10.2px;
	-webkit-animation: loading 2s infinite ease;
	animation: loading 2s infinite ease;
}

/* Payment status page */
#payment-status {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	row-gap: 30px;
	width: 30vw;
	min-width: 500px;
	min-height: 380px;
	align-self: center;
	box-shadow:
		0px 0px 0px 0.5px rgba(50, 50, 93, 0.1),
		0px 2px 5px 0px rgba(50, 50, 93, 0.1),
		0px 1px 1.5px 0px rgba(0, 0, 0, 0.07);
	border-radius: 7px;
	padding: 40px;
	opacity: 0;
	animation: fadeInAnimation 1s ease forwards;
}

#status-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	width: 40px;
	border-radius: 50%;
}

h2 {
	margin: 0;
	color: #30313d;
	text-align: center;
}

a {
	text-decoration: none;
	font-size: 16px;
	font-weight: 600;
	font-family: Arial, sans-serif;
	display: block;
}
a:hover {
	filter: contrast(120%);
}

#details-table {
	overflow-x: auto;
	width: 100%;
}

table {
	width: 100%;
	font-size: 14px;
	border-collapse: collapse;
}
table tbody tr:first-child td {
	border-top: 1px solid #e6e6e6; /* Top border */
	padding-top: 10px;
}
table tbody tr:last-child td {
	border-bottom: 1px solid #e6e6e6; /* Bottom border */
}
td {
	padding-bottom: 10px;
}

.TableContent {
	text-align: right;
	color: #6d6e78;
}

.TableLabel {
	font-weight: 600;
	color: #30313d;
}

#view-details {
	color: #0055de;
}

#retry-button {
	text-align: center;
	background: #0055de;
	color: #ffffff;
	border-radius: 4px;
	border: 0;
	padding: 12px 16px;
	transition: all 0.2s ease;
	box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
	width: 100%;
}

@-webkit-keyframes loading {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}
@keyframes loading {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}
@keyframes fadeInAnimation {
	to {
		opacity: 1;
	}
}

@media only screen and (max-width: 600px) {
	form,
	#payment-status {
		width: 95vw;
		min-width: initial;
	}
}

.input-container {
	padding: 0 0 10px 0;
}

.input-label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.93rem;
	font-weight: 400;
	line-height: 1.15;
	color: #30313d;
}

.input-field {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	background: #ffffff;
	height: 40px;
	font-size: 16px;
	color: #30313d;
	transition: all 0.2s ease;
}

.input-field:focus {
	outline: none;
	border-color: #0055de;
	box-shadow: 0 1px 3px 0 #cfd7df;
}

.input-field::placeholder {
	color: #697386;
}

.secondary-button {
	background: #0055de;
	color: #ffffff;
	border-radius: 4px;
	border: 0;
	padding: 12px 16px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: block;
	transition: all 0.2s ease;
	box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
	width: 100%;
	margin-top: 10px;
	height: 44px;
}

.secondary-button:hover {
	filter: contrast(115%);
}

.secondary-button:disabled {
	opacity: 0.5;
	cursor: default;
}

#payment-section {
	margin-top: 20px;
}

.notice-text {
	color: #30313d;
	font-size: 14px;
	text-align: left;
	margin: 0;
	padding: 0;
	width: 100%;
}

#activation-notice {
	margin-bottom: 10px;
}

.price-summary {
	margin-top: 10px;
	margin-bottom: 15px;
	display: flex;
	justify-content: space-between;
	color: #30313d;
	font-size: 14px;
}

input[type='number'] {
	-moz-appearance: textfield;
}

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

.stripe-badge {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	margin: 4px 0 20px;
	opacity: 0.85;
}

.stripe-badge span {
	color: #697386;
	font-size: 12px;
	letter-spacing: -0.1px;
}

.stripe-logo {
	height: 20px;
	width: auto;
}

.stripe-badge:hover {
	opacity: 1;
}

.stripe-badge a {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.stripe-badge a:hover {
	opacity: 0.8;
}

.pre-order-notice {
	margin-top: 12px;
	color: #666;
	font-size: 14px;
	line-height: 1.4;
	border-top: 1px solid #f0f0f0;
	padding-top: 12px;
}

.pre-order-notice p {
	margin-bottom: 3px;
	margin-top: 0;
	font-weight: 500;
}

.notice-list {
	padding-left: 14px;
	margin-top: 0;
	margin-bottom: 0;
	line-height: 1.4;
	list-style-type: none;
}

.notice-list li {
	position: relative;
	margin-bottom: 1px;
	padding-left: 2px;
}

.notice-list li:before {
	content: '-';
	position: absolute;
	left: -10px;
}

.support-mail {
	color: #0055de;
	text-decoration: none;
	font-weight: inherit;
	font-size: inherit;
	font-family: inherit;
	display: inline;
	transition: all 0.2s ease;
}

.support-mail:hover {
	text-decoration: underline;
	color: #003ca0;
}

/* Apple Pay 和 Google Pay 按鈕樣式 */
.gpay-button,
.apple-pay-button {
	width: 100% !important;
	border-radius: 4px !important;
	margin: 10px 0 !important;
	height: 45px !important;
}

.apple-pay-button {
	-webkit-appearance: -apple-pay-button;
	-apple-pay-button-type: plain;
	-apple-pay-button-style: black;
}

.payment-tab-container {
	margin-bottom: 16px;
}

.payment-tab {
	transition: all 0.2s ease;
}

/* 確保Payment Element中的卡片表單風格一致 */
.__PrivateStripeElement {
	width: 100%;
}

/* 確保所有支付方式的按鈕風格統一 */
[data-stripe-tab] [role='button'] {
	border-radius: 4px !important;
	height: 45px !important;
	margin: 5px 0 !important;
}
