/* Infraest — Assistente de agendamento */

/* Esconde o título da página ("Agendar Serviço") nesta página
   (este CSS só é carregado onde o shortcode [infraest_agendamento] existe) */
.page-header,
.page-header .entry-title { display: none !important; }

.iag {
	--navy: #29283a;
	--gold: #d6a76f;
	--green: #22c55e;
	--bg: #fff;
	--line: #e2e8f0;
	max-width: 760px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--navy);
}

/* Etapas */
.iag-steps { display: flex; gap: 0; margin-bottom: 34px; }
.iag-step {
	flex: 1; text-align: center; font-size: 1.2rem; font-weight: 600; color: #aaa;
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.iag-step span {
	width: 46px; height: 46px; border-radius: 50%; background: var(--line); color: #888;
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; transition: .3s;
}
.iag-step--active { color: var(--navy); }
.iag-step--active span { background: var(--navy); color: #fff; }
.iag-step--done { color: var(--green); }
.iag-step--done span { background: var(--green); color: #fff; }
.iag-step:not(:last-child)::after {
	content: ''; position: absolute; top: 23px; left: calc(50% + 23px); right: calc(-50% + 23px);
	height: 2px; background: var(--line);
}
.iag-step--done:not(:last-child)::after { background: var(--green); }

/* Painéis */
.iag-panel { display: none; animation: iag-fade .35s ease; }
.iag-panel--active { display: block; }
@keyframes iag-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.iag-title { font-size: 2.8rem; font-weight: 700; margin: 0 0 24px; color: var(--navy); line-height: 1.2; }
.iag-subtitle { font-size: 2rem; font-weight: 700; margin: 30px 0 14px; }

.iag-label { display: block; font-size: 1.55rem; font-weight: 600; margin: 22px 0 8px; }
.iag-label span { color: #e11d48; }
.iag-input {
	width: 100%; box-sizing: border-box; padding: 18px 20px; border: 1px solid var(--line);
	border-radius: 12px; font-size: 1.55rem; background: #fff; transition: border-color .15s;
}
.iag-input:focus { outline: none; border-color: var(--navy); }
.iag-hint { font-size: 1.25rem; color: #888; margin: 8px 0 0; }
.iag-desc {
	background: #f8fafc; border-left: 4px solid var(--gold); border-radius: 6px;
	padding: 16px 18px; font-size: 1.4rem; color: #475569; margin: 12px 0 0; line-height: 1.55;
}
.iag-aviso {
	background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px;
	padding: 18px 20px; font-size: 1.45rem; color: #166534; margin: 26px 0 0;
}

/* Botões */
.iag-btn {
	display: inline-block; border: none; border-radius: 12px; padding: 20px 32px;
	font-size: 1.6rem; font-weight: 600; cursor: pointer; transition: .15s; margin-top: 26px;
}
.iag-btn--primary,
.iag-btn--primary:hover,
.iag-btn--primary:focus,
.iag-btn--primary:active { background: var(--navy) !important; color: #fff !important; width: 100%; }
.iag-btn--primary:hover { background: #1b1a28 !important; }
.iag-btn--primary:disabled { opacity: .6; cursor: default; }
.iag-btn--ghost,
.iag-btn--ghost:hover,
.iag-btn--ghost:focus,
.iag-btn--ghost:active { background: #f1f5f9 !important; color: var(--navy) !important; }
.iag-btn--ghost:hover { background: #e2e8f0 !important; }
.iag-row { display: flex; gap: 14px; }
.iag-row .iag-btn--ghost { width: 40%; }
.iag-row .iag-btn--primary { width: 60%; }
.iag-back-3 { width: auto; padding: 14px 24px; font-size: 1.4rem; }

/* Erros */
.iag-error {
	background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
	border-radius: 10px; padding: 15px 18px; font-size: 1.4rem; margin-top: 18px;
}

/* Loading */
.iag-loading { text-align: center; padding: 50px 0; color: #666; font-size: 1.5rem; }
.iag-spinner {
	width: 46px; height: 46px; border: 5px solid var(--line); border-top-color: var(--navy);
	border-radius: 50%; margin: 0 auto 16px; animation: iag-spin .8s linear infinite;
}
.iag-spinner--sm { width: 30px; height: 30px; border-width: 3px; margin: 16px auto; }
@keyframes iag-spin { to { transform: rotate(360deg); } }

/* Orçamento */
.iag-orcamento {
	background: #fff; border: 1px solid var(--line); border-radius: 16px;
	padding: 26px 28px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.iag-orc-linha {
	display: flex; justify-content: space-between; align-items: center;
	padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.55rem;
}
.iag-orc-total {
	display: flex; justify-content: space-between; align-items: center;
	padding: 20px 0 4px; font-size: 1.9rem;
}
.iag-orc-total strong { color: var(--green); font-size: 2.6rem; }

/* Resumo do pedido (etapa 4) */
.iag-resumo {
	background: #f8fafc; border: 1px solid var(--line); border-radius: 14px;
	padding: 20px 24px; margin-bottom: 8px;
}
.iag-resumo-linha {
	display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
	padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 1.4rem;
}
.iag-resumo-linha:last-of-type { border-bottom: none; }
.iag-resumo-linha span { color: #64748b; white-space: nowrap; }
.iag-resumo-linha strong { text-align: right; color: var(--navy); font-weight: 600; }
.iag-resumo-total {
	display: flex; justify-content: space-between; align-items: center;
	padding: 16px 0 2px; margin-top: 6px; border-top: 2px solid var(--line); font-size: 1.6rem;
}
.iag-resumo-total strong { color: var(--green); font-size: 2.1rem; }

/* Mapa */
.iag-mapa-wrap { margin-top: 28px; }
.iag-mapa { width: 100%; height: 320px; border-radius: 16px; border: 1px solid var(--line); }
.iag-mapa-msg { font-size: 1.35rem; color: #475569; margin: 12px 0 0; line-height: 1.55; }

/* Agenda */
.iag-slots { display: block; }

/* ── Calendário novo layout (calendário | slots side-by-side) ── */
.iag-cal-wrap {
	display: flex; border: 1px solid var(--line); border-radius: 16px;
	overflow: hidden; margin-top: 8px; background: #fff;
}
.iag-cal-panel {
	flex: 0 0 auto; width: 360px; padding: 18px 16px;
	border-right: 1px solid var(--line);
}
.iag-cal-slots-panel {
	flex: 1 1 auto; padding: 18px 20px; min-width: 0;
}

.iag-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.iag-cal-titulo { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.iag-cal-nav {
	width: 34px; height: 34px; border: 1px solid var(--line); background: #fff;
	border-radius: 8px; font-size: 1.3rem; cursor: pointer; color: var(--navy);
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.iag-cal-nav:disabled { opacity: .3; cursor: default; }

.iag-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.iag-cal-dow {
	text-align: center; font-size: .85rem; font-weight: 700; color: #94a3b8;
	padding: 0 0 8px; text-transform: uppercase;
}

/* Célula de dia */
.iag-cal-day {
	border: none; background: transparent; border-radius: 50%;
	width: 42px; height: 42px; display: flex; flex-direction: column;
	align-items: center; justify-content: center; margin: 2px auto; cursor: default;
	padding: 0; gap: 3px; transition: background .12s;
}
.iag-cal-day-num { font-size: 1.05rem; line-height: 1; color: #c0c9d4; }
.iag-cal-dot { width: 5px; height: 5px; border-radius: 50%; background: #16a34a; display: block; }
.iag-cal-empty { visibility: hidden; pointer-events: none; }

/* Dias com vaga — verde claro */
.iag-cal-avail { cursor: pointer; background: #dcfce7 !important; }
.iag-cal-avail .iag-cal-day-num { color: #15803d !important; font-weight: 700; }
.iag-cal-avail:hover { background: #bbf7d0 !important; }

/* Dia selecionado */
.iag-cal-sel,
.iag-cal-sel:hover { background: #16a34a !important; }
.iag-cal-sel .iag-cal-day-num { color: #fff !important; font-weight: 700 !important; }
.iag-cal-sel .iag-cal-dot { background: rgba(255,255,255,.7) !important; }

/* Painel de slots */
.iag-cal-slots-hdr {
	font-size: 1.05rem; font-weight: 600; color: var(--navy);
	margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
/* Uma coluna, duas linhas */
.iag-cal-slots-grid { display: flex; flex-direction: column; gap: 10px; }
.iag-slot {
	border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 14px 16px;
	font-size: 1rem; font-weight: 500; cursor: pointer; transition: .15s;
	display: flex !important; align-items: center; justify-content: center;
	text-align: center !important; min-height: 52px; line-height: 1.3; color: var(--navy);
	width: 100%;
}
.iag-slot:hover { border-color: #16a34a; color: #15803d; background: #f0fdf4 !important; }
.iag-slot--sel,
.iag-slot--sel:hover {
	background: #16a34a !important; color: #fff !important; border-color: #16a34a !important;
}

/* Responsivo */
@media (max-width: 580px) {
	.iag-cal-wrap { flex-direction: column; }
	.iag-cal-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
}

.iag-periodos { display: none; }
.iag-slots-vazio { font-size: 1.35rem; color: #888; }

/* Ações finais */
.iag-acoes { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.iag-acoes .iag-btn { margin-top: 0; }

/* Fallback */
.iag-fallback {
	background: #fffbeb; border: 1px solid #fde68a; border-radius: 16px;
	padding: 26px 28px; line-height: 1.6; font-size: 1.45rem;
}
.iag-fallback p { margin: 0 0 10px; color: #92400e; }

/* Esconde por completo o dropdown nativo do Google (usamos a lista própria) */
.pac-container { display: none !important; }

/* ===================================================================== */
/* Lista de sugestões de endereço (markup próprio, totalmente controlado) */
/* ===================================================================== */
.iag-ac { position: relative; }
.iag-sugest {
	list-style: none;
	margin: 6px 0 0;
	padding: 6px 0;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(0,0,0,.14);
	max-height: 360px;
	overflow-y: auto;
}
.iag-sugest-item {
	padding: 16px 20px;
	font-size: 1.35rem;
	line-height: 1.45;
	color: #334155;
	cursor: pointer;
	border-top: 1px solid #f1f5f9;
}
.iag-sugest-item:first-child { border-top: none; }
.iag-sugest-item:hover { background: #f8fafc; color: var(--navy); }
