
:root{
  --smartira-black:#0b3d91;
  --smartira-dark:#1557b0;
  --smartira-blue:#1769e0;
  --smartira-blue2:#4a90e2;
  --smartira-cyan:#dcecff;
  --smartira-orange:#1769e0;
  --smartira-orange2:#4a90e2;
  --smartira-white:#ffffff;
}

.smartira-chat-button{
  position:fixed!important;
  right:22px!important;
  bottom:105px!important;
  width:72px!important;
  height:72px!important;
  padding:0!important;
  border:2px solid rgba(9,105,255,.22)!important;
  border-radius:16px!important;
  overflow:hidden!important;
  cursor:pointer!important;
  z-index:2147483647!important;
  background:#ffffff!important;
  box-shadow:0 10px 35px rgba(0,0,0,.24),0 0 0 4px rgba(9,105,255,.08),0 0 20px rgba(22,213,245,.18)!important;
  transition:transform .2s ease,box-shadow .2s ease!important;
}
.smartira-chat-button:hover{
  transform:scale(1.06)!important;
  box-shadow:0 12px 40px rgba(0,0,0,.42),0 0 0 7px rgba(9,105,255,.13),0 0 28px rgba(22,213,245,.38)!important;
}
.smartira-chat-button img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.smartira-chat-pulse{
  position:absolute;
  right:3px;
  top:3px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#1769e0;
  border:2px solid #ffffff;
  box-shadow:0 0 0 4px rgba(23,105,224,.15);
}

.smartira-chat-window{
  position:fixed!important;
  right:22px!important;
  bottom:189px!important;
  width:330px!important;
  max-width:calc(100vw - 32px)!important;
  height:480px!important;
  max-height:calc(100vh - 120px)!important;
  background:#fff!important;
  border-radius:18px!important;
  overflow:hidden!important;
  z-index:2147483646!important;
  box-shadow:0 24px 70px rgba(0,0,0,.30),0 0 0 1px rgba(9,105,255,.14)!important;
  display:none;
  flex-direction:column;
  font-family:inherit;
}
.smartira-chat-window.smartira-open{display:flex!important;animation:smartiraChatIn .22s ease-out}
@keyframes smartiraChatIn{
  from{opacity:0;transform:translateY(12px) scale(.97)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.smartira-chat-header{
  position:relative;
  padding:16px 16px 15px;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(135deg,#1769e0 0%,#2f7de1 55%,#4a90e2 100%);
}
.smartira-chat-header:after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;height:3px;
  background:#ffffff;
}
.smartira-chat-brand{display:flex;align-items:center;gap:10px}
.smartira-chat-mini-icon{
  width:42px;height:42px;border-radius:13px;overflow:hidden;
  border:1px solid rgba(255,255,255,.45);
  box-shadow:0 4px 16px rgba(0,0,0,.25);
  background:#1769e0;
}
.smartira-chat-mini-icon img{width:100%;height:100%;object-fit:cover;display:block}
.smartira-chat-brand strong{display:block;font-size:17px;line-height:1.2}
.smartira-chat-brand span{display:block;font-size:12px;opacity:.84;margin-top:3px}
#smartira-chat-close{
  width:34px;height:34px;border:0!important;border-radius:50%!important;
  background:rgba(255,255,255,.18)!important;color:#fff!important;
  font-size:25px!important;line-height:1!important;cursor:pointer!important;
}
#smartira-chat-close:hover{background:rgba(255,255,255,.24)!important}

.smartira-chat-messages{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:18px 14px;
  background:#f7faff;
}
.smartira-welcome{
  width:max-content;
  max-width:86%;
  padding:12px 15px;
  margin:4px 0 12px auto;
  color:#111827;
  background:#fff;
  border:1px solid rgba(9,105,255,.12);
  border-right:4px solid #1769e0;
  border-radius:16px 16px 4px 16px;
  box-shadow:0 5px 18px rgba(9,105,255,.08);
  line-height:1.8;
}
.smartira-welcome strong{display:block;font-size:15px}
.smartira-welcome span{display:block;font-size:14px;color:#4b5563}

.smartira-message{
  display:flex;
  margin:7px 0;
}
.smartira-message.customer{justify-content:flex-start}
.smartira-message.admin{justify-content:flex-end}
.smartira-bubble{
  max-width:82%;
  padding:10px 13px;
  border-radius:16px;
  line-height:1.7;
  font-size:14px;
  word-break:break-word;
}
.smartira-message.customer .smartira-bubble{
  color:#111827;
  background:#fff;
  border:1px solid #e5e7eb;
  border-bottom-right-radius:4px;
}
.smartira-message.admin .smartira-bubble{
  color:#fff;
  background:#1769e0;
  border-bottom-left-radius:4px;
  box-shadow:0 5px 15px rgba(9,105,255,.18);
}
.smartira-time{display:block;font-size:10px;opacity:.62;margin-top:4px}

.smartira-chat-form{
  padding:10px 12px 9px;
  background:#fff;
  border-top:1px solid #e8edf4;
}
.smartira-chat-input-row{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px;
  border-radius:16px;
  background:#f1f4f8;
  border:1px solid #e1e7ef;
}
#smartira-chat-input{
  flex:1!important;
  min-width:0!important;
  height:44px!important;
  padding:0 12px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:14px!important;
  color:#111827!important;
}
#smartira-chat-send{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
  border:0!important;
  border-radius:13px!important;
  color:#fff!important;
  cursor:pointer!important;
  font-size:21px!important;
  background:#1769e0!important;
  box-shadow:0 5px 15px rgba(9,105,255,.25)!important;
}
#smartira-chat-send:hover{filter:brightness(1.06)}
.smartira-chat-footer{
  text-align:center;
  font-size:10px;
  color:#8a94a6;
  padding-top:6px;
}
.smartira-chat-error{
  color:#d93636;
  font-size:11px;
  padding:0 5px 4px;
  min-height:0;
}
.smartira-chat-error:empty{display:none}

@media (max-width:600px){
  .smartira-chat-button{right:14px!important;bottom:90px!important;width:64px!important;height:64px!important}
  .smartira-chat-window{
    right:16px!important;
    bottom:164px!important;
    width:calc(100vw - 32px)!important;
    max-width:none!important;
    height:min(500px,calc(100vh - 120px))!important;
    border-radius:18px!important;
  }
}


/* SmartIRA final: permanent launcher + gentle attention pulse */
@keyframes smartiraAttentionPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.10);
    filter: brightness(1.14);
  }
}

.smartira-chat-button {
  animation: smartiraAttentionPulse 1.8s ease-in-out infinite !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Mobile only: smaller chat window */
@media (max-width:600px){
  .smartira-chat-window{
    right:10px!important;
    bottom:145px!important;
    width:min(280px,calc(100vw - 44px))!important;
    max-width:280px!important;
    height:min(410px,calc(100vh - 170px))!important;
    max-height:calc(100vh - 170px)!important;
    border-radius:16px!important;
  }
}


/* SmartEra mobile refinement: compact chat + WhatsApp-like faded logo watermark */
.smartira-chat-messages{
  position:relative!important;
  isolation:isolate!important;
}
.smartira-chat-messages > *:not(.smartira-watermarks){
  position:relative;
  z-index:2;
}
.smartira-watermarks{
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
  pointer-events:none!important;
  z-index:1!important;
  opacity:.075!important;
}
.smartira-watermarks img{
  position:absolute!important;
  width:34px!important;
  height:34px!important;
  object-fit:cover!important;
  border-radius:10px!important;
  filter:grayscale(1)!important;
  opacity:.62!important;
  box-shadow:none!important;
}
/* intentionally irregular positions/sizes for a scattered, non-tiled look */
.smartira-watermarks img:nth-child(1){left:7%;top:7%;transform:rotate(-13deg) scale(.82)}
.smartira-watermarks img:nth-child(2){left:38%;top:4%;transform:rotate(18deg) scale(.68)}
.smartira-watermarks img:nth-child(3){left:76%;top:11%;transform:rotate(-7deg) scale(.95)}
.smartira-watermarks img:nth-child(4){left:20%;top:25%;transform:rotate(22deg) scale(.72)}
.smartira-watermarks img:nth-child(5){left:58%;top:22%;transform:rotate(-19deg) scale(.86)}
.smartira-watermarks img:nth-child(6){left:88%;top:31%;transform:rotate(11deg) scale(.65)}
.smartira-watermarks img:nth-child(7){left:4%;top:43%;transform:rotate(16deg) scale(.92)}
.smartira-watermarks img:nth-child(8){left:34%;top:39%;transform:rotate(-23deg) scale(.7)}
.smartira-watermarks img:nth-child(9){left:69%;top:46%;transform:rotate(9deg) scale(.8)}
.smartira-watermarks img:nth-child(10){left:17%;top:60%;transform:rotate(-8deg) scale(.66)}
.smartira-watermarks img:nth-child(11){left:49%;top:57%;transform:rotate(21deg) scale(.94)}
.smartira-watermarks img:nth-child(12){left:82%;top:64%;transform:rotate(-17deg) scale(.73)}
.smartira-watermarks img:nth-child(13){left:7%;top:78%;transform:rotate(5deg) scale(.76)}
.smartira-watermarks img:nth-child(14){left:39%;top:76%;transform:rotate(-14deg) scale(.9)}
.smartira-watermarks img:nth-child(15){left:73%;top:84%;transform:rotate(24deg) scale(.67)}
.smartira-watermarks img:nth-child(16){left:94%;top:91%;transform:rotate(-5deg) scale(.58)}

/* The launcher/logo is always present. The glow blinks, but the logo itself never fades out. */
.smartira-chat-button{
  visibility:visible!important;
  opacity:1!important;
  animation:smartiraAttentionPulse 1.8s ease-in-out infinite!important;
}
.smartira-chat-button img{
  visibility:visible!important;
  opacity:1!important;
  position:relative!important;
  z-index:2!important;
}
.smartira-chat-button::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:18px;
  pointer-events:none;
  z-index:3;
  box-shadow:0 0 0 0 rgba(23,105,224,.50),0 0 0 rgba(255,255,255,0);
  animation:smartiraLogoFlash 1.55s ease-in-out infinite;
}
@keyframes smartiraLogoFlash{
  0%,100%{opacity:.45;box-shadow:0 0 0 0 rgba(23,105,224,.08),0 0 0 rgba(255,255,255,0)}
  48%{opacity:1;box-shadow:0 0 0 5px rgba(23,105,224,.20),0 0 22px rgba(255,255,255,.75)}
  56%{opacity:.72;box-shadow:0 0 0 2px rgba(23,105,224,.10),0 0 8px rgba(255,255,255,.35)}
}
.smartira-chat-pulse{
  z-index:4!important;
}

/* Extra compact on phones */
@media (max-width:600px){
  .smartira-chat-window{
    right:8px!important;
    bottom:142px!important;
    width:min(258px,calc(100vw - 36px))!important;
    max-width:258px!important;
    height:min(385px,calc(100vh - 165px))!important;
    max-height:calc(100vh - 165px)!important;
    border-radius:15px!important;
  }
  .smartira-chat-header{padding:11px 11px 10px!important}
  .smartira-chat-mini-icon{width:34px!important;height:34px!important;border-radius:10px!important}
  .smartira-chat-brand{gap:7px!important}
  .smartira-chat-brand strong{font-size:14px!important}
  .smartira-chat-brand span{font-size:10px!important}
  .smartira-chat-messages{padding:12px 10px!important}
  .smartira-chat-form{padding:7px 8px 7px!important}
  #smartira-chat-input{height:38px!important;font-size:13px!important}
  #smartira-chat-send{width:38px!important;height:38px!important;flex-basis:38px!important}
}
