/* ==========================================================================
   autoclinicas.ai · embudo de agenda (/agendar y /agendada)
   Usa los tokens de site.css. Radios: pill en botones, r-sm en campos,
   r-md en tarjetas internas, r-xl en el bloque navy (igual que el resto del sitio).
   ========================================================================== */

/* ---------- Cabecera y pie mínimos (página de conversión, sin menú) ---------- */
.ag-head { position: relative; z-index: var(--z-nav); }
.ag-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.ag-logo img { height: 28px; width: auto; }
.ag-help { display: inline-flex; align-items: center; gap: 8px; font: 600 .9rem var(--f-head); color: var(--navy); padding: 10px 16px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--white); transition: border-color .2s, background-color .2s; }
.ag-help:hover { border-color: var(--navy); background: var(--paper); }
.ag-help .ic { color: var(--cyan-ink); }
@media (max-width: 480px) { .ag-help span { display: none; } .ag-help { padding: 10px; } }

.ag-foot { background: var(--navy); color: rgba(255, 255, 255, .62); padding: 40px 0; margin-top: clamp(24px, 4vw, 48px); font-size: .88rem; }
.ag-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.ag-foot img { height: 26px; width: auto; }
.ag-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ag-foot a:hover { color: #fff; }

/* ---------- Hero ---------- */
.ag-hero { position: relative; text-align: center; padding-block: clamp(20px, 4vw, 48px) clamp(28px, 4vw, 44px); }
.ag-hero::before {
  content: ''; position: absolute; inset: -72px 0 auto 0; height: 440px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(0, 180, 216, .16), transparent 70%);
}
.ag-hero .wrap { display: grid; justify-items: center; gap: 18px; }
.ag-hero .h1 { max-width: 24ch; font-size: clamp(2.1rem, 4.2vw, 3.25rem); }
.ag-hero .h1 em { display: inline-block; padding-bottom: .04em; }
.ag-hero .lead { margin-inline: auto; text-align: center; max-width: 64ch; }
.ag-pill {
  display: inline-flex; align-items: center; padding: 7px 16px; border-radius: var(--pill);
  background: var(--navy); color: #fff; font: 500 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 10px 24px -12px rgba(13, 34, 70, .6);
}

/* ---------- Sesión de implementación (puente entre el hero y la caja) ---------- */
.ag-intro { padding-bottom: clamp(28px, 4vw, 44px); }
.ag-intro-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--paper); border: 1px solid var(--line);
}
.ag-intro-copy { display: grid; gap: 10px; max-width: 60ch; }
.ag-intro-copy .eyebrow { margin-bottom: 0; }
.ag-intro-copy .h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.ic.down { transform: rotate(90deg); }
@media (max-width: 860px) {
  .ag-intro-box { grid-template-columns: 1fr; }
  .ag-intro-btn { width: 100%; white-space: normal; text-align: left; justify-content: space-between; padding-block: 8px; }
}

/* ---------- Bloque de agenda ---------- */
.ag-book { padding-bottom: clamp(48px, 6vw, 88px); }
.ag-stage {
  position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--navy); color: #fff;
  padding: clamp(28px, 4.5vw, 56px) clamp(14px, 3.5vw, 48px) clamp(24px, 3.5vw, 40px);
}
.ag-stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 55% at 85% 0%, rgba(0, 180, 216, .24), transparent 65%), radial-gradient(ellipse 40% 50% at 0% 100%, rgba(42, 74, 128, .65), transparent 70%);
}
.ag-stage > * { position: relative; }
.ag-stage-head { display: grid; justify-items: center; gap: 6px; text-align: center; margin-bottom: clamp(20px, 3vw, 32px); }
.ag-stage-head .eyebrow { color: var(--cyan-2); margin-bottom: 0; }
.ag-stage-head .h3 { color: #fff; }
.ag-note { max-width: 56ch; margin: 22px auto 0; text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .64); }

.ag-window { max-width: 1000px; margin-inline: auto; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55); overflow: hidden; }
.ag-chrome { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ag-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.ag-chrome span { margin-left: auto; font: 400 .75rem var(--f-mono); letter-spacing: .06em; color: rgba(255, 255, 255, .58); }
.ag-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); background: var(--white); color: var(--ink); margin: 8px; border-radius: var(--r-md); overflow: hidden; }

/* Columna de información */
.ag-info { padding: clamp(22px, 3vw, 34px); border-right: 1px solid var(--line); background: var(--paper); display: grid; align-content: start; gap: 12px; }
.ag-iso { width: 44px; height: 44px; border-radius: 12px; }
.ag-kicker { font: 500 .8rem var(--f-body); color: var(--muted); }
.ag-title { font: 700 1.35rem/1.2 var(--f-head); color: var(--navy); letter-spacing: -.02em; }
.ag-desc { font-size: .93rem; line-height: 1.55; color: var(--mid); }
.ag-meta { display: grid; gap: 10px; margin: 6px 0 4px; }
.ag-meta li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--mid); line-height: 1.4; }
.ag-meta .ic { color: var(--cyan-ink); margin-top: 1px; }
.ag-important { padding: 16px 18px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); }
.ag-imp-h { display: flex; align-items: center; gap: 8px; font: 700 .82rem var(--f-head); letter-spacing: .04em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.ag-imp-h .ic { color: var(--wait); }
.ag-important ul { display: grid; gap: 10px; }
.ag-important li { display: flex; gap: 10px; font-size: .9rem; line-height: 1.5; color: var(--mid); }
.ag-important li .ic { color: var(--cyan-ink); margin-top: 2px; }

/* Columna de la app */
.ag-app { padding: clamp(20px, 3vw, 34px); min-width: 0; }
.ag-steps { display: flex; gap: 22px; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--line); font: 500 .92rem var(--f-body); color: var(--muted); }
.ag-steps li { display: inline-flex; align-items: center; gap: 8px; }
.ag-steps li span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.ag-steps li span .ic { width: 12px; height: 12px; opacity: 0; }
.ag-steps li.on { color: var(--navy); font-weight: 600; }
.ag-steps li.on span { border-color: var(--cyan-dark); background: var(--cyan); }
.ag-steps li.done span { background: var(--navy); border-color: var(--navy); color: #fff; }
.ag-steps li.done span .ic { opacity: 1; }

.ag-panel { display: grid; gap: 16px; }
.ag-panel[hidden] { display: none; }
.ag-field { display: grid; gap: 6px; }
.ag-field label { font: 600 .92rem var(--f-head); color: var(--navy); }
.ag-field .req { color: var(--cyan-ink); }
.ag-field .ag-opt { color: var(--muted); font-weight: 400; }
.ag-hint { font-size: .82rem; color: var(--muted); margin-top: -2px; }
.ag-field input, .ag-select select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--white); font: 400 1rem var(--f-body); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.ag-field input::placeholder { color: #7A849C; }
.ag-field input:focus, .ag-select select:focus { outline: none; border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(0, 180, 216, .2); }
.ag-field.bad input, .ag-field.bad select { border-color: #B42318; }
.ag-select { position: relative; }
.ag-select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.ag-select select:invalid { color: #6B7590; }
.ag-select .chev { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(90deg); pointer-events: none; color: var(--muted); }
.ag-phone { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.ag-err { font-size: .84rem; color: #B42318; }
.ag-form-err { padding: 10px 12px; border-radius: var(--r-sm); background: #FEF3F2; }
.ag-form-err a { text-decoration: underline; font-weight: 600; }
.ag-legal { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.ag-legal a { text-decoration: underline; color: var(--navy); }
.ag-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: .65; pointer-events: none; }
.btn.loading .bubble .ic { animation: ag-spin 1s linear infinite; }
@keyframes ag-spin { to { transform: rotate(360deg); } }

/* Paso 2: calendario */
.ag-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font: 600 .88rem var(--f-head); color: var(--cyan-ink); }
.ic.flip { transform: rotate(180deg); }
.ag-tzrow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.ag-tzrow label { font: 600 .88rem var(--f-head); color: var(--navy); }
.ag-tzrow select { min-height: 42px; font-size: .92rem; }
.ag-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ag-cal-head b { font: 600 1.15rem var(--f-head); color: var(--navy); }
.ag-cal-nav { display: flex; gap: 6px; }
.ag-cal-nav button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--line-2); color: var(--navy); transition: border-color .2s, background-color .2s; }
.ag-cal-nav button:hover:not(:disabled) { border-color: var(--navy); background: var(--paper); }
.ag-cal-nav button:disabled { opacity: .35; cursor: default; }
.ag-dow, .ag-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.ag-dow span { font: 500 .7rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.ag-day { position: relative; aspect-ratio: 1; max-height: 52px; width: 100%; border-radius: var(--r-sm); font: 500 .95rem var(--f-body); color: #9AA3B8; }
.ag-day.has { color: var(--navy); font-weight: 600; background: var(--sky); }
.ag-day.has::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--cyan-dark); }
.ag-day.has:hover { background: var(--sky-2); }
.ag-day.sel { background: var(--navy); color: #fff; }
.ag-day.sel::after { background: var(--cyan); }
.ag-day.today { box-shadow: inset 0 0 0 1px var(--line-2); }
.ag-day:disabled { cursor: default; }
.ag-skel { height: 220px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--paper) 0%, #EEF3F7 50%, var(--paper) 100%); background-size: 200% 100%; animation: ag-shimmer 1.4s ease-in-out infinite; }
@keyframes ag-shimmer { to { background-position: -200% 0; } }

.ag-slots-wrap { border-top: 1px solid var(--line); padding-top: 16px; }
.ag-slots-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ag-slots-head b { font: 600 1rem var(--f-head); color: var(--navy); }
.ag-fmt { padding: 3px; }
.ag-fmt[hidden] { display: none; }
.ag-fmt button { padding: 6px 12px; font-size: .82rem; }
.ag-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 248px; overflow-y: auto; padding: 2px; }
.ag-slot { min-height: 46px; border-radius: var(--r-sm); border: 1px solid var(--line-2); font: 600 .95rem var(--f-mono); color: var(--navy); transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.ag-slot:hover { border-color: var(--navy); }
.ag-slot:active { transform: scale(.98); }
.ag-slot[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ag-empty { grid-column: 1 / -1; padding: 16px; border-radius: var(--r-sm); background: var(--paper); font-size: .92rem; color: var(--mid); }
.ag-empty a { color: var(--cyan-ink); font-weight: 600; text-decoration: underline; }
.ag-confirm { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--sky); }
.ag-confirm[hidden] { display: none; }
.ag-confirm p#ag-pick { font: 600 1rem var(--f-head); color: var(--navy); }

@media (max-width: 860px) {
  .ag-body { grid-template-columns: 1fr; }
  .ag-info { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .ag-pill { font-size: .66rem; letter-spacing: .1em; }
  .ag-hero .lead { font-size: 1rem; }
  .ag-body { margin: 6px; }
  .ag-chrome span { font-size: .68rem; }
  .ag-tzrow { grid-template-columns: 1fr; gap: 6px; }
  .ag-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-steps { gap: 16px; }
}

/* ---------- Lo que vas a ver ---------- */
.ag-see { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.ag-see-copy { display: grid; gap: 16px; justify-items: start; position: sticky; top: 40px; }
.ag-see-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ag-see-list li { display: grid; gap: 14px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); }
.ag-see-list li:nth-child(1) { background: var(--navy); border-color: var(--navy); }
.ag-see-list li:nth-child(1) b { color: #fff; }
.ag-see-list li:nth-child(1) p { color: rgba(255, 255, 255, .74); }
.ag-see-list li:nth-child(1) .ico { background: var(--cyan); color: var(--navy); }
.ag-see-list li:nth-child(4) { background: var(--sky); border-color: var(--sky-2); }
.ag-see-list .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--sky); color: var(--cyan-ink); }
.ag-see-list li:nth-child(4) .ico { background: var(--white); }
.ag-see-list b { display: block; font: 600 1.08rem var(--f-head); color: var(--navy); margin-bottom: 6px; }
.ag-see-list p { font-size: .94rem; color: var(--mid); line-height: 1.55; }
@media (max-width: 900px) { .ag-see { grid-template-columns: 1fr; } .ag-see-copy { position: static; } }
@media (max-width: 560px) { .ag-see-list { grid-template-columns: 1fr; } }

/* ---------- Aviso "ya agendaste" ---------- */
.ag-modal { margin: auto; width: min(460px, calc(100% - 32px)); border: 0; border-radius: var(--r-lg); padding: 30px 26px 24px; text-align: center; color: var(--ink); box-shadow: var(--shadow-lg); }
.ag-modal::backdrop { background: rgba(10, 15, 26, .55); }
.ag-modal[open] { display: grid; gap: 12px; justify-items: center; animation: ag-pop .35s var(--ease); }
.ag-modal p { color: var(--mid); font-size: .98rem; }
.ag-modal-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sky); color: var(--cyan-ink); }
.ag-modal-ico .ic { width: 26px; height: 26px; }
.ag-modal-actions { display: grid; gap: 8px; width: 100%; margin-top: 8px; }
@keyframes ag-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ==========================================================================
   /agendada
   ========================================================================== */
.ok-hero { position: relative; text-align: center; padding-block: clamp(24px, 4vw, 52px) clamp(36px, 5vw, 64px); }
.ok-hero::before { content: ''; position: absolute; inset: -72px 0 auto 0; height: 460px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(0, 180, 216, .16), transparent 70%); }
.ok-hero .wrap { display: grid; justify-items: center; gap: 18px; }
.ok-hero .h1 { max-width: 22ch; font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.ok-hero .h1 em { display: inline-block; padding-bottom: .04em; }
.ok-badge { display: inline-flex; align-items: center; gap: 8px; font: 500 .75rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-ink); }
.ok-badge .ic { width: 1.4em; height: 1.4em; }
.ok-when { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ok-when[hidden] { display: none; }
.ok-when span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--pill); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .95rem; color: var(--mid); }
.ok-when b { color: var(--navy); font-weight: 600; }
.ok-when .ic { color: var(--cyan-ink); }
.ok-hero hr { width: min(560px, 100%); border: 0; border-top: 1px solid var(--line-2); margin: 10px 0 4px; }
.ok-warn { font: 700 clamp(1.4rem, 3vw, 2rem)/1.3 var(--f-head); color: var(--navy); letter-spacing: -.02em; }
.ok-warn mark { background: var(--cyan); color: var(--navy); padding: .02em .3em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ok-hero .lead { text-align: center; }

.ok-steps .wrap { display: grid; gap: clamp(28px, 4vw, 44px); }
.ok-video-block { display: grid; justify-items: center; gap: 16px; text-align: center; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px); border-radius: var(--r-xl); background: var(--navy); position: relative; overflow: hidden; }
.ok-video-block::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 45% 60% at 85% 0%, rgba(0, 180, 216, .24), transparent 65%); }
.ok-video-block > * { position: relative; }
.ok-video-block .h2 { color: #fff; }
.ok-video-block .h2 em { color: var(--cyan-2); }
.ok-video-block .ok-step-n { color: var(--cyan-2); }
.ok-step-n { font: 500 .78rem var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan-ink); }
.ok-video { width: min(860px, 100%); aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0A1A38; border: 1px solid rgba(255, 255, 255, .14); }
.ok-video iframe, .ok-video video { width: 100%; height: 100%; border: 0; display: block; }
.ok-video-ph { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; color: rgba(255, 255, 255, .8); background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(0, 180, 216, .18), transparent 70%); }
.ok-play { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--cyan); color: var(--navy); box-shadow: 0 0 0 10px rgba(0, 180, 216, .16); }
.ok-play .ic { width: 30px; height: 30px; margin-left: 3px; }
.ok-video-ph p { font: 600 1.05rem var(--f-head); color: #fff; max-width: 34ch; }
.ok-video-ph small { font: 500 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

.ok-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ok-card { display: grid; align-content: start; gap: 12px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow-sm); }
.ok-card:first-child { background: var(--sky); border-color: var(--sky-2); }
.ok-card-top { display: flex; align-items: center; justify-content: space-between; }
.ok-card-top .ic { width: 28px; height: 28px; color: var(--navy); }
.ok-card p { color: var(--mid); font-size: .98rem; }
.ok-card b { color: var(--navy); white-space: nowrap; }
.ok-card .btn { justify-self: start; margin-top: 6px; }
.ok-cal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ok-cal-actions .btn { margin-top: 0; }
@media (max-width: 760px) { .ok-cards { grid-template-columns: 1fr; } .ok-card .btn, .ok-cal-actions .btn { width: 100%; justify-self: stretch; } }

.ok-wait { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ok-wait > div { display: grid; gap: 10px; max-width: 60ch; }

@media (prefers-reduced-motion: reduce) {
  .ag-skel, .btn.loading .bubble .ic { animation: none; }
  .ag-modal[open] { animation: none; }
}
