/**
 * Pedidos por WhatsApp — Estilos del frontend
 */

/* Icono del botón "Enviar pedido" */
.wapp-icon-send {
	margin-right: 4px;
	vertical-align: -2px;
}

/* Botón de Caddy renombrado: alineación coherente con su estilo original */
.cc-cart-actions .cc-button.cc-button-primary {
	cursor: pointer;
}

/* ------------------------------------------------------------
   Overlay / Modal de confirmación de pedido
------------------------------------------------------------ */
.wapp-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wapp-modal {
	background: #fff;
	width: 420px;
	max-width: 94vw;
	max-height: 90vh;
	overflow: auto;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	padding: 20px;
	position: relative;
}

.wapp-modal h3 {
	margin-top: 0;
	font-size: 18px;
}

.wapp-close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}

/* Resumen de productos */
.wapp-summary h4 {
	margin: 4px 0 8px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #666;
}

.wapp-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 8px;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

.wapp-item-name {
	flex: 1 1 auto;
	margin-right: auto;
}

.wapp-item-qty {
	background: #eaf5ec;
	color: #128c4b;
	border-radius: 12px;
	padding: 0 8px;
	font-weight: 600;
	font-size: 12px;
	margin-left: 6px;
}

.wapp-item-price {
	font-weight: 600;
	margin-left: 8px;
	white-space: nowrap;
}

.wapp-empty {
	padding: 14px;
	color: #b32d2e;
	text-align: center;
}

/* Totales */
.wapp-totals {
	margin: 10px 0 14px;
}

.wapp-totals div {
	display: flex;
	justify-content: space-between;
	padding: 4px 8px;
	font-size: 14px;
}

.wapp-totals .wapp-grand {
	font-size: 16px;
	font-weight: 700;
	border-top: 2px solid #1fad3f;
	margin-top: 4px;
}

/* Formulario */
.wapp-form label {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
}

.wapp-form input[type="text"],
.wapp-form input[type="tel"],
.wapp-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 9px 10px;
	margin-top: 4px;
	font-size: 14px;
}

.wapp-form textarea {
	resize: vertical;
}

.wapp-req {
	color: #d54e21;
}

.wapp-msg {
	margin: 8px 0;
	font-size: 13px;
}

.wapp-msg.wapp-error {
	color: #b32d2e;
}

.wapp-msg.wapp-ok {
	color: #128c4b;
	font-weight: 600;
}

.wapp-actions-buttons {
	display: flex;
	gap: 10px;
}

.wapp-submit,
.wapp-cancel {
	border: 0;
	border-radius: 6px;
	padding: 11px 16px;
	font-size: 15px;
	cursor: pointer;
}

.wapp-submit {
	background: #1fad3f; /* verde WhatsApp */
	color: #fff;
	flex: 1 1 auto;
}

.wapp-submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.wapp-cancel {
	background: #f1f1f1;
	color: #444;
}

/* Responsive */
@media (max-width: 520px) {
	.wapp-modal {
		width: 100%;
		max-width: 100%;
		padding: 16px;
	}
}