/* Woo COD Checkout — Frontend styles */

.wcc-buttons-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 16px 0;
}

.wcc-btn {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-style: solid;
	transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
	line-height: 1.2;
}

.wcc-btn:hover {
	transform: translateY(-1px);
}

.wcc-btn:active {
	transform: translateY(0);
}

.wcc-buy-now-btn {
	background: #2c3338;
	color: #fff;
}

/* ---------- Modal overlay ---------- */

.wcc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	backdrop-filter: blur(2px);
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.wcc-modal-overlay[hidden] {
	display: none;
}

@media (min-width: 640px) {
	.wcc-modal-overlay {
		align-items: center;
	}
}

.wcc-modal {
	background: #fff;
	width: 100%;
	max-width: 480px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 16px 16px 0 0;
	padding: 24px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	animation: wcc-modal-in .25s ease;
}

@media (min-width: 640px) {
	.wcc-modal {
		border-radius: 16px;
	}
}

@keyframes wcc-modal-in {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}

.wcc-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #f1f5f9;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #334155;
}

.wcc-modal-title {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 700;
	padding-right: 32px;
}

.wcc-product-summary {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #f8fafc;
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 20px;
}

.wcc-product-summary img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
}

.wcc-product-summary-info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.wcc-product-name {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wcc-product-price {
	color: #475569;
	font-size: 14px;
}

.wcc-qty-control {
	display: flex;
	align-items: center;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.wcc-qty-btn {
	background: #fff;
	border: none;
	width: 30px;
	height: 30px;
	font-size: 16px;
	cursor: pointer;
}

.wcc-qty-input {
	width: 40px;
	text-align: center;
	border: none;
	border-left: 1px solid #e2e8f0;
	border-right: 1px solid #e2e8f0;
	height: 30px;
	-moz-appearance: textfield;
}

.wcc-form-row {
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wcc-form-row label {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.wcc-required {
	color: #dc2626;
}

.wcc-form-row input,
.wcc-form-row select,
.wcc-form-row textarea {
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	width: 100%;
	box-sizing: border-box;
}

.wcc-form-row input:focus,
.wcc-form-row select:focus,
.wcc-form-row textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.wcc-form-row textarea {
	min-height: 70px;
	resize: vertical;
}

.wcc-form-row.wcc-has-error input,
.wcc-form-row.wcc-has-error select,
.wcc-form-row.wcc-has-error textarea {
	border-color: #dc2626;
}

.wcc-field-error {
	font-size: 12px;
	color: #dc2626;
	min-height: 14px;
}

.wcc-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 0;
	border-top: 1px dashed #e2e8f0;
	margin-bottom: 16px;
	font-size: 16px;
}

.wcc-form-error-summary {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 14px;
	font-size: 14px;
}

.wcc-submit-btn {
	width: 100%;
}

.wcc-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wcc-spin .7s linear infinite;
}

@keyframes wcc-spin {
	to { transform: rotate(360deg); }
}

.wcc-success-message {
	text-align: center;
	padding: 24px 8px;
}

.wcc-success-icon {
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	font-size: 26px;
	margin: 0 auto 12px;
	animation: wcc-pop .3s ease;
}

@keyframes wcc-pop {
	from { transform: scale(.5); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
	.wcc-modal {
		padding: 18px;
	}
}
