/* Agendador de Horários – usa a fonte do tema; troque a cor com [agendador cor="#..."] */
.agh-app {
	--agh-accent: #1f5c4d;
	--agh-ink: #1f2a44;
	--agh-muted: #626b80;
	--agh-line: #dfe3ea;
	--agh-soft: #f4f6f9;
	--agh-busy: #b9bfcc;
	--agh-error: #a8322d;
	color: var(--agh-ink);
	max-width: 880px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.45;
}
.agh-app *,
.agh-app *::before,
.agh-app *::after { box-sizing: border-box; }
.agh-app [hidden] { display: none !important; }

.agh-head { margin-bottom: 20px; }
.agh-title { margin: 0 0 4px; font-size: 1.5em; line-height: 1.2; }
.agh-sub { margin: 0; color: var(--agh-muted); }

.agh-body {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	border: 1px solid var(--agh-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}
.agh-cal { padding: 20px; border-right: 1px solid var(--agh-line); }
.agh-times { padding: 20px; background: var(--agh-soft); }

.agh-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.agh-month { font-size: 1.05em; }
.agh-nav button {
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--agh-line); background: #fff; color: var(--agh-ink);
	font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
.agh-nav button:disabled { opacity: .35; cursor: default; }

.agh-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; transition: opacity .15s; }
.agh-grid.is-loading { opacity: .4; pointer-events: none; }
.agh-wd { text-align: center; font-size: .78em; color: var(--agh-muted); padding: 4px 0 8px; }
.agh-day {
	aspect-ratio: 1; min-height: 36px; border-radius: 8px; border: 0; padding: 0;
	font: inherit; font-size: .95em; cursor: pointer; position: relative;
	background: transparent; color: var(--agh-ink);
}
.agh-day.is-available { background: color-mix(in srgb, var(--agh-accent) 12%, #fff); font-weight: 600; color: var(--agh-accent); }
.agh-day.is-available:hover { background: color-mix(in srgb, var(--agh-accent) 22%, #fff); }
.agh-day.is-full { color: var(--agh-busy); text-decoration: line-through; }
.agh-day.is-closed { color: #c9ced8; cursor: default; }
.agh-day.is-today::after {
	content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px;
	margin-left: -2px; border-radius: 50%; background: currentColor;
}
.agh-day.is-selected, .agh-day.is-selected:hover { background: var(--agh-accent); color: #fff; }

.agh-legend { display: flex; gap: 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .8em; color: var(--agh-muted); }
.agh-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.agh-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.agh-legend .is-available { background: color-mix(in srgb, var(--agh-accent) 25%, #fff); }
.agh-legend .is-full { background: var(--agh-line); }

.agh-date { margin: 0 0 14px; font-size: 1em; }
.agh-date::first-letter { text-transform: uppercase; }
.agh-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.agh-slot {
	display: block; text-align: center; padding: 9px 0; border-radius: 8px;
	border: 1px solid var(--agh-accent); background: #fff; color: var(--agh-accent);
	font: inherit; font-weight: 600; cursor: pointer;
}
.agh-slot:hover { background: color-mix(in srgb, var(--agh-accent) 10%, #fff); }
.agh-slot.is-selected { background: var(--agh-accent); color: #fff; }
.agh-slot.is-busy {
	border-color: transparent; background: #e9ecf1; color: var(--agh-busy);
	font-weight: 400; text-decoration: line-through; cursor: not-allowed;
}
.agh-hint { margin: 0; color: var(--agh-muted); }
.agh-hint + .agh-hint, .agh-slots + .agh-hint { margin-top: 12px; }
.agh-error { color: var(--agh-error); margin: 0 0 12px; }

.agh-services { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.agh-services legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.agh-svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.agh-svc {
	display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px;
	border: 1px solid var(--agh-line); border-radius: 10px; background: #fff; cursor: pointer;
}
.agh-svc:hover { border-color: var(--agh-accent); }
.agh-svc.is-selected { border-color: var(--agh-accent); box-shadow: inset 0 0 0 1px var(--agh-accent); background: color-mix(in srgb, var(--agh-accent) 5%, #fff); }
.agh-svc input { accent-color: var(--agh-accent); margin: 0; flex: none; }
.agh-svc-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.agh-svc-name { font-weight: 600; }
.agh-svc-desc { font-size: .85em; color: var(--agh-muted); }
.agh-svc-price { font-weight: 700; white-space: nowrap; color: var(--agh-accent); }
.agh-price-note { margin: 10px 0 0; font-size: .88em; color: var(--agh-muted); }
.agh-pick p { margin: 0 0 6px; }
.agh-pick { margin-bottom: 16px; }

.agh-form { margin-top: 20px; padding: 20px; border: 1px solid var(--agh-line); border-radius: 10px; background: #fff; }
.agh-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.agh-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .9em; }
.agh-field span { color: var(--agh-muted); }
.agh-wide { grid-column: 1 / -1; }
.agh-field input, .agh-field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--agh-line); border-radius: 8px;
	font: inherit; font-size: 16px; color: var(--agh-ink); background: #fff; margin: 0;
}
.agh-field.has-error input { border-color: var(--agh-error); }
.agh-msg { color: var(--agh-error); font-size: .85em; min-height: 0; }
.agh-msg:empty { display: none; }
.agh-hp { position: absolute !important; left: -9999px !important; }
.agh-consent { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 4px; font-size: .9em; }
.agh-consent input { margin-top: 3px; }
.agh-form-error { margin-top: 12px; }
.agh-submit {
	margin-top: 16px; padding: 12px 24px; border: 0; border-radius: 8px;
	background: var(--agh-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.agh-submit:disabled { opacity: .6; cursor: wait; }

.agh-done { padding: 24px; border-radius: 10px; border-left: 4px solid var(--agh-accent); background: var(--agh-soft); }
.agh-done h4 { margin: 0 0 6px; font-size: 1.15em; }
.agh-done p { margin: 0; }

.agh-app button:focus-visible,
.agh-app input:focus-visible,
.agh-app textarea:focus-visible,
.agh-app a:focus-visible { outline: 2px solid var(--agh-accent); outline-offset: 2px; }

@media (max-width: 720px) {
	.agh-body { grid-template-columns: 1fr; }
	.agh-cal { border-right: 0; border-bottom: 1px solid var(--agh-line); padding: 16px; }
	.agh-times { padding: 16px; }
	.agh-fields { grid-template-columns: 1fr; }
	.agh-submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.agh-grid { transition: none; }
}

/* Áreas e consultas */
.agh-step-label { font-weight: 600; margin: 0 0 8px; }
.agh-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.agh-cat {
	padding: 8px 16px; border-radius: 999px; border: 1px solid var(--agh-line);
	background: #fff; color: var(--agh-ink); font: inherit; font-size: .92em; cursor: pointer;
}
.agh-cat:hover { border-color: var(--agh-accent); }
.agh-cat.is-selected { background: var(--agh-accent); border-color: var(--agh-accent); color: #fff; }
.agh-cat-desc { margin: -6px 0 14px; color: var(--agh-muted); font-size: .9em; }
.agh-svc-dur { font-size: .8em; color: var(--agh-muted); }
.agh-services { margin: 0 0 20px; }
.agh-body { position: relative; }
.agh-lock-msg { display: none; }
.agh-body.is-locked .agh-cal,
.agh-body.is-locked .agh-times { opacity: .35; pointer-events: none; user-select: none; }
.agh-body.is-locked .agh-lock-msg {
	display: block; position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
	margin: 0; padding: 12px 18px; max-width: 80%; text-align: center;
	background: #fff; border: 1px solid var(--agh-line); border-radius: 8px; box-shadow: 0 4px 16px rgba(20, 24, 40, .08);
}
