:root{
  --if-blue:#0E3425;
  --if-blue2:#14573B;
  --if-green:#28C57A;
  --if-text:#F3FFF8;
  --if-muted:rgba(243,255,248,.76);
  --if-border:rgba(255,255,255,.14);
  --if-shadow:0 18px 60px rgba(0,0,0,.42);
  --if-radius:18px;
  --if-font:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  --if-bubble-image:url('../assets/img/chatbot_logo_icon.png');
  --if-chat-button-image:url('../assets/img/chat_icon_custom.png');
  --if-wa-label:"WhatsApp";
}
 
/* ===== Dock fijo ===== */
.if-bubbleWrap{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:99999;
  display:flex;
  flex-direction:row;
  align-items:flex-end;
  gap:0;
  font-family:var(--if-font);
}
 
.if-socialLegend{
  display:none !important;
  max-width:260px;
  padding:0 4px;
  color:var(--if-text);
  font-size:12px;
  font-weight:800;
  line-height:1.25;
  text-align:center;
  opacity:.92;
}
 
/* ===== Barra social ===== */
.if-socialBar{
  display:flex !important;
  order:1;
  gap:6px;
  padding:3px 5px;
  border-radius:999px;
  border:1px solid var(--if-border);
  background:#123625 !important;
  backdrop-filter:none !important;
  box-shadow:var(--if-shadow);
  width:auto;
  max-width:none;
}
 
.if-ic{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--if-text);
  text-decoration:none;
  transition:transform .18s ease, filter .18s ease;
  overflow:hidden;
}
 
.if-ic:hover{
  transform:translateY(-2px);
  filter:brightness(1.08);
}
 
.if-ic svg{
  width:20px;
  height:20px;
  fill:var(--if-text);
  opacity:.95;
}
 
/* ===== Bot decorativo ===== */
.if-bubbleBtn{
  order:2;
  width:230px;
  height:150px;
  border-radius:0;
  border:none !important;
  background:transparent !important;
  color:var(--if-text);
  cursor:default !important;
  box-shadow:none !important;
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  transition:none !important;
  margin-left:-130px;
  margin-bottom:-33px;
  pointer-events:none !important;
  overflow:visible;
  flex:0 0 auto;
}
 
.if-bubbleBtn:hover{
  transform:none !important;
  filter:none !important;
}
 
.if-bubbleIcon{
  width:230px;
  height:150px;
  display:block;
  background-image:var(--if-bubble-image), url('../assets/img/chatbot_logo_icon.png');
  background-repeat:no-repeat, no-repeat;
  background-position:left bottom, left bottom;
  background-size:contain, contain;
}
 
/* quitar por completo el punto verde */
.if-badgeOnline{
  display:none !important;
}
 
/* ===== Panel ===== */
.if-panel{
  position:fixed;
  right:18px;
  bottom:128px !important;
  width:min(440px, calc(100vw - 40px));
  height:min(620px, calc(100vh - 170px));
  border-radius:var(--if-radius);
  border:1px solid rgba(255,255,255,.12);
  background:#0f2b1f !important;
  box-shadow:var(--if-shadow);
  overflow:hidden;
  z-index:99998;
  display:flex;
  flex-direction:column;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  font-family:var(--if-font);
  color:var(--if-text);
}
 
.if-panel.is-open{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
 
/* ===== Header ===== */
.if-header{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 12px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:#123625 !important;
}
 
.if-header > div{
  min-width:0;
}
 
.if-title{
  font-weight:1000;
  font-size:14px;
  line-height:1.15;
  margin:0;
  white-space:normal;
}
 
.if-subtitle{
  color:var(--if-muted);
  font-size:12px;
  margin-top:3px;
  line-height:1.2;
  white-space:normal;
}
 
.if-close{
  flex:0 0 auto;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--if-border);
  background:rgba(255,255,255,.06);
  color:var(--if-text);
  cursor:pointer;
  font-size:22px;
  line-height:1;
  display:grid;
  place-items:center;
  backdrop-filter:none !important;
}
 
/* ===== Acciones rápidas ===== */
.if-actions{
  flex:0 0 auto;
  padding:12px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:#0f2b1f !important;
}
 
.if-card{
  border-radius:16px;
  border:1px solid var(--if-border);
  background:#173d2b !important;
  color:var(--if-text);
  padding:12px;
  text-align:left;
  font-weight:1000;
  cursor:pointer;
  transition:transform .18s ease, filter .18s ease;
  backdrop-filter:none !important;
}
 
.if-card small{
  display:block;
  color:var(--if-muted);
  font-weight:800;
  margin-top:5px;
  line-height:1.15;
}
 
.if-card:hover{
  transform:translateY(-2px);
  filter:brightness(1.06);
}
 
/* ===== Chat ===== */
.if-chat{
  flex:1 1 auto;
  min-height:0;
  padding:12px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#0f2b1f !important;
}
 
.if-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--if-border);
  font-size:13.3px;
  line-height:1.25rem;
  white-space:pre-line;
}
 
.if-bot{
  background:#173d2b !important;
  backdrop-filter:none !important;
}
 
.if-user{
  margin-left:auto;
  background:#1f5a3f !important;
  backdrop-filter:none !important;
}
 
/* ===== Composer ===== */
.if-composer{
  flex:0 0 auto;
  display:flex;
  gap:10px;
  padding:12px;
  border-top:1px solid rgba(255,255,255,.10);
  background:#123625 !important;
}
 
.if-composer input{
  flex:1;
  border-radius:14px;
  border:1px solid var(--if-border);
  background:rgba(255,255,255,.06);
  color:var(--if-text);
  padding:12px;
  outline:none;
  backdrop-filter:none !important;
}
 
.if-composer input::placeholder{
  color:rgba(234,242,255,.55);
}
 
.if-composer button{
  width:48px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:linear-gradient(135deg, var(--if-green), #8FE3AD);
  color:#072114;
  font-weight:1000;
  cursor:pointer;
}
 
/* ===== Fix header ===== */
#ifPanel .if-header{
  position:relative !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  inset:auto !important;
  transform:none !important;
  width:100% !important;
  z-index:2 !important;
}
 
#ifPanel .if-actions{
  position:relative;
  z-index:1;
}
 
/* ===== Botones rápidos ===== */
.if-quickRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:2px;
}
 
.if-quickBtn{
  border-radius:999px;
  border:1px solid var(--if-border);
  background:rgba(255,255,255,.06);
  color:var(--if-text);
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
  transition:transform .18s ease, filter .18s ease;
}
 
.if-quickBtn:hover{
  transform:translateY(-1px);
  filter:brightness(1.06);
}
 
/* ===== Formulario lead ===== */
.if-mobileLead{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:18px 18px 16px;
}
 
.if-mobileLead__intro h3{
  margin:0 0 6px;
  font-size:22px;
  line-height:1.15;
  font-weight:1000;
}
 
.if-mobileLead__intro p{
  margin:0 0 12px;
  color:var(--if-muted);
  font-size:13px;
  line-height:1.35;
}
 
.if-leadForm{
  display:flex;
  flex-direction:column;
  gap:10px;
}
 
.if-formGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
 
.if-formField{
  display:flex;
  flex-direction:column;
  gap:6px;
}
 
.if-formField span{
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
}
 
.if-formField input,
.if-formField select,
.if-formField textarea{
  width:100%;
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.96);
  color:#173224;
  padding:11px 13px;
  outline:none;
  font:inherit;
}
 
.if-formField textarea{
  resize:vertical;
  min-height:84px;
}
 
.if-formField .is-error,
.if-formField input.is-error,
.if-formField select.is-error,
.if-formField textarea.is-error{
  border-color:#ff8585;
  box-shadow:0 0 0 3px rgba(255,133,133,.15);
}
 
.if-fieldError{
  color:#ffc1c1;
  font-size:11px;
  line-height:1.2;
}
 
.if-formFooter{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:4px;
}
 
.if-formNote{
  color:var(--if-muted);
  font-size:12px;
  text-align:center;
}
 
.if-formMortgageNote{
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--if-text);
  font-size:12.5px;
  font-weight:800;
  line-height:1.35;
}
 
.if-formSubmit{
  border:none;
  border-radius:16px;
  min-height:48px;
  padding:14px 16px;
  background:linear-gradient(135deg, var(--if-green), #8FE3AD);
  color:#072114;
  font-weight:1000;
  font-size:14px;
  cursor:pointer;
}
 
.if-formSubmit:disabled{
  opacity:.7;
  cursor:wait;
}
 
.if-formStatus{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  padding:10px 12px;
  font-size:12px;
  line-height:1.3;
}
 
.if-formStatus.is-ok{
  border-color:rgba(143,227,173,.45);
  background:rgba(143,227,173,.12);
}
 
/* ===== Iconos personalizados ===== */
.if-ic--whatsapp,
.if-ic--chat{
  background-repeat:no-repeat;
  background-position:center;
  background-origin:border-box;
  padding:0;
  background-color:transparent !important;
  border:none !important;
  box-shadow:none !important;
}
 
.if-ic--whatsapp{
  background-image:url('../assets/img/whatsapp_icon_custom.png') !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:90% auto !important;
  width:46px !important;
  height:46px !important;
  min-width:46px !important;
  min-height:46px !important;
  flex:0 0 46px !important;
  border-radius:999px !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
  border:none !important;
  box-shadow:none !important;
  background-color:transparent !important;
} 
 
.if-ic--chat{
  background-image:var(--if-chat-button-image);
  background-size:100% 100%;
}
  
.if-ic--whatsapp svg,
.if-ic--chat::before,
.if-ic--whatsapp::before{
  display:none !important;
  content:none !important;
}
 
.if-ic--x svg{
  width:19px;
  height:19px;
}
 
/* ===== Interacción ===== */
#ifBubbleBtn{
  pointer-events:none !important;
  cursor:default !important;
}
 
#ifChatOpenBtn{
  cursor:pointer !important;
}
 
/* ===== Tablet ===== */
@media (max-width: 980px){
  .if-panel{
    width:min(410px, calc(100vw - 28px));
    height:min(560px, calc(100vh - 150px));
    bottom:118px !important;
  }
 
  .if-bubbleWrap{
    gap:0;
    align-items:flex-end;
  }
 
  .if-socialBar{
    gap:5px;
    padding:3px 4px;
  }
 
  .if-ic{
    width:40px;
    height:40px;
  }

.if-ic--whatsapp{
  background-size:95% auto !important;
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  min-height:40px !important;
  flex:0 0 40px !important;
}

 
  .if-bubbleBtn{
    width:200px;
    height:132px;
    margin-left:-38px;
    margin-bottom:-2px;
  }
 
  .if-bubbleIcon{
    width:200px;
    height:132px;
    background-position:left bottom;
    background-size:contain;
  }
}
 
/* ===== Mobile ===== */
@media (max-width: 767px){
  .if-panel{
    width:min(348px, calc(100vw - 12px));
    height:min(78vh, 640px);
    right:6px;
    left:auto;
    bottom:92px !important;
    border-radius:18px;
  }
 
  .if-actions,
  .if-chat,
  .if-composer{
    display:none;
  }
 
  .if-bubbleWrap{
    right:10px;
    left:auto;
    bottom:10px;
    align-items:flex-end;
    gap:0;
  }
 
  .if-socialBar{
    display:flex !important;
    width:auto;
    max-width:none;
    gap:4px;
    padding:3px 4px;
    justify-content:center;
    align-items:flex-start;
  }
 
  .if-ic{
    width:32px;
    height:32px;
  }

.if-ic--whatsapp{
  background-size:95% auto !important;
  width:32px !important;
  height:32px !important;
  min-width:32px !important;
  min-height:32px !important;
  flex:0 0 32px !important;
}
 
  .if-bubbleBtn{
    width:152px;
    height:100px;
    margin-left:-94px;
    margin-bottom:-24px;
  }
 
  .if-bubbleIcon{
    width:152px;
    height:100px;
    background-position:left bottom;
    background-size:contain;
  }
 
  .if-header{
    padding:12px 12px 10px;
  }
 
  .if-title{
    font-size:15px;
  }
 
  .if-mobileLead{
    padding:10px 10px 12px;
  }

  .if-leadForm{
    gap:7px;
    padding:11px;
    border-radius:16px;
  }
 
  .if-mobileLead__intro h3{
    font-size:17px;
    margin-bottom:4px;
  }
 
  .if-mobileLead__intro p{
    font-size:11px;
    margin-bottom:8px;
    line-height:1.3;
  }
 
  .if-leadForm{
    gap:8px;
  }
 
  .if-formGrid{
    grid-template-columns:1fr;
    gap:8px;
  }
 
  .if-formField span{
    font-size:9px;
    letter-spacing:.02em;
  }
 
  .if-formField input,
  .if-formField select,
  .if-formField textarea{
    min-height:40px;
    padding:9px 10px;
    border-radius:11px;
    font-size:14px;
  }
 
  .if-formField textarea{
    min-height:68px;
  }
 
  .if-formSubmit{
    min-height:42px;
    font-size:13px;
    border-radius:13px;
    padding:11px 12px;
  }

  .if-formNote,.if-formMortgageNote,.if-formStatus{
    font-size:11px;
  }
}
 
@media (max-width: 520px){
  .if-panel{
    width:calc(100vw - 10px);
    height:min(76vh, 620px);
    right:5px;
    bottom:88px !important;
  }
 
  .if-formGrid{
    grid-template-columns:1fr;
  }
}
 
/* ===== Tarjetas servicios ===== */
.service-card{
  flex:0 1 calc(33.333% - 12px);
  max-width:calc(33.333% - 12px);
}
 
@media (max-width: 980px){
  .service-grid{
    flex-direction:column;
  }
 
  .service-card{
    max-width:100%;
  }
}
 

.if-formGrid--custom:empty{display:none;}
.if-formField--half{grid-column:span 1;}
.if-formStatus{font-weight:900;font-size:13px;line-height:1.35;border-width:2px;box-shadow:0 10px 24px rgba(0,0,0,.12);}
.if-formStatus.is-ok{background:linear-gradient(180deg, rgba(143,227,173,.22), rgba(143,227,173,.12)); color:#f5fff7; border-color:rgba(143,227,173,.65);}
.if-formStatus:not(.is-ok){background:linear-gradient(180deg, rgba(255,120,120,.12), rgba(255,255,255,.05));}
@media (max-width: 767px){ .if-formNote,.if-formMortgageNote,.if-formStatus{font-size:12px;} }
