/* WooCommerce WhatsApp Checkout Pro — front end */

.wwcp-wrap {
	margin: 14px 0 0;
}

.wwcp-wrap-product {
	display: inline-block;
	margin: 0 0 0 8px;
	vertical-align: middle;
}

.wwcp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	line-height: 1.2;
	text-decoration: none;
	background: var(--wwcp-bg, #25d366);
	color: var(--wwcp-color, #fff);
	border-radius: var(--wwcp-radius, 6px);
	font-size: var(--wwcp-font-size, 16px);
	font-weight: var(--wwcp-weight, 600);
	padding: var(--wwcp-padding, 14px) 24px;
	transition: background-color .18s ease, transform .12s ease, opacity .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wwcp-button.wwcp-full {
	display: flex;
	width: 100%;
}

.wwcp-button:hover,
.wwcp-button:focus {
	background: var(--wwcp-bg-hover, #1da851);
	color: var(--wwcp-color, #fff);
}

.wwcp-button:focus-visible {
	outline: 3px solid rgba(0, 0, 0, .35);
	outline-offset: 2px;
}

.wwcp-button:active {
	transform: translateY(1px);
}

.wwcp-button[disabled],
.wwcp-button.is-busy {
	opacity: .65;
	cursor: progress;
}

.wwcp-icon {
	flex: 0 0 auto;
}

/* Spinner */
.wwcp-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wwcp-spin .7s linear infinite;
}

.wwcp-button.is-busy .wwcp-spinner,
.wwcp-modal-confirm.is-busy .wwcp-spinner {
	display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
	.wwcp-spinner { animation-duration: 2s; }
	.wwcp-button { transition: none; }
}

/* Number picker */
.wwcp-number-select {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
}

.wwcp-number-select span {
	display: block;
	margin-bottom: 4px;
	opacity: .8;
}

.wwcp-number-select select {
	width: 100%;
	padding: 8px;
}

/* Errors */
.wwcp-errors:empty {
	display: none;
}

.wwcp-errors {
	margin-top: 10px;
	padding: 10px 12px;
	border-left: 3px solid #c0392b;
	background: rgba(192, 57, 43, .07);
	color: #a02c1f;
	font-size: 14px;
}

.wwcp-errors ul {
	margin: 0;
	padding-left: 18px;
	list-style: disc;
}

.wwcp-fallback-link {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
	text-decoration: underline;
}

.wwcp-admin-warning {
	padding: 10px 12px;
	background: #fff4e5;
	border-left: 3px solid #f0a132;
	font-size: 14px;
}

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

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

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

.wwcp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 30, .6);
	backdrop-filter: blur(2px);
}

.wwcp-modal-box {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: 88vh;
	overflow: auto;
	background: #fff;
	color: #16232c;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	animation: wwcp-rise .22s ease;
}

@keyframes wwcp-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wwcp-modal-box { animation: none; }
}

.wwcp-modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #7a8b95;
	padding: 4px 8px;
}

.wwcp-modal-head {
	padding: 22px 24px 12px;
	border-bottom: 1px solid #eef1f3;
}

.wwcp-modal-head h2 {
	margin: 0 0 4px;
	font-size: 19px;
	line-height: 1.3;
}

.wwcp-modal-head p {
	margin: 0;
	font-size: 14px;
	color: #64757f;
}

.wwcp-modal-body {
	padding: 16px 24px;
}

.wwcp-summary-items {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.wwcp-summary-items li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #f2f4f6;
	font-size: 14px;
}

.wwcp-summary-thumb img {
	width: 42px;
	height: 42px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wwcp-summary-name {
	flex: 1 1 auto;
}

.wwcp-summary-name em {
	display: block;
	font-style: normal;
	color: #7a8b95;
	font-size: 13px;
}

.wwcp-summary-price {
	white-space: nowrap;
	font-weight: 600;
}

.wwcp-summary-totals {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 12px;
	margin: 0 0 14px;
	font-size: 14px;
}

.wwcp-summary-totals dt,
.wwcp-summary-totals dd {
	margin: 0;
}

.wwcp-summary-totals dd {
	text-align: right;
}

.wwcp-summary-totals .wwcp-total {
	font-weight: 700;
	font-size: 16px;
	padding-top: 8px;
	border-top: 1px solid #eef1f3;
}

.wwcp-summary-customer {
	font-size: 14px;
	background: #f7f9fa;
	border-radius: 8px;
	padding: 12px 14px;
}

.wwcp-summary-customer p {
	margin: 0 0 4px;
}

.wwcp-summary-customer p:last-child {
	margin-bottom: 0;
}

.wwcp-modal-foot {
	display: flex;
	gap: 10px;
	padding: 16px 24px 22px;
	border-top: 1px solid #eef1f3;
}

.wwcp-modal-cancel,
.wwcp-modal-confirm {
	flex: 1 1 auto;
	border: 0;
	cursor: pointer;
	border-radius: var(--wwcp-radius, 6px);
	padding: 13px 16px;
	font-size: 15px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.wwcp-modal-cancel {
	flex: 0 0 auto;
	background: #eef1f3;
	color: #45575f;
}

.wwcp-modal-confirm {
	background: var(--wwcp-accent, #25d366);
	color: #fff;
}

.wwcp-modal-confirm:hover {
	filter: brightness(.93);
}

body.wwcp-modal-open {
	overflow: hidden;
}

/* WhatsApp-only mode */
body.wwcp-only-mode #place_order {
	display: none !important;
}

@media (max-width: 480px) {
	.wwcp-modal { padding: 0; align-items: flex-end; }
	.wwcp-modal-box { max-width: none; border-radius: 14px 14px 0 0; max-height: 92vh; }
}
