.wcwc-modal[hidden] {
	display: none !important;
}

.wcwc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.wcwc-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.62);
	backdrop-filter: blur(2px);
}

.wcwc-dialog {
	position: relative;
	width: min(560px, 100%);
	max-height: min(92vh, 820px);
	overflow: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	padding: 28px 24px 24px;
	color: #111827;
	font-family: inherit;
}

.wcwc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 4px 8px;
}

.wcwc-header h2 {
	margin: 0 0 8px;
	font-size: 1.45rem;
	line-height: 1.25;
}

.wcwc-intro {
	margin: 0 0 16px;
	color: #4b5563;
	font-size: 0.95rem;
}

.wcwc-cart-summary {
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 18px;
	font-size: 0.95rem;
}

.wcwc-cart-summary ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcwc-cart-summary li {
	display: block;
	padding: 8px 0;
	border-bottom: 1px solid #eef2f7;
}

.wcwc-item-main {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: flex-start;
}

.wcwc-item-name {
	font-weight: 600;
}

.wcwc-item-meta {
	margin-top: 4px;
	font-size: 0.85rem;
	color: #6b7280;
}

.wcwc-item-attributes {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	font-size: 0.85rem;
	color: #4b5563;
}

.wcwc-item-attributes li {
	padding: 2px 0;
}

.wcwc-item-attributes strong {
	font-weight: 600;
	color: #111827;
}

.wcwc-cart-summary li:last-child {
	border-bottom: 0;
}

.wcwc-cart-total {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #d1d5db;
	font-weight: 700;
}

.wcwc-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
}

.wcwc-form label,
.wcwc-full {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.88rem;
	font-weight: 600;
	color: #374151;
}

.wcwc-full {
	grid-column: 1 / -1;
}

.wcwc-form input,
.wcwc-form textarea {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	font-weight: 400;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
}

.wcwc-form input:focus,
.wcwc-form textarea:focus {
	outline: 2px solid #25d366;
	outline-offset: 1px;
	border-color: #25d366;
}

.wcwc-error {
	grid-column: 1 / -1;
	margin: 0;
	color: #b91c1c;
	background: #fef2f2;
	border-radius: 8px;
	padding: 8px 10px;
	font-weight: 500;
}

.wcwc-submit {
	grid-column: 1 / -1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	padding: 13px 18px;
	cursor: pointer;
	margin-top: 4px;
}

.wcwc-submit svg {
	width: 20px;
	height: 20px;
}

.wcwc-submit:hover,
.wcwc-submit:focus {
	background: #1fb855;
}

.wcwc-submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

body.wcwc-checkout-page form.checkout,
body.wcwc-checkout-page .woocommerce-checkout-review-order,
body.wcwc-checkout-page .woocommerce-form-coupon-toggle,
body.wcwc-checkout-page .woocommerce-form-login-toggle {
	display: none !important;
}

.wcwc-checkout-fallback {
	max-width: 560px;
	margin: 24px auto;
	padding: 24px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	text-align: center;
	background: #fff;
}

.wcwc-checkout-fallback .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #25d366 !important;
	border-color: #25d366 !important;
	color: #fff !important;
}

@media (max-width: 640px) {
	.wcwc-dialog {
		padding: 24px 16px 16px;
		border-radius: 14px;
	}

	.wcwc-form {
		grid-template-columns: 1fr;
	}
}
