/* HB Commerce Rules — CP modal (B2C store) */

/* Contenedor: el reopen va en flujo; overlay y dialog son capa fija */
.hb-cp-block {
	position: relative;
}

/* Overlay (fondo oscuro) — solo visible cuando el modal está abierto */
.hb-cp-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	cursor: pointer;
}
.hb-cp-block.hb-cp-modal-open .hb-cp-overlay {
	display: block;
}

/* Cuadro del modal — centrado sobre el overlay */
.hb-cp-inner {
	display: none;
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 420px;
	z-index: 100001;
	padding: 1.5rem 1.5rem 1.25rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	cursor: default;
}
.hb-cp-block.hb-cp-modal-open .hb-cp-inner {
	display: block;
}

.hb-cp-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.hb-cp-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	flex: 1;
}
.hb-cp-close {
	display: none;
	margin: 0;
	padding: 0 0.5rem;
	min-width: 2rem;
	height: 2rem;
	line-height: 1;
	font-size: 1.75rem;
	font-weight: 400;
	color: #333;
	background: transparent;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
}
.hb-cp-block.hb-cp-allow-dismiss .hb-cp-close,
.hb-cp-block.hb-cp-can-dismiss .hb-cp-close,
.hb-cp-block.hb-cp-modal-open.hb-cp-allow-dismiss .hb-cp-close,
.hb-cp-block.hb-cp-modal-open.hb-cp-can-dismiss .hb-cp-close {
	display: inline-block;
}
.hb-cp-footer-actions {
	display: none;
	margin-top: 1rem;
	text-align: center;
}
.hb-cp-block.hb-cp-allow-dismiss .hb-cp-footer-actions,
.hb-cp-block.hb-cp-can-dismiss .hb-cp-footer-actions {
	display: block;
}
.hb-cp-continue-online {
	width: 100%;
}
.hb-cp-reopen {
	margin-top: 0.5rem;
}
.hb-cp-reopen .button-link {
	font-size: 0.9rem;
}
.hb-cp-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.hb-cp-input {
	flex: 1;
	min-width: 140px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 1rem;
}
.hb-cp-submit {
	padding: 0.5rem 1rem;
}
.hb-cp-result {
	margin-top: 0.75rem;
	min-height: 1.5em;
	font-size: 0.9rem;
}
.hb-cp-result.success { color: #0d6efd; }
.hb-cp-result.error { color: #dc3545; }

/* Segundo popup (tienda cercana): overlay e inner */
.hb-cp-second-overlay {
	z-index: 100002;
}
.hb-cp-second-inner {
	z-index: 100003;
}
.hb-cp-second-default {
	padding: 0.5rem 0;
}
.hb-cp-second-title {
	margin: 0 0 1rem;
	font-size: 1.1rem;
}
.hb-cp-second-actions {
	margin: 0 0 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.hb-cp-second-change {
	margin: 0;
	font-size: 0.9rem;
}

/* Estilo verde y blanco (footer / corporativo) */
.hb-cp-block.hb-cp-style-green .hb-cp-inner {
	background: #fff;
	border-top: 4px solid #2d5a27;
}
.hb-cp-block.hb-cp-style-green .hb-cp-title {
	color: #2d5a27;
}
.hb-cp-block.hb-cp-style-green .hb-cp-submit {
	background: #2d5a27;
	color: #fff;
	border-color: #2d5a27;
}
.hb-cp-block.hb-cp-style-green .hb-cp-submit:hover {
	background: #234a20;
	color: #fff;
}
.hb-cp-block.hb-cp-style-green .hb-cp-second-inner {
	background: #2d5a27;
	color: #fff;
	border: none;
}
.hb-cp-block.hb-cp-style-green .hb-cp-second-inner .hb-cp-second-title {
	color: #fff;
}
.hb-cp-block.hb-cp-style-green .hb-cp-second-inner .button {
	background: #fff;
	color: #2d5a27;
	border-color: #fff;
}
.hb-cp-block.hb-cp-style-green .hb-cp-second-inner .button-alt {
	background: transparent;
	color: #fff;
	border-color: #fff;
}
.hb-cp-block.hb-cp-style-green .hb-cp-second-inner .button-link {
	color: rgba(255,255,255,0.9);
}
