/*
 * Gestdoc — Footer + capa flotante + chat
 * === origen: Gestdoc Sitio v5.dc.html · <footer> y <div position:sticky;bottom:0> (inline → clases) ===
 *
 * Estados del prototipo resueltos así:
 *   showTabBar (isMobile) / showMobileBar (isMobile && documento) → media queries
 *   showLauncher (!chatOpen && !isMobile) → .gd-float.is-chat + media query
 *   showTeaser (teaser && w ≥ 420) → atributo hidden (design.js) + media query
 *   fabBottom / chatRight / chatBottom / chatW / chatH (isMobile) → media queries
 */

.gd-footer{background:#F6F7FB;border-top:1px solid #EEF0F5;position:relative;overflow:hidden}
.gd-footer__inner{max-width:1240px;margin:0 auto;padding:64px 20px 28px;position:relative}
.gd-footer__top{display:flex;flex-wrap:wrap;gap:24px;justify-content:space-between;align-items:center;padding-bottom:40px;border-bottom:1px solid #E3E6EE}
.gd-footer__title{font-size:clamp(26px,3.2cqw,40px);font-weight:600;letter-spacing:-.04em;max-width:600px;line-height:1.05}
.gd-footer__wa{display:flex;align-items:center;gap:10px;background:#25D366;color:#05230F;border-radius:999px;padding:15px 22px;font-size:15px;font-weight:600;text-decoration:none}
.gd-footer__wa-dot{width:8px;height:8px;border-radius:50%;background:#05230F;display:block}
.gd-footer__cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:28px;padding-top:40px}
.gd-footer__col-t{font:500 12px 'Geist Mono',monospace;color:#98A2B3;letter-spacing:.1em;text-transform:uppercase}
.gd-footer__links{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.gd-footer__link{color:#1B2236;font-size:14px}
.gd-footer__mark{margin-top:56px;display:flex;justify-content:center}
.gd-footer__mark-img{width:100%;max-width:1100px;opacity:.07;display:block}
.gd-footer__mark-img.logo--light{display:none}
html.dark-mode .gd-footer__mark:has(.logo--light) .logo--default{display:none}
html.dark-mode .gd-footer__mark .logo--light{display:block}
.gd-footer__bottom{display:flex;flex-wrap:wrap;gap:12px 24px;justify-content:space-between;margin-top:20px;padding-top:20px;border-top:1px solid #E3E6EE;font:400 12px 'Geist Mono',monospace;color:#667085}
/* Badge "Powered by ResIT" (regla fija del scaffold) */
.gd-footer__powered{display:flex;justify-content:center;margin-top:18px}
.gd-footer__powered img{height:22px;width:auto;display:block}

/* Capa flotante: sticky al fondo de la ventana, altura 0 */
.gd-float{position:sticky;bottom:0;height:0;z-index:60}

/* Barra de compra móvil (ficha de documento, isMobile) */
.gd-docbar{position:absolute;left:0;right:0;bottom:72px;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-top:1px solid #E9ECF2;padding:10px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 -10px 30px rgba(10,15,31,.06)}
.gd-docbar__main{flex:1;min-width:0}
.gd-docbar__price{font-size:24px;font-weight:600;letter-spacing:-.04em;line-height:1}
.gd-docbar__otros{font-size:12px;color:#7A8399;text-decoration:line-through}
.gd-docbar__cta{background:#1F3BFF;color:#fff;border-radius:14px;padding:14px 18px;font-size:15px;font-weight:600;text-decoration:none;white-space:nowrap}
.gd-docbar__cta:hover{color:#fff}

/* Barra de pestañas (isMobile) */
.gd-tabs{position:absolute;left:0;right:0;bottom:0;height:72px;background:rgba(255,255,255,.96);backdrop-filter:blur(16px);border-top:1px solid #E9ECF2;display:flex;align-items:center;justify-content:space-around;padding:0 6px 8px;z-index:2}
.gd-tabs__search{width:58px;height:58px;margin-top:-28px;border-radius:50%;border:4px solid #fff;background:#1F3BFF;color:#fff;box-shadow:0 12px 26px -6px rgba(31,59,255,.65);cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none;animation:gdPulse 2.6s infinite}
.gd-tabs__search-ring{width:16px;height:16px;border:2.4px solid #fff;border-radius:50%;display:block}
.gd-tabs__item{flex:1;background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 0 4px;cursor:pointer;color:#667085;font-size:11.5px;font-weight:600;min-height:52px}
.gd-tabs__item:hover{color:#667085}
.gd-tabs__dot{width:18px;height:3px;border-radius:2px;background:transparent;display:block;transition:background .2s}
.gd-tabs__item.is-active,.gd-tabs__item.is-active:hover,.gd-float.is-chat .gd-tabs__item[data-gd-tab-chat]{color:#1F3BFF}
.gd-tabs__item.is-active .gd-tabs__dot,.gd-float.is-chat .gd-tabs__item[data-gd-tab-chat] .gd-tabs__dot{background:#1F3BFF}

/* WhatsApp flotante (página de migración) */
.gd-wafab{position:absolute;left:16px;bottom:20px;display:flex;align-items:center;gap:8px;background:#25D366;color:#05230F;border-radius:999px;padding:14px 18px;font-size:15px;font-weight:600;text-decoration:none;box-shadow:0 12px 30px -8px rgba(37,211,102,.6)}
.gd-wafab:hover{color:#05230F}
.gd-wafab__dot{width:8px;height:8px;border-radius:50%;background:#05230F;display:block}

/* Launcher del chat */
.gd-launcher{position:absolute;right:16px;bottom:20px;display:flex;align-items:flex-end;gap:10px}
.gd-launcher__teaser{max-width:230px;background:#fff;border:1px solid #E9ECF2;border-radius:16px 16px 4px 16px;padding:11px 14px;font-size:14px;line-height:1.35;color:#1B2236;text-align:left;box-shadow:0 16px 40px -10px rgba(10,15,31,.25);cursor:pointer;animation:gdIn .4s ease}
.gd-launcher__teaser[hidden]{display:none}
.gd-launcher__btn{width:60px;height:60px;border-radius:50%;background:#1F3BFF;color:#fff;border:0;font-size:22px;font-weight:700;cursor:pointer;animation:gdPulse 2.4s infinite;flex:none}
.gd-float.is-chat .gd-launcher{display:none}

/* Panel del chat */
.gd-chat{position:absolute;right:20px;bottom:20px;width:400px;height:min(640px, calc(100vh - 140px));background:#fff;border-radius:24px;box-shadow:0 0 0 1px rgba(10,15,31,.06), 0 40px 100px -20px rgba(10,15,31,.35), 0 0 60px -20px rgba(31,59,255,.35);display:flex;flex-direction:column;overflow:hidden;animation:gdPop .25s ease}
.gd-chat[hidden]{display:none}
.gd-chat__head{padding:14px 16px;display:flex;align-items:center;gap:10px;flex:none;border-bottom:1px solid #EEF0F5;background:linear-gradient(180deg,#F4F6FF,#fff)}
.gd-chat__logo{width:36px;height:36px;border-radius:11px;background:#1F3BFF;color:#fff;font-weight:700;font-size:17px;display:flex;align-items:center;justify-content:center;flex:none}
.gd-chat__who{flex:1;min-width:0}
.gd-chat__name{font-weight:600;font-size:15px}
.gd-chat__status{display:flex;align-items:center;gap:6px;font-size:12px;color:#667085}
.gd-chat__status-dot{width:6px;height:6px;border-radius:50%;background:#0E9F6E;display:block}
.gd-chat__close{width:34px;height:34px;border-radius:10px;background:#F3F5F9;color:#0A0F1F;border:0;font-size:18px;cursor:pointer}
.gd-chat__msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#FCFCFE}
.gd-chat__replies{display:flex;gap:6px;padding:8px 12px 0;flex-wrap:wrap;flex:none}
.gd-chat__reply{background:#fff;color:#1B2236;border:1px solid #E3E6EE;border-radius:999px;padding:8px 12px;font-size:13px;font-weight:500;cursor:pointer}
.gd-chat__reply--main{background:#1F3BFF;color:#fff;border-color:#1F3BFF}
.gd-chat__foot{padding:10px 12px 10px;flex:none}
.gd-chat__field{display:flex;gap:8px;background:#F6F7FB;border:1px solid #E9ECF2;border-radius:14px;padding:4px 4px 4px 14px;align-items:center}
.gd-chat__input{flex:1;min-width:0;border:0;outline:none;font-size:15px;background:transparent;padding:10px 0;color:#0A0F1F}
.gd-chat__send{background:#1F3BFF;color:#fff;border:0;border-radius:10px;width:40px;height:40px;font-size:17px;cursor:pointer}
.gd-chat__legal{font-size:11px;color:#667085;text-align:center;margin-top:7px}

/* Mensajes (los pinta design.js) */
.gd-msg-bot{align-self:flex-start;max-width:88%;animation:gdIn .3s ease}
.gd-msg-bot__bubble{background:#F3F5F9;border-radius:16px 16px 16px 4px;padding:11px 13px;font-size:15px;line-height:1.45;color:#1B2236}
.gd-msg-bot__legal{font-size:11.5px;color:#0E7A55;margin-top:5px;padding-left:4px}
.gd-msg-bot__prog{display:flex;align-items:center;gap:8px;margin-top:6px;padding-left:4px}
.gd-msg-bot__bar{flex:1;height:3px;background:#E9ECF2;border-radius:2px;position:relative;overflow:hidden;display:block}
.gd-msg-bot__fill{position:absolute;left:0;top:0;bottom:0;background:#1F3BFF;display:block}
.gd-msg-bot__prog-t{font:400 11px 'Geist Mono',monospace;color:#98A2B3}
.gd-msg-user{align-self:flex-end;max-width:80%;background:#1F3BFF;color:#fff;border-radius:16px 16px 4px 16px;padding:10px 13px;font-size:15px;line-height:1.4;animation:gdIn .3s ease}
.gd-msg-rec{background:linear-gradient(135deg,#EEF1FF,#fff 70%);border:1px solid #C9D1FF;border-radius:18px;padding:14px;animation:gdPop .3s ease}
.gd-msg-rec__k{font:500 10.5px 'Geist Mono',monospace;color:#1F3BFF;letter-spacing:.1em}
.gd-msg-rec__name{font-size:17px;font-weight:600;letter-spacing:-.02em;margin-top:6px;line-height:1.2}
.gd-msg-rec__row{display:flex;align-items:baseline;gap:8px;margin-top:8px}
.gd-msg-rec__price{font-size:28px;font-weight:600;letter-spacing:-.04em}
.gd-msg-rec__sub{font-size:12px;color:#667085}
.gd-msg-rec__otros{font-size:12px;color:#7A8399;text-decoration:line-through}
.gd-msg-rec__meta{font-size:12px;color:#475069;margin-top:6px}
.gd-msg-card{background:#fff;border:1px solid #E9ECF2;border-radius:18px;padding:14px;animation:gdIn .3s ease}
.gd-msg-card__k{font:500 10.5px 'Geist Mono',monospace;color:#98A2B3;letter-spacing:.1em}
.gd-msg-card__list{margin-top:8px;display:flex;flex-direction:column}
.gd-msg-card__row{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #F3F5F9;font-size:13px}
.gd-msg-card__row span{color:#667085}
.gd-msg-card__row b{text-align:right;font-weight:500}
.gd-msg-card__total{display:flex;justify-content:space-between;margin-top:10px;font-size:15px}
.gd-msg-pay__opts{display:flex;gap:8px;margin-top:8px}
.gd-msg-pay__opt{flex:1;border:1.5px solid #1F3BFF;background:#EEF1FF;border-radius:12px;padding:10px}
.gd-msg-pay__opt-l{font-size:12px;color:#475069}
.gd-msg-pay__opt-p{font-size:17px;font-weight:600}
.gd-msg-pay__opt--alt{border:1px solid #E9ECF2;background:none}
.gd-msg-pay__opt--alt .gd-msg-pay__opt-l{color:#667085}
.gd-msg-pay__opt--alt .gd-msg-pay__opt-p{color:#475069}
.gd-msg-pay__card{margin-top:8px;border:1px solid #E9ECF2;border-radius:12px;padding:11px;font:400 13px 'Geist Mono',monospace;color:#667085}
.gd-msg-card__note{font-size:11.5px;color:#667085;margin-top:8px}
.gd-msg-sign__row{display:flex;justify-content:space-between;padding:8px 0;font-size:13px}
.gd-msg-sign__row--first{border-bottom:1px solid #F3F5F9;margin-top:4px}
.gd-msg-sign__ok{color:#0E9F6E;font-weight:600}
.gd-msg-sign__wait{color:#9A5B00;font-weight:600}
.gd-msg-sign__mail{border:1px solid #E9ECF2;border-radius:12px;padding:10px;font-size:13px;color:#98A2B3;margin-top:4px}
.gd-msg-law{background:#FFF4E5;border-radius:18px;padding:14px;animation:gdPop .3s ease}
.gd-msg-law__row{display:flex;gap:10px;align-items:center}
.gd-msg-law__avatar{width:44px;height:44px;border-radius:50%;background:repeating-linear-gradient(135deg,#F3DDBA 0 5px,#FBEAD0 5px 10px);flex:none;display:block}
.gd-msg-law__n{font-weight:600}
.gd-msg-law__e{font-size:12px;color:#5B4630}
.gd-msg-law__t{font-size:13px;color:#5B4630;margin-top:10px}

/* Responsive (isMobile / w ≥ 420) */
@media (min-width:760px){
  .gd-docbar,.gd-tabs{display:none}
}
@media (max-width:759.98px){
  .gd-launcher{display:none}
  .gd-wafab{bottom:88px}
  body.single-gd_documento .gd-wafab{bottom:160px}
  .gd-chat{right:8px;bottom:80px;width:calc(100% - 16px);height:min(640px, calc(100vh - 230px))}
}
@media (max-width:419.98px){
  .gd-launcher__teaser{display:none}
}

/* Móvil: la barra de pestañas (72 px) y la barra de compra (72 px más en la ficha)
   tapaban el final del pie (texto legal y "powered by"). */
@media (max-width:759.98px){
  .gd-footer__inner{padding-bottom:100px}
  body.single-gd_documento .gd-footer__inner{padding-bottom:172px}
  .gd-footer__link{padding:6px 0} /* área táctil */
}
.gd-footer__powered img{filter:brightness(0);opacity:.45} /* el PNG del scaffold es blanco; el pie del diseño es claro */

/* ── Tu carpeta (panel tipo carrito, public/js/design.js · Kit) ── */
.gd-kit{position:fixed;inset:0;z-index:2147483600}
.gd-kit[hidden]{display:none}
html.gd-kit-open{overflow:hidden}
.gd-kit__scrim{position:absolute;inset:0;background:rgba(10,15,31,.42);animation:gdKitFade .2s ease}
.gd-kit__sheet{position:absolute;top:12px;right:12px;bottom:12px;width:min(440px, calc(100% - 24px));background:#fff;border-radius:24px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 0 1px rgba(10,15,31,.06), 0 40px 100px -20px rgba(10,15,31,.35), 0 0 60px -20px rgba(31,59,255,.35);animation:gdKitIn .28s cubic-bezier(.2,.8,.2,1)}
.gd-kit__head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:20px 20px 16px;border-bottom:1px solid #EEF0F5;background:linear-gradient(180deg,#F4F6FF,#fff)}
.gd-kit__k{font:500 11px 'Geist Mono',monospace;color:#1F3BFF;letter-spacing:.1em}
.gd-kit__t{font-size:21px;font-weight:600;letter-spacing:-.02em;margin-top:6px;color:#0A0F1F;line-height:1.2}
.gd-kit__close{flex:none;width:34px;height:34px;border-radius:50%;border:0;background:#EEF0F5;color:#475069;font-size:20px;line-height:1;cursor:pointer}
.gd-kit__close:hover{background:#E3E6EE;color:#0A0F1F}
.gd-kit__body{flex:1;overflow:auto;padding:16px 20px}
.gd-kit__list{border:1px solid #E9ECF2;border-radius:18px;overflow:hidden}
.gd-kit__item{display:flex;gap:12px;align-items:center;padding:14px 16px;border-bottom:1px solid #EEF0F5;cursor:pointer;font-size:15px;color:#98A2B3;transition:background .15s,color .15s}
.gd-kit__item:last-child{border-bottom:0}
.gd-kit__item.is-on{color:#1B2236}
.gd-kit__item:hover{background:#F7F8FB}
.gd-kit .gd-kit__cb{-webkit-appearance:none;appearance:none;width:22px;height:22px;flex:none;margin:0;padding:0;border:1.5px solid #C9D1FF;border-radius:7px;background:#fff;cursor:pointer;transition:background .15s,border-color .15s}
.gd-kit .gd-kit__cb:checked{background:#1F3BFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;border-color:#1F3BFF}
.gd-kit .gd-kit__cb:focus-visible{outline:2px solid #1F3BFF;outline-offset:2px}
.gd-kit__n{font:500 11px 'Geist Mono',monospace;color:#1F3BFF;background:#EEF2FF;border-radius:7px;padding:3px 6px;flex:none}
.gd-kit__item:not(.is-on) .gd-kit__n{color:#98A2B3;background:#F3F5F9}
.gd-kit__name{flex:1;min-width:0;line-height:1.35}
.gd-kit__ps{font:400 13px 'Geist Mono',monospace;color:#98A2B3;white-space:nowrap}
.gd-kit__facts{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.gd-kit__facts span{font-size:12px;color:#475069;background:#F3F5F9;border-radius:999px;padding:5px 10px}
.gd-kit__total{display:flex;justify-content:space-between;align-items:baseline;margin-top:18px;padding-top:16px;border-top:1px dashed #D5DAE5}
.gd-kit__total-l{font-size:15px;color:#475069}
.gd-kit__total-v{display:flex;gap:10px;align-items:baseline}
.gd-kit__total-v b{font-size:30px;font-weight:600;letter-spacing:-.03em;color:#0A0F1F}
.gd-kit__was{font-size:16px;color:#98A2B3}
.gd-kit__save{margin-top:6px;text-align:right;font-size:14px;font-weight:600;color:#0E9F6E}
.gd-kit__note{margin-top:14px;background:#FFF4E5;border-radius:16px;padding:14px 16px;font-size:14px;line-height:1.45;color:#5B4630}
.gd-kit__sep{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.gd-kit__one{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 14px;border:1px solid #E9ECF2;border-radius:14px;font-size:14px;color:#1B2236;text-decoration:none}
.gd-kit__one b{font-size:13px;font-weight:600;color:#1F3BFF;white-space:nowrap}
.gd-kit__one:hover{border-color:#C9D1FF;color:#1B2236}
.gd-kit__one.is-off{color:#98A2B3}
.gd-kit__one.is-off b{color:#98A2B3;font-weight:500}
.gd-kit__status{margin-top:14px;background:#FDECEC;color:#9B1C1C;border-radius:14px;padding:12px 14px;font-size:14px;line-height:1.45}
.gd-kit__foot{flex:none;padding:16px 20px 20px;border-top:1px solid #EEF0F5}
.gd-kit__cta{display:block;width:100%;border:0;background:#1F3BFF;color:#fff;border-radius:14px;padding:16px;font-size:16px;font-weight:600;cursor:pointer;box-shadow:0 10px 26px -8px rgba(31,59,255,.6)}
.gd-kit__cta:hover{background:#1A32DB}
.gd-kit__cta[aria-busy="true"]{cursor:progress}
.gd-kit__cta--ghost{background:#EEF2FF;color:#1F3BFF;box-shadow:none}
.gd-kit__cta--ghost:hover{background:#E1E7FF}
.gd-kit__legal{margin-top:10px;font-size:12px;line-height:1.45;color:#98A2B3;text-align:center}
@keyframes gdKitIn{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
@keyframes gdKitFade{from{opacity:0}to{opacity:1}}
@media (max-width:759px){
  .gd-kit__sheet{top:auto;left:0;right:0;bottom:0;width:100%;max-height:88vh;border-radius:24px 24px 0 0;animation-name:gdKitUp;overflow-y:auto;display:block}
  .gd-kit__body{overflow:visible}
  .gd-kit__t{font-size:19px}
  @keyframes gdKitUp{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
}
@media (min-width:760px) and (max-height:560px){.gd-kit__sheet{overflow-y:auto;display:block}.gd-kit__body{overflow:visible}}
@media (max-width:759px) and (min-height:561px){.gd-kit__foot{position:sticky;bottom:0;background:#fff}}
@media (prefers-reduced-motion:reduce){.gd-kit__sheet,.gd-kit__scrim{animation:none}}

/* Aviso breve (no se pudo iniciar el trámite) */
.gd-toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);max-width:min(460px, calc(100% - 32px));background:#0A0F1F;color:#fff;border-radius:14px;padding:14px 18px;font-size:14px;line-height:1.45;box-shadow:0 20px 50px -15px rgba(10,15,31,.5);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:2147483601}
.gd-toast.is-on{opacity:1;transform:translate(-50%,0)}
@media (max-width:759px){.gd-toast{bottom:150px}}
