/* IDD Agenda — estilos alineados al sitio (AktivGrotesk, #1E3450, botones rectos en mayúsculas) */

.idd-agenda {
	--idd-navy: #1E3450;
	--idd-dark: #08182E;
	--idd-navy-08: rgba(30, 52, 80, .08);
	--idd-navy-04: rgba(30, 52, 80, .04);
	--idd-bg: #F7F8FA;
	--idd-line: #E6E9EF;
	--idd-text: #1A1A1A;
	--idd-muted: #6B7280;
	--idd-ok: #1F8A4C;
	--idd-error: #B32D2E;
	font-family: "AktivGrotesk", "Roboto", sans-serif;
	color: var(--idd-text);
	max-width: 960px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--idd-line);
	box-shadow: 0 18px 50px -18px rgba(8, 24, 46, .18);
	padding: 2.25rem 2.5rem 2.5rem;
}
@media (max-width: 640px) { .idd-agenda { padding: 1.5rem 1.1rem 1.75rem; } }

.idd-agenda *, .idd-agenda *::before, .idd-agenda *::after { box-sizing: border-box; }
.idd-agenda button { -webkit-tap-highlight-color: transparent; }

.idd-cuerpo { animation: idd-fade .3s ease; }
@keyframes idd-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Botones (lineamientos del sitio) ---------- */
.idd-btn {
	display: inline-block;
	background: var(--idd-navy);
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .06em;
	text-decoration: none !important;
	border: 1px solid var(--idd-navy);
	border-radius: 0;
	padding: 1rem 2.75rem;
	cursor: pointer;
	transition: all .3s ease;
	line-height: 1.2;
}
.idd-btn:hover:not(:disabled) { background: var(--idd-dark); border-color: var(--idd-dark); box-shadow: 0 8px 20px -8px rgba(8, 24, 46, .45); }
.idd-btn:disabled { opacity: .45; cursor: not-allowed; }
.idd-btn--ghost { background: transparent; color: var(--idd-navy) !important; }
.idd-btn--ghost:hover:not(:disabled) { background: var(--idd-navy); color: #fff !important; }
.idd-btn--link {
	background: none; border: none; color: var(--idd-navy) !important;
	text-transform: none; letter-spacing: 0; padding: .25rem 0;
	text-decoration: underline !important; font-size: 14px; cursor: pointer; font-family: inherit;
}
.idd-btn--link:hover { color: var(--idd-dark) !important; }

/* ---------- Pasos: círculos numerados con línea ---------- */
.idd-steps { display: flex; align-items: flex-start; margin: 0 0 2.25rem; }
.idd-steps__item {
	flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem;
	position: relative; text-align: center;
	font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
	color: #9AA3AF;
}
.idd-steps__num {
	width: 34px; height: 34px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #fff; border: 2px solid var(--idd-line);
	font-size: 14px; font-weight: 600; color: #9AA3AF;
	transition: all .3s ease; position: relative; z-index: 1;
}
/* línea conectora */
.idd-steps__item::before {
	content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px;
	background: var(--idd-line); z-index: 0; transition: background .3s ease;
}
.idd-steps__item:first-child::before { display: none; }
.idd-steps__item.is-active { color: var(--idd-navy); }
.idd-steps__item.is-active .idd-steps__num { border-color: var(--idd-navy); color: var(--idd-navy); box-shadow: 0 0 0 4px var(--idd-navy-08); }
.idd-steps__item.is-active::before { background: var(--idd-navy); }
.idd-steps__item.is-done { color: var(--idd-navy); cursor: pointer; }
.idd-steps__item.is-done .idd-steps__num { background: var(--idd-navy); border-color: var(--idd-navy); color: #fff; }
.idd-steps__item.is-done::before { background: var(--idd-navy); }
@media (max-width: 560px) { .idd-steps__label { display: none; } .idd-steps { margin-bottom: 1.5rem; } }

.idd-step-title {
	font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: var(--idd-navy);
	margin: 0 0 1.5rem; font-weight: 600; text-transform: none; letter-spacing: 0;
	text-align: center;
}

/* ---------- Tarjetas de sucursal ---------- */
.idd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
@media (max-width: 560px) {
	.idd-cards { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
	.idd-card { padding: 1.25rem .5rem 1.1rem; font-size: .98rem; }
	.idd-card__icon { width: 44px; height: 44px; margin-bottom: .65rem; }
	.idd-card__icon svg { width: 20px; height: 20px; }
}
.idd-card {
	background: #fff; border: 1.5px solid var(--idd-line); border-radius: 0;
	padding: 1.75rem 1rem 1.5rem; text-align: center; cursor: pointer;
	font-family: inherit; font-size: 1.06rem; font-weight: 600; color: var(--idd-navy);
	transition: all .25s ease; position: relative;
}
.idd-card:hover { border-color: var(--idd-navy); transform: translateY(-3px); box-shadow: 0 14px 28px -14px rgba(8, 24, 46, .35); }
.idd-card.is-selected { background: var(--idd-navy); color: #fff; border-color: var(--idd-navy); }
.idd-card__icon {
	display: flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; margin: 0 auto .85rem; border-radius: 50%;
	background: var(--idd-navy-08); transition: background .25s ease;
}
.idd-card__icon svg { width: 24px; height: 24px; stroke: var(--idd-navy); transition: stroke .25s ease; }
.idd-card:hover .idd-card__icon { background: var(--idd-navy); }
.idd-card:hover .idd-card__icon svg { stroke: #fff; }
.idd-card.is-selected .idd-card__icon { background: rgba(255, 255, 255, .15); }
.idd-card.is-selected .idd-card__icon svg { stroke: #fff; }

/* ---------- Lista de estudios ---------- */
.idd-search-wrap { position: relative; margin-bottom: 1rem; }
.idd-search-wrap svg {
	position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
	width: 17px; height: 17px; stroke: var(--idd-muted); pointer-events: none;
}
.idd-agenda .idd-search {
	width: 100%; padding: .85rem 1rem .85rem 2.7rem !important;
	font-family: "AktivGrotesk", "Roboto", sans-serif !important;
	font-size: 15px !important; font-weight: 400 !important;
	text-transform: none !important; letter-spacing: normal !important;
	border: 1.5px solid var(--idd-line) !important; border-radius: 0 !important;
	background: #fff !important; color: var(--idd-text) !important;
	min-height: 0 !important; line-height: 1.4 !important;
	transition: border-color .2s ease;
}
.idd-list { max-height: 380px; overflow-y: auto; border: 1.5px solid var(--idd-line); background: #fff; }
.idd-list::-webkit-scrollbar { width: 8px; }
.idd-list::-webkit-scrollbar-thumb { background: var(--idd-line); }
.idd-list__item {
	display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--idd-line);
	padding: 1rem 1.2rem; font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--idd-text);
	cursor: pointer; transition: background .15s ease, padding-left .15s ease;
}
.idd-list__item:last-child { border-bottom: none; }
.idd-list__item:hover { background: var(--idd-navy-04); padding-left: 1.45rem; }
.idd-list__item.is-selected { background: var(--idd-navy); color: #fff; }
.idd-list__dur {
	flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: .03em;
	color: var(--idd-navy); background: var(--idd-navy-08); padding: .3rem .65rem;
	white-space: nowrap;
}
.idd-list__item.is-selected .idd-list__dur { color: #fff; background: rgba(255, 255, 255, .18); }

/* ---------- Fecha y hora ---------- */
.idd-fecha-hora { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 2.25rem; align-items: start; }
@media (max-width: 760px) { .idd-fecha-hora { grid-template-columns: 1fr; } }

.idd-cal { background: #fff; border: 1.5px solid var(--idd-line); padding: 1.25rem; }
.idd-cal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.idd-cal__mes { font-weight: 600; color: var(--idd-navy); font-size: 1.05rem; }
.idd-cal__nav {
	background: #fff; border: 1.5px solid var(--idd-line); width: 36px; height: 36px;
	font-size: 17px; color: var(--idd-navy); cursor: pointer; border-radius: 0; line-height: 1;
	transition: all .2s ease; font-family: inherit;
}
.idd-cal__nav:hover:not(:disabled) { background: var(--idd-navy); color: #fff; border-color: var(--idd-navy); }
.idd-cal__nav:disabled { opacity: .3; cursor: not-allowed; }
.idd-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.idd-cal__dow { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--idd-muted); padding: .4rem 0 .55rem; }
.idd-cal__day {
	aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
	background: var(--idd-navy-04); border: none; border-radius: 0; font-family: inherit; font-size: 14px;
	font-weight: 500; color: var(--idd-navy); cursor: pointer; transition: all .18s ease;
}
.idd-cal__day:hover:not(:disabled):not(.is-selected) { background: var(--idd-navy); color: #fff; }
.idd-cal__day:disabled { background: transparent; color: #C9CDD4; cursor: default; font-weight: 400; }
.idd-cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--idd-navy); font-weight: 700; }
.idd-cal__day.is-selected { background: var(--idd-navy); color: #fff; font-weight: 700; }

.idd-slots__fecha { font-weight: 600; color: var(--idd-navy); margin: .25rem 0 1rem; font-size: 1.05rem; }
.idd-slots__grupo {
	display: flex; align-items: center; gap: .6rem;
	font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
	color: var(--idd-muted); margin: 1.25rem 0 .65rem;
}
.idd-slots__grupo::after { content: ""; flex: 1; height: 1px; background: var(--idd-line); }
.idd-slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; }
.idd-slot {
	padding: .75rem .25rem; text-align: center; background: #fff;
	border: 1.5px solid var(--idd-navy); border-radius: 0; color: var(--idd-navy);
	font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: all .18s ease;
}
.idd-slot:hover:not(:disabled) { background: var(--idd-navy); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(8, 24, 46, .4); }
.idd-slot.is-selected { background: var(--idd-navy); color: #fff; }
.idd-slot:disabled { border-color: var(--idd-line); color: #C9CDD4; cursor: not-allowed; background: var(--idd-bg); }
.idd-slots__empty {
	color: var(--idd-muted); background: var(--idd-bg); border: 1.5px dashed var(--idd-line);
	padding: 2.25rem 1.25rem; text-align: center; font-size: 14.5px; line-height: 1.55;
}

/* ---------- Formulario / confirmación ---------- */
.idd-resumen {
	background: var(--idd-bg); border: 1px solid var(--idd-line); border-left: 4px solid var(--idd-navy);
	padding: 1.25rem 1.5rem; margin-bottom: 1.75rem;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem 1.5rem;
}
.idd-resumen p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.idd-resumen strong {
	display: block; color: var(--idd-muted); font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .07em; margin-bottom: .2rem;
}

.idd-form { display: grid; gap: 1.1rem; max-width: 500px; margin: 0 auto; }
.idd-form label {
	display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
	letter-spacing: .06em; color: var(--idd-navy); margin-bottom: .4rem;
}
/* Los !important neutralizan los estilos de inputs del tema (mayúsculas, gris,
   fondos de color) para que lo escrito se lea como texto real, no como borrador. */
.idd-agenda .idd-form input,
.idd-agenda .idd-form textarea,
.idd-agenda .idd-buscar__input,
.idd-agenda .idd-linkbox input {
	width: 100%; padding: .85rem 1rem !important;
	font-family: "AktivGrotesk", "Roboto", sans-serif !important;
	font-size: 15px !important; font-weight: 400 !important;
	text-transform: none !important; letter-spacing: normal !important;
	border: 1.5px solid var(--idd-line) !important; border-radius: 0 !important;
	background: #fff !important; color: var(--idd-text) !important;
	opacity: 1 !important; box-shadow: none; min-height: 0 !important; line-height: 1.4 !important;
	transition: border-color .2s ease;
}
.idd-agenda .idd-form input:focus,
.idd-agenda .idd-form textarea:focus,
.idd-agenda .idd-buscar__input:focus,
.idd-agenda .idd-search:focus {
	outline: none !important; border-color: var(--idd-navy) !important;
	box-shadow: 0 0 0 3px var(--idd-navy-08) !important;
}
.idd-agenda input::placeholder, .idd-agenda textarea::placeholder {
	color: #A6ADB8 !important; font-weight: 400 !important;
	text-transform: none !important; letter-spacing: normal !important; opacity: 1 !important;
}
/* Autorrelleno de Chrome/Safari: sin fondo azulado ni texto gris — lo escrito se ve negro sobre blanco. */
.idd-agenda input:-webkit-autofill,
.idd-agenda input:-webkit-autofill:hover,
.idd-agenda input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
	box-shadow: 0 0 0 1000px #ffffff inset !important;
	-webkit-text-fill-color: #1A1A1A !important;
	caret-color: #1A1A1A;
	transition: background-color 99999s ease-in-out 0s;
}
.idd-agenda .idd-form input, .idd-agenda .idd-form textarea,
.idd-agenda .idd-buscar__input, .idd-agenda .idd-search {
	-webkit-text-fill-color: #1A1A1A !important;
}
.idd-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

.idd-acciones { display: flex; gap: .75rem; align-items: center; justify-content: center; margin-top: 1.75rem; flex-wrap: wrap; }

.idd-exito { text-align: center; padding: 2rem 1rem 1rem; }
.idd-exito__icono {
	width: 74px; height: 74px; margin: 0 auto 1.4rem; border-radius: 50%;
	background: var(--idd-ok); color: #fff; font-size: 2.3rem; line-height: 74px;
	animation: idd-pop .45s cubic-bezier(.2, 1.4, .5, 1);
	box-shadow: 0 12px 30px -10px rgba(31, 138, 76, .55);
}
@keyframes idd-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.idd-exito__titulo { font-size: 1.7rem; color: var(--idd-navy); margin: 0 0 .5rem; font-weight: 700; }
.idd-exito__detalle { color: var(--idd-muted); margin: 0 auto 1.75rem; max-width: 460px; line-height: 1.55; }
.idd-exito .idd-resumen { text-align: left; max-width: 560px; margin: 0 auto 1.75rem; }

/* ---------- Mis citas ---------- */
.idd-miscitas { margin-top: 2.75rem; border-top: 1px solid var(--idd-line); padding-top: 1.5rem; }
.idd-miscitas__titulo {
	font-size: .85rem; color: var(--idd-muted); margin: 0 0 .9rem;
	text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.idd-cita-row {
	display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
	background: var(--idd-bg); border: 1px solid var(--idd-line); border-left: 4px solid var(--idd-navy);
	padding: .95rem 1.25rem; margin-bottom: .6rem; font-size: 14.5px; transition: box-shadow .2s ease;
}
.idd-cita-row:hover { box-shadow: 0 8px 18px -12px rgba(8, 24, 46, .3); }
.idd-cita-row__info strong { color: var(--idd-navy); display: block; margin-bottom: .15rem; }
.idd-cita-row__info div { color: var(--idd-muted); font-size: 13.5px; }
.idd-cita-row__status { font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; padding: .35rem .7rem; }
.idd-cita-row__status--agendada, .idd-cita-row__status--confirmada { color: var(--idd-ok); background: rgba(31, 138, 76, .1); }
.idd-cita-row__status--cancelada { color: var(--idd-error); background: rgba(179, 45, 46, .08); }

/* ---------- Utilidades ---------- */
.idd-error-box {
	background: #FDF2F2; border: 1px solid #F0C9C9; border-left: 4px solid var(--idd-error);
	color: var(--idd-error); padding: .9rem 1.2rem; margin: 1rem 0; font-size: 14.5px;
	animation: idd-fade .25s ease;
}
.idd-loading { display: flex; align-items: center; gap: .65rem; color: var(--idd-muted); padding: 2.25rem 0; justify-content: center; font-size: 14.5px; }
.idd-spinner {
	width: 22px; height: 22px; border: 3px solid var(--idd-line); border-top-color: var(--idd-navy);
	border-radius: 50%; animation: idd-spin .8s linear infinite; display: inline-block; flex-shrink: 0;
}
@keyframes idd-spin { to { transform: rotate(360deg); } }
.idd-nota { font-size: 13px; color: var(--idd-muted); text-align: center; margin-top: 1rem; line-height: 1.5; }
.idd-volver { text-align: left; margin-bottom: .75rem; }

/* ---------- Variantes de icono y botón ---------- */
.idd-exito__icono--mail { background: var(--idd-navy); box-shadow: 0 12px 30px -10px rgba(30, 52, 80, .5); font-size: 1.9rem; }
.idd-exito__icono--error { background: var(--idd-error); box-shadow: 0 12px 30px -10px rgba(179, 45, 46, .5); }
.idd-btn--peligro { background: var(--idd-error); border-color: var(--idd-error); }
.idd-btn--peligro:hover:not(:disabled) { background: #8F2324; border-color: #8F2324; box-shadow: 0 8px 20px -8px rgba(179, 45, 46, .5); }

/* ---------- Enlace de gestión (guardar / copiar) ---------- */
.idd-linkbox {
	background: var(--idd-bg); border: 1.5px dashed var(--idd-line);
	padding: 1.1rem 1.25rem; margin: 0 auto 1.75rem; max-width: 560px; text-align: left;
}
.idd-linkbox__label { margin: 0 0 .6rem; font-size: 13px; color: var(--idd-muted); line-height: 1.45; }
.idd-linkbox__fila { display: flex; gap: .5rem; }
.idd-linkbox__fila input { flex: 1; font-size: 12.5px !important; color: var(--idd-muted) !important; }
.idd-linkbox__btn { padding: .6rem 1.2rem; font-size: 12.5px; flex-shrink: 0; }
@media (max-width: 480px) { .idd-linkbox__fila { flex-direction: column; } }

/* ---------- Estado de la reserva (vista de gestión) ---------- */
.idd-gestion__status {
	display: table; margin: -0.75rem auto 1.5rem; padding: .4rem 1rem;
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
}
.idd-gestion__status--agendada { color: var(--idd-ok); background: rgba(31, 138, 76, .1); }
.idd-gestion__status--pendiente { color: #B26B00; background: rgba(178, 107, 0, .1); }
.idd-gestion__status--cancelada, .idd-gestion__status--expirada { color: var(--idd-error); background: rgba(179, 45, 46, .08); }

/* ---------- Buscar mis reservas (centrado, resultado en línea) ---------- */
.idd-buscar { text-align: center; }
.idd-buscar__titulo {
	font-size: 1.05rem; color: var(--idd-navy); margin: 0 0 .3rem; font-weight: 600;
	text-transform: none; letter-spacing: 0;
}
.idd-buscar__sub { font-size: 13.5px; color: var(--idd-muted); margin: 0 0 1rem; }
.idd-buscar__fila { display: flex; gap: .6rem; max-width: 520px; margin: 0 auto; }
.idd-buscar__fila input { flex: 1; }
.idd-buscar__btn { padding: .75rem 1.4rem; font-size: 13px; flex-shrink: 0; white-space: nowrap; }
.idd-buscar__resultado { max-width: 520px; margin: 0 auto; }
.idd-buscar__msg {
	margin: .9rem 0 0; padding: .8rem 1.1rem; font-size: 14px; line-height: 1.5;
	background: var(--idd-bg); border: 1px solid var(--idd-line); color: var(--idd-text);
}
.idd-buscar__msg--ok { border-left: 4px solid var(--idd-ok); }
.idd-buscar__msg--error { border-left: 4px solid var(--idd-error); color: var(--idd-error); background: #FDF2F2; }
.idd-buscar__enviar { margin-top: .9rem; padding: .8rem 1.6rem; font-size: 13px; }
@media (max-width: 520px) { .idd-buscar__fila { flex-direction: column; } .idd-buscar__btn { width: 100%; } }
