/* ===== E-Dispensary · Agendar entrevista (frontend) ===== */
.edisp-ae {
	--ae-accent: #1a6b4a;
	--ae-accent-soft: #e8f3ee;
	--ae-border: #d9e0dc;
	--ae-muted: #6b756f;
	--ae-radius: 12px;
	position: relative;
	max-width: 460px;
	margin: 0 auto;
	padding: 4px 2px 28px;
	font-family: inherit;
	color: #253028;
	box-sizing: border-box;
}
.edisp-ae *, .edisp-ae *::before, .edisp-ae *::after { box-sizing: border-box; }
/* Neutraliza artefactos de wpautop / estilos del tema dentro del widget. */
.edisp-ae br { display: none; }
.edisp-ae p:empty { display: none; margin: 0; }
.edisp-ae-form p { margin: 0; }

.edisp-ae-title { font-size: 18px; margin: 0 0 14px; font-weight: 600; text-align: center; }
.edisp-ae-title .edisp-ae-selected-date { color: var(--ae-accent); text-transform: capitalize; }

/* Calendario */
.edisp-ae-calendar {
	background: #fff;
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 14px;
	box-shadow: 0 2px 10px rgba(26, 107, 74, .05);
}
.edisp-ae-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.edisp-ae-cal-label { font-weight: 600; text-transform: capitalize; font-size: 15px; }
.edisp-ae-nav {
	border: 1px solid var(--ae-border);
	background: #fff;
	width: 34px; height: 34px;
	border-radius: 8px;
	font-size: 20px; line-height: 1;
	cursor: pointer;
	color: var(--ae-accent);
	transition: background .15s;
}
.edisp-ae-nav:hover { background: var(--ae-accent-soft); }

.edisp-ae-weekdays, .edisp-ae-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.edisp-ae-weekdays { margin-bottom: 6px; }
.edisp-ae-weekdays span { text-align: center; font-size: 12px; color: var(--ae-muted); font-weight: 600; padding: 4px 0; }

.edisp-ae-day {
	aspect-ratio: 1 / 1;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid transparent;
	border-radius: 9px;
	font-size: 14px;
	cursor: pointer;
	background: transparent;
	color: #253028;
	transition: background .12s, border-color .12s;
	padding: 0;
	font-family: inherit;
}
.edisp-ae-day.is-empty { cursor: default; }
.edisp-ae-day.is-available { background: var(--ae-accent-soft); color: var(--ae-accent); font-weight: 600; }
.edisp-ae-day.is-available:hover { border-color: var(--ae-accent); }
.edisp-ae-day.is-disabled { color: #c3ccc7; cursor: not-allowed; }
.edisp-ae-day.is-selected { background: var(--ae-accent); color: #fff; font-weight: 700; }
.edisp-ae-day.is-today { box-shadow: inset 0 0 0 1px var(--ae-accent); }

/* Horarios */
.edisp-ae-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.edisp-ae-slot {
	border: 1px solid var(--ae-border);
	background: #fff;
	border-radius: 9px;
	padding: 12px 6px;
	font-size: 15px;
	cursor: pointer;
	text-align: center;
	transition: background .12s, border-color .12s;
	font-family: inherit;
}
.edisp-ae-slot:hover { border-color: var(--ae-accent); background: var(--ae-accent-soft); }
.edisp-ae-slot.is-selected { background: var(--ae-accent); color: #fff; border-color: var(--ae-accent); }
.edisp-ae-empty-msg { color: var(--ae-muted); text-align: center; padding: 20px 0; grid-column: 1 / -1; }

/* Navegación entre pasos */
.edisp-ae-back {
	background: none; border: none; color: var(--ae-accent);
	cursor: pointer; font-size: 14px; padding: 4px 0; margin-bottom: 8px; font-family: inherit;
}
.edisp-ae-back:hover { text-decoration: underline; }

/* Formulario */
.edisp-ae-summary {
	background: var(--ae-accent-soft); color: var(--ae-accent);
	border-radius: 9px; padding: 10px 14px; text-align: center; font-weight: 600; margin: 0 0 16px;
	text-transform: capitalize;
}
.edisp-ae-form { display: flex; flex-direction: column; gap: 12px; }
.edisp-ae-form label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 500; margin: 0; }
.edisp-ae-form input {
	border: 1px solid var(--ae-border);
	border-radius: 9px;
	padding: 11px 12px;
	font-size: 16px; /* evita zoom en iOS */
	width: 100%;
	font-family: inherit;
}
.edisp-ae-form input:focus { outline: none; border-color: var(--ae-accent); box-shadow: 0 0 0 3px var(--ae-accent-soft); }
.edisp-ae-form input.is-invalid { border-color: #d63638; }
.edisp-ae-field-hint { color: #d63638; font-size: 13px; font-weight: 500; margin-top: -4px; }
.edisp-ae-field-hint[hidden] { display: none; }

.edisp-ae-submit, .edisp-ae-slot, .edisp-ae-nav { -webkit-tap-highlight-color: transparent; }
.edisp-ae-submit {
	background: var(--ae-accent); color: #fff; border: none;
	border-radius: 9px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer;
	margin-top: 4px; font-family: inherit;
}
.edisp-ae-submit:hover { filter: brightness(1.05); }
.edisp-ae-submit:disabled { opacity: .6; cursor: default; }

.edisp-ae-error {
	background: #fcecec; color: #b32020; border-radius: 9px; padding: 10px 12px; font-size: 14px;
}

/* Confirmación */
.edisp-ae-done { text-align: center; padding: 20px 10px; }
.edisp-ae-check {
	width: 64px; height: 64px; border-radius: 50%; background: var(--ae-accent-soft);
	color: var(--ae-accent); font-size: 34px; line-height: 64px; margin: 0 auto 14px; font-weight: 700;
}
.edisp-ae-done-text { color: #253028; font-size: 15px; line-height: 1.5; }

/* Loading */
.edisp-ae-loading {
	position: absolute; inset: 0; background: rgba(255, 255, 255, .6);
	display: flex; align-items: center; justify-content: center; border-radius: var(--ae-radius); z-index: 5;
}
.edisp-ae-loading[hidden] { display: none; }
.edisp-ae-step[hidden] { display: none; }
.edisp-ae-spinner {
	width: 32px; height: 32px; border: 3px solid var(--ae-accent-soft); border-top-color: var(--ae-accent);
	border-radius: 50%; animation: edisp-ae-spin .8s linear infinite;
}
@keyframes edisp-ae-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
	.edisp-ae { max-width: 100%; }
	.edisp-ae-slots { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
