/* Geo Router v0.3.3 — painel progressivo ancorado no campo Endereço nativo do CTC. */

/* CRÍTICO: display:flex nas classes abaixo vence o atributo [hidden] do HTML.
   Estas regras restauram o comportamento esperado de element.hidden = true. */
.gr-panel[hidden],
.gr-step[hidden],
.gr-ac-list[hidden],
.gr-step-choice[hidden],
.gr-step-confirm[hidden] { display: none !important; }

/* Campo nativo vira gatilho (readonly) */
.gr-native-address { /* campo digitável normal — autocomplete roda aqui */ }
.gr-native-filled { font-weight: 600; color: #1a7f37 !important; }

/* Painel que abre abaixo do campo */
.gr-panel {
	margin: 6px 0 4px; display: flex; flex-direction: column; gap: 8px;
	font-size: 15px; text-align: left;
}
/* Painel de conferência — Card B enxuto.
   !important vence o reset do CTC (.ht_ctc_chat_greetings_box :not(...) { padding:0 }). */
.gr-step-confirm {
	padding: 18px 16px 16px !important; background: #fff; border: 1px solid #ececec;
	border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05);
	animation: gr-in .15s ease-out;
}
@keyframes gr-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }

.gr-step { display: flex; flex-direction: column; gap: 8px; }

/* Espaça o botão do campo Endereço */
.gr-step-choice { margin-top: 18px; }

.gr-use-location {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; box-sizing: border-box;
	background: rgba(26,107,74,.07);
	color: #1a6b4a;
	border: 1px solid rgba(26,107,74,.18);
	border-radius: 10px;            /* mesma família do input, sem pílula */
	padding: 28px 18px;             /* altura dobrada */
	font-weight: 700;               /* negrito */
	font-size: 14px;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.gr-use-location svg { width: 17px; height: 17px; flex-shrink: 0; }
.gr-use-location:hover {
	background: rgba(26,107,74,.12);
	border-color: rgba(26,107,74,.30);
}

/* Blindagem contra reset de padding do Elementor/tema (0.2.0):
   sobe a especificidade + !important para vencer o botão base do Elementor. */
.gr-panel .gr-step-choice { margin-top: 9px !important; }
.gr-panel .gr-step-choice .gr-use-location {
	height: 36px !important;         /* 90% dos 40px do campo Endereço */
	padding: 0 18px !important;
	line-height: 1.2 !important;
	font-weight: 700 !important;     /* negrito */
}
.gr-panel .gr-step-choice .gr-use-location svg { stroke-width: 2.5 !important; }

/* .gr-or removido na 0.1.4 (campo de digitar vem primeiro, botão logo abaixo) */

.gr-ac-wrap { position: relative; }
.gr-panel input[type="text"] {
	width: 100%; box-sizing: border-box; padding: 11px 12px !important;
	border: 1px solid transparent; border-radius: 8px; font-size: 14px;
	background: #f4f5f4; color: #222;
}
.gr-panel input[type="text"]::placeholder { color: #aaa; }
.gr-panel input[type="text"]:focus {
	outline: none; background: #fff;
	border-color: #1a6b4a; box-shadow: 0 0 0 3px rgba(26,107,74,.12);
}

.gr-ac-list {
	position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 999999;
	border: 1px solid #e2e2e2; border-radius: 10px; background: #fff;
	overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.gr-ac-item {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 12px 16px 12px 12px !important; cursor: pointer;
	border-bottom: 1px solid #f2f2f2;
}
.gr-ac-item:last-child { border-bottom: 0; }
.gr-ac-item:hover { background: #f2f9f6; }
.gr-ac-pin {
	flex-shrink: 0; display: flex; align-items: center;
	height: 19px; color: #b8b8b8;   /* mesma altura da 1ª linha → alinha com ela */
}
.gr-ac-item:hover .gr-ac-pin { color: #1a6b4a; }
.gr-ac-pin svg { width: 17px; height: 17px; display: block; }
.gr-ac-txt { min-width: 0; }
.gr-ac-main {
	display: block; font-size: 14px; font-weight: 500; color: #222; line-height: 19px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gr-ac-sec {
	display: block; font-size: 12.5px; color: #888; line-height: 17px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gr-confirm-title {
	display: flex; align-items: center; gap: 7px;
	font-weight: 600; font-size: 13px; color: #222;
}
.gr-confirm-title svg { width: 16px; height: 16px; color: #1a6b4a; flex-shrink: 0; }
.gr-row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }

.gr-confirm-meta { display: flex; align-items: center; justify-content: space-between; }
.gr-cidade-uf { font-size: 12px; color: #999; }
.gr-back {
	background: none; border: 0; color: #1a6b4a; font-size: 12px; font-weight: 500;
	cursor: pointer; padding: 2px 4px; text-decoration: none;
}
.gr-back:hover { text-decoration: underline; }

.gr-confirm-btn {
	background: #1a6b4a; color: #fff; border: 0; border-radius: 999px;
	padding: 13px; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%;
}
.gr-confirm-btn:hover { background: #155d40; }
/* Blindagem contra reset de padding do Elementor (mesmo caso do botão GPS) */
.gr-panel .gr-step-confirm .gr-confirm-btn {
	padding: 13px 18px !important;
	height: auto !important;
	line-height: 1.2 !important;
}

.gr-msg { font-size: 13px; color: #666; min-height: 14px; }
/* Linha de status pós-confirmação: mensagem à esquerda, "Trocar endereço" à direita */
.gr-outside-row {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 12px; margin-top: 6px;
}
.gr-outside-row[hidden] { display: none !important; }
.gr-outside-msg { font-size: 13px; font-weight: 600; }
.gr-reopen {
	background: none; border: 0; padding: 0; cursor: pointer;
	font-size: 13px; color: #1a6b4a; text-decoration: underline;
	white-space: nowrap; flex-shrink: 0;
}
.gr-reopen:hover { color: #14543a; }
.gr-outside-msg.gr-ok { color: #1a7f37; }
.gr-outside-msg.gr-warn { color: #b26a00; }

/* Botão de envio do CTC travado até geo_status=resolved */
.gr-send-locked { opacity: .45 !important; pointer-events: none !important;
	filter: grayscale(.4); cursor: not-allowed !important; }
