/* =========================================================
   Custom Modal Button Widget - Estilos
   ========================================================= */

.cmwm-wrap {
	position: relative;
}

/* Botão gatilho */
.cmwm-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #0a1f44;
	color: #ffffff;
	border: none;
	cursor: pointer;
	font-size: 24px;
	padding: 0;
	line-height: 1;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.cmwm-trigger:hover {
	transform: scale(1.05);
}

.cmwm-trigger svg,
.cmwm-trigger i {
	width: 1em;
	height: 1em;
	font-size: inherit;
}

/* Quando fixo, o botão fica grudado na tela */
.cmwm-wrap.cmwm-fixed .cmwm-trigger {
	position: fixed;
	z-index: 999998;
}

.cmwm-trigger.cmwm-pos-bottom-right { right: 24px; bottom: 24px; }
.cmwm-trigger.cmwm-pos-bottom-left  { left: 24px;  bottom: 24px; }
.cmwm-trigger.cmwm-pos-top-right    { right: 24px; top: 24px; }
.cmwm-trigger.cmwm-pos-top-left     { left: 24px;  top: 24px; }

/* Some o botão gatilho quando o modal está aberto */
.cmwm-wrap.cmwm-open .cmwm-trigger {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* Overlay transparente, apenas para permitir fechar clicando fora */
.cmwm-overlay {
	position: fixed;
	inset: 0;
	background: transparent;
	z-index: 999997;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cmwm-wrap.cmwm-open .cmwm-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Painel do modal */
.cmwm-modal {
	position: fixed;
	width: calc(100% - 32px);
	max-width: 400px;
	margin: 16px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
	max-height: calc(100% - 32px);
	overflow-y: auto;
}

.cmwm-modal.cmwm-pos-bottom-right { right: 0; bottom: 0; transform: translateY(24px); }
.cmwm-modal.cmwm-pos-bottom-left  { left: 0;  bottom: 0; transform: translateY(24px); }
.cmwm-modal.cmwm-pos-top-right    { right: 0; top: 0;    transform: translateY(-24px); }
.cmwm-modal.cmwm-pos-top-left     { left: 0;  top: 0;    transform: translateY(-24px); }

.cmwm-wrap.cmwm-open .cmwm-modal {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.cmwm-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	color: #1a1a1a;
	font-size: 18px;
	line-height: 1;
	padding: 4px;
	z-index: 1;
}

.cmwm-close svg,
.cmwm-close i {
	width: 1em;
	height: 1em;
	font-size: inherit;
}

.cmwm-modal-body {
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	text-align: left;
}

.cmwm-logo {
	margin-bottom: 28px;
}

.cmwm-logo img {
	width: 160px;
	height: auto;
	display: block;
}

.cmwm-heading {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
}

.cmwm-address {
	margin-bottom: 14px;
}

.cmwm-line {
	margin: 0 0 6px 0;
	font-size: 15px;
	color: #4a4a4a;
	line-height: 1.5;
}

.cmwm-line a {
	color: inherit;
	text-decoration: none;
}

.cmwm-line a:hover {
	text-decoration: underline;
}

.cmwm-email {
	margin-bottom: 6px;
}

.cmwm-phone {
	margin-bottom: 28px;
}

.cmwm-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 22px;
	background-color: #0a1f44;
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 500;
	transition: opacity 0.15s ease;
}

.cmwm-cta:hover {
	opacity: 0.85;
}

.cmwm-cta svg,
.cmwm-cta i {
	width: 1em;
	height: 1em;
	font-size: 0.9em;
}

/* Impede rolagem do body quando o modal está aberto */
body.cmwm-no-scroll {
	overflow: hidden;
}

/* Telas pequenas: modal ocupa a largura quase toda, sempre no rodapé */
@media (max-width: 480px) {
	.cmwm-modal {
		width: calc(100% - 24px);
		margin: 12px;
		max-height: calc(100% - 24px);
	}
}
