*{box-sizing:border-box}.ffr-chat-root{position:fixed;right:24px;bottom:24px;z-index:999999;font-family:Inter,Arial,sans-serif}.ffr-chat-launcher{border:0;border-radius:999px;background:#11294f;color:#fff;padding:14px 18px;display:flex;align-items:center;gap:9px;font-weight:700;box-shadow:0 12px 35px rgba(15,35,67,.28);cursor:pointer}.ffr-chat-launcher:hover{transform:translateY(-1px)}.ffr-chat-launcher-icon{font-size:20px}.ffr-chat-badge{position:absolute;right:-2px;top:-5px;width:22px;height:22px;border-radius:50%;background:#d93b4b;color:#fff;font-size:12px;line-height:22px;text-align:center}.ffr-chat-window{position:absolute;right:0;bottom:66px;width:390px;max-height:min(720px,calc(100vh - 110px));background:#fff;border-radius:20px;box-shadow:0 24px 70px rgba(17,41,79,.26);overflow:hidden;opacity:0;transform:translateY(16px) scale(.98);pointer-events:none;transition:.22s ease}.ffr-chat-window.is-open{opacity:1;transform:none;pointer-events:auto}.ffr-chat-header{background:linear-gradient(135deg,#10284d,#1c477c);color:#fff;padding:18px 20px;display:flex;justify-content:space-between;align-items:center}.ffr-chat-header strong{display:block;font-size:17px}.ffr-chat-header span{display:flex;align-items:center;gap:7px;font-size:12px;margin-top:4px;opacity:.92}.ffr-chat-header i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#f4a340}.ffr-chat-header i.is-online{background:#35c46a}.ffr-chat-header button{border:0;background:transparent;color:#fff;font-size:28px;line-height:1;cursor:pointer}.ffr-chat-view{max-height:calc(100vh - 180px);overflow:auto}.ffr-prechat-intro{padding:20px 22px 4px}.ffr-prechat-intro h3{margin:0 0 6px;color:#10284d}.ffr-prechat-intro p{margin:0;color:#667085;font-size:13px;line-height:1.5}#ffr-prechat-form{padding:14px 22px 22px}#ffr-prechat-form label{display:block;font-size:12px;font-weight:700;color:#253858;margin-bottom:12px}#ffr-prechat-form em{color:#d93b4b;font-style:normal}#ffr-prechat-form input,#ffr-prechat-form select,#ffr-prechat-form textarea{width:100%;border:1px solid #d9e1ec;border-radius:10px;padding:11px 12px;font:inherit;margin-top:6px;outline:none;background:#fff}#ffr-prechat-form input:focus,#ffr-prechat-form select:focus,#ffr-prechat-form textarea:focus{border-color:#3868a6;box-shadow:0 0 0 3px rgba(56,104,166,.12)}#ffr-prechat-form textarea{min-height:90px;resize:vertical}.ffr-phone-row,.ffr-amount-row{display:grid;grid-template-columns:100px 1fr;gap:8px}.ffr-consent{display:flex!important;align-items:flex-start;gap:9px;font-weight:500!important;line-height:1.4}.ffr-consent input{width:auto!important;margin-top:2px!important}.ffr-primary-button{width:100%;border:0;border-radius:10px;background:#11294f;color:#fff;padding:13px 16px;font-weight:800;cursor:pointer}.ffr-primary-button:disabled{opacity:.6}.ffr-secure-note{text-align:center;color:#667085;font-size:11px;margin:10px 0 0}.ffr-form-error{color:#b42318;font-size:12px;margin-bottom:10px}.ffr-chat-messages{height:500px;max-height:calc(100vh - 270px);overflow:auto;padding:18px;background:#f5f8fc}.ffr-message{display:flex;flex-direction:column;margin-bottom:12px;align-items:flex-start}.ffr-message.is-visitor{align-items:flex-end}.ffr-message-bubble{max-width:84%;padding:10px 12px;border-radius:14px;background:#fff;color:#26364d;box-shadow:0 2px 8px rgba(17,41,79,.07);white-space:pre-wrap;font-size:13px;line-height:1.45}.ffr-message.is-visitor .ffr-message-bubble{background:#163c6d;color:#fff;border-bottom-right-radius:4px}.ffr-message.is-agent .ffr-message-bubble{background:#e8f3ff;border-bottom-left-radius:4px}.ffr-message.is-bot .ffr-message-bubble,.ffr-message.is-system .ffr-message-bubble{background:#fff8e8}.ffr-answer-options{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px;max-width:90%}.ffr-answer-options button{border:1px solid #b7c8dd;background:#fff;color:#14345e;border-radius:999px;padding:7px 10px;font-size:12px;cursor:pointer}.ffr-answer-options button:hover{background:#eef5fd}.ffr-answer-options button:disabled{opacity:.55}.ffr-message-form{display:grid;grid-template-columns:1fr 46px;gap:8px;padding:12px;background:#fff;border-top:1px solid #e8edf3}.ffr-message-form textarea{border:1px solid #d9e1ec;border-radius:12px;padding:10px 12px;resize:none;outline:none}.ffr-message-form button{border:0;border-radius:12px;background:#11294f;color:#fff;font-size:18px;cursor:pointer}@media(max-width:520px){.ffr-chat-root{right:12px;bottom:12px}.ffr-chat-window{position:fixed;inset:10px;width:auto;max-height:none;border-radius:16px;bottom:10px}.ffr-chat-launcher-label{display:none}.ffr-chat-messages{height:calc(100vh - 150px);max-height:none}.ffr-phone-row,.ffr-amount-row{grid-template-columns:92px 1fr}}/* v0.2 compact form */
.ffr-chat-window{width:380px;max-height:min(650px,calc(100vh - 90px))}.ffr-prechat-intro{padding:14px 20px 2px}.ffr-prechat-intro h3{font-size:24px}.ffr-prechat-intro p{font-size:12px}.ffr-chat-header{padding:15px 18px}#ffr-prechat-form{padding:10px 20px 16px}#ffr-prechat-form label{margin-bottom:8px;font-size:11px}#ffr-prechat-form input,#ffr-prechat-form select,#ffr-prechat-form textarea{padding:9px 10px;margin-top:4px;border-radius:9px}#ffr-prechat-form textarea{min-height:72px}.ffr-primary-button{padding:11px 14px}.ffr-chat-view{max-height:calc(100vh - 145px)}

.ffr-attachment-field small{display:block;margin-top:5px;color:#7a8798;font-size:10px;font-weight:500}
.ffr-attachment-field input[type=file]{padding:8px;background:#f8fafc;font-size:11px}
.ffr-optional{font-weight:500;color:#7a8798}

/* v0.2.4 chat composer attachment */
.ffr-message-form{grid-template-columns:38px 1fr 46px;align-items:end;position:relative}
.ffr-chat-attach-button{width:38px;height:42px;border:1px solid #d9e1ec;border-radius:12px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;background:#fff;margin:0}
.ffr-chat-attach-button:hover{background:#f4f7fb}
.ffr-chat-file-preview{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#eef4fb;border:1px solid #d7e3f1;border-radius:9px;padding:7px 9px;font-size:11px;color:#253858}
.ffr-chat-file-preview[hidden]{display:none}
.ffr-chat-file-preview button{width:24px;height:24px;min-width:24px;background:transparent;color:#52657d;border:0;border-radius:50%;font-size:18px;padding:0}
.ffr-message-attachment a{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit}
.ffr-message-attachment img{display:block;max-width:210px;max-height:180px;object-fit:cover;border-radius:8px}
.ffr-message-attachment span{font-size:11px;font-weight:700}

/* v0.2.5 - more compact pre-chat form */
.ffr-prechat-intro{padding:14px 22px 0}
.ffr-prechat-intro h3{font-size:21px;line-height:1.2;margin:0;color:#10284d}
#ffr-prechat-form{padding-top:12px;padding-bottom:30px}
#ffr-prechat-form .ffr-primary-button{margin-bottom:10px}

/* v0.2.6 mobile layout and country flag */
.ffr-country-select-wrap{position:relative;width:100%}
.ffr-country-select-wrap select{padding-left:42px!important}
.ffr-country-flag{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:17px;line-height:1;z-index:2;pointer-events:none}
#ffr-conversation-view:not([hidden]){display:flex;flex-direction:column;min-height:0}
#ffr-conversation-view .ffr-chat-messages{flex:1;min-height:0}
#ffr-conversation-view .ffr-message-form{flex:0 0 auto}
@media(max-width:520px){
  .ffr-chat-window{position:fixed;left:18px;right:18px;top:70px;bottom:auto;width:auto;height:auto;max-height:calc(100dvh - 90px);border-radius:20px}
  .ffr-chat-window:not(.is-conversation) .ffr-chat-view{max-height:calc(100dvh - 175px);overflow-y:auto}
  .ffr-chat-window:not(.is-conversation) #ffr-prechat-form{padding-bottom:18px}
  .ffr-chat-window.is-conversation{top:70px;bottom:18px;height:auto;max-height:none;display:flex;flex-direction:column}
  .ffr-chat-window.is-conversation .ffr-chat-header{flex:0 0 auto}
  .ffr-chat-window.is-conversation #ffr-conversation-view:not([hidden]){flex:1 1 auto;min-height:0;max-height:none;overflow:hidden;display:flex;flex-direction:column}
  .ffr-chat-window.is-conversation .ffr-chat-messages{flex:1 1 auto;height:auto;max-height:none;min-height:0;overflow-y:auto;padding-bottom:18px}
  .ffr-chat-window.is-conversation .ffr-message-form{position:relative;flex:0 0 auto;bottom:auto;background:#fff;z-index:5;border-top:1px solid #e8edf3;padding:10px}
  .ffr-prechat-intro{padding:14px 18px 0}
  #ffr-prechat-form{padding-left:18px;padding-right:18px}
  #ffr-prechat-form label{margin-bottom:10px}
  #ffr-prechat-form input,#ffr-prechat-form select{padding-top:10px;padding-bottom:10px}
  #ffr-prechat-form textarea{min-height:105px}
}

/* v0.2.7 custom country picker */
.ffr-country-select-wrap{display:none!important}
.ffr-country-picker{position:relative;width:100%;margin-top:6px}
.ffr-country-trigger{
    width:100%;
    min-height:42px;
    border:1px solid #d9e1ec;
    border-radius:10px;
    background:#fff;
    color:#253858;
    padding:0 9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    font:inherit;
    font-weight:700;
    cursor:pointer;
}
.ffr-country-current{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    line-height:1;
}
.ffr-country-current .ffr-country-flag{
    position:static;
    transform:none;
    font-size:17px;
    line-height:1;
}
.ffr-country-code{line-height:1}
.ffr-country-chevron{
    font-size:18px;
    line-height:1;
    margin-top:-3px;
}
.ffr-country-trigger:focus,
.ffr-country-picker.is-open .ffr-country-trigger{
    outline:none;
    border-color:#3868a6;
    box-shadow:0 0 0 3px rgba(56,104,166,.12)
}
.ffr-country-menu{
    position:absolute;
    left:0;
    top:calc(100% + 5px);
    width:195px;
    padding:5px;
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:10px;
    box-shadow:0 14px 35px rgba(17,41,79,.18);
    z-index:100;
}
.ffr-country-menu[hidden]{display:none}
.ffr-country-option{
    width:100%;
    border:0;
    border-radius:8px;
    background:#fff;
    padding:8px 9px;
    color:#253858;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    cursor:pointer;
    text-align:left;
}
.ffr-country-option:hover,
.ffr-country-option.is-selected{background:#eef5fd}
.ffr-country-option-main{
    display:flex;
    align-items:center;
    gap:6px;
    font-weight:700;
}
.ffr-country-option .ffr-country-flag{
    position:static;
    transform:none;
    font-size:17px;
    line-height:1;
}
.ffr-country-option small{
    font-size:10px;
    color:#6b778c;
    font-weight:500;
}

/* v0.2.8 */
.ffr-country-trigger{position:relative;padding-right:30px}
.ffr-country-chevron{position:absolute;right:10px;top:50%;transform:translateY(-50%);margin:0!important;display:flex;align-items:center;justify-content:center;width:16px;height:16px;line-height:16px}
.ffr-chat-window.is-switching{transition:none!important}

/* v0.2.9 - deterministic centered country chevron */
.ffr-country-trigger{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    min-height:42px!important;
    padding-right:38px!important;
}
.ffr-country-current{
    display:flex!important;
    align-items:center!important;
    align-self:stretch!important;
}
.ffr-country-chevron{
    position:absolute!important;
    right:14px!important;
    top:50%!important;
    width:8px!important;
    height:8px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-right:2px solid #253858!important;
    border-bottom:2px solid #253858!important;
    transform:translateY(-65%) rotate(45deg)!important;
    transform-origin:center!important;
    font-size:0!important;
    line-height:0!important;
    display:block!important;
    pointer-events:none!important;
}

/* v0.3.2 compact pre-chat */
@media (min-width: 769px) {
    #ffr-widget-status {
        white-space: nowrap;
        font-size: 13px;
    }
}

/* v0.3.6 FundsTracing frontend UI isolation + compact country menu */
.ffr-chat-root,
.ffr-chat-root *{box-sizing:border-box}

/* Launcher: high contrast on dark/black campaign heroes and immune to theme hover colors */
.ffr-chat-root .ffr-chat-launcher{
  background:#ffffff!important;
  color:#10284d!important;
  border:1px solid #d8e2ee!important;
  box-shadow:0 12px 34px rgba(0,0,0,.24)!important;
  min-height:52px;
  padding:13px 18px!important;
  transition:transform .18s ease,box-shadow .18s ease!important;
}
.ffr-chat-root .ffr-chat-launcher:hover,
.ffr-chat-root .ffr-chat-launcher:focus,
.ffr-chat-root .ffr-chat-launcher:active{
  background:#ffffff!important;
  color:#10284d!important;
  border-color:#b9c9dc!important;
  box-shadow:0 15px 38px rgba(0,0,0,.28)!important;
  transform:translateY(-1px);
  outline:none!important;
}
.ffr-chat-root .ffr-chat-launcher-icon{filter:none!important}

/* Keep every widget CTA navy; never inherit the site's red/pink hover state */
.ffr-chat-root .ffr-primary-button,
.ffr-chat-root .ffr-message-form button[type="submit"]{
  background:#11294f!important;
  color:#fff!important;
  border:1px solid #11294f!important;
  box-shadow:none!important;
}
.ffr-chat-root .ffr-primary-button:hover,
.ffr-chat-root .ffr-primary-button:focus,
.ffr-chat-root .ffr-primary-button:active,
.ffr-chat-root .ffr-message-form button[type="submit"]:hover,
.ffr-chat-root .ffr-message-form button[type="submit"]:focus,
.ffr-chat-root .ffr-message-form button[type="submit"]:active{
  background:#183d70!important;
  color:#fff!important;
  border-color:#183d70!important;
  outline:none!important;
}

/* Country trigger: compact and centered */
.ffr-chat-root .ffr-phone-row{grid-template-columns:104px minmax(0,1fr);gap:10px}
.ffr-chat-root .ffr-country-trigger{
  height:42px!important;
  min-height:42px!important;
  padding:0 31px 0 10px!important;
  border:1px solid #d9e1ec!important;
  background:#fff!important;
  color:#253858!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
.ffr-chat-root .ffr-country-current{
  width:auto!important;
  height:100%!important;
  gap:6px!important;
  justify-content:flex-start!important;
  line-height:1!important;
}
.ffr-chat-root .ffr-country-current .ffr-country-flag{font-size:16px!important}
.ffr-chat-root .ffr-country-code{font-size:13px!important;color:#253858!important}
.ffr-chat-root .ffr-country-chevron{right:12px!important;border-color:#253858!important}
.ffr-chat-root .ffr-country-trigger:hover,
.ffr-chat-root .ffr-country-trigger:focus,
.ffr-chat-root .ffr-country-picker.is-open .ffr-country-trigger{
  background:#fff!important;
  color:#253858!important;
  border-color:#3868a6!important;
  box-shadow:0 0 0 3px rgba(56,104,166,.10)!important;
}

/* Compact one-column dropdown instead of oversized tiles */
.ffr-chat-root .ffr-country-menu{
  left:0!important;
  top:calc(100% + 5px)!important;
  width:176px!important;
  min-width:176px!important;
  max-width:min(220px,calc(100vw - 48px))!important;
  padding:5px!important;
  border:1px solid #d9e1ec!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 12px 30px rgba(17,41,79,.18)!important;
  display:block;
  z-index:1000!important;
}
.ffr-chat-root .ffr-country-menu[hidden]{display:none!important}
.ffr-chat-root .ffr-country-option{
  display:flex!important;
  width:100%!important;
  min-height:40px!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  padding:7px 8px!important;
  margin:0!important;
  border:0!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#253858!important;
  box-shadow:none!important;
  text-align:left!important;
}
.ffr-chat-root .ffr-country-option + .ffr-country-option{margin-top:2px!important}
.ffr-chat-root .ffr-country-option:hover,
.ffr-chat-root .ffr-country-option:focus,
.ffr-chat-root .ffr-country-option.is-selected{
  background:#eef5fd!important;
  color:#10284d!important;
  outline:none!important;
}
.ffr-chat-root .ffr-country-option-main{
  flex:0 0 52px!important;
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  font-size:12px!important;
  font-weight:700!important;
}
.ffr-chat-root .ffr-country-option .ffr-country-flag{font-size:15px!important}
.ffr-chat-root .ffr-country-option small{
  display:block!important;
  flex:1 1 auto!important;
  margin:0!important;
  font-size:10px!important;
  line-height:1.2!important;
  color:#667085!important;
  white-space:nowrap!important;
}

/* Form controls remain neutral regardless of theme button/input styles */
.ffr-chat-root #ffr-prechat-form input,
.ffr-chat-root #ffr-prechat-form select,
.ffr-chat-root #ffr-prechat-form textarea{
  color:#253858!important;
  background:#fff!important;
  border-color:#d9e1ec!important;
}
.ffr-chat-root #ffr-prechat-form input:focus,
.ffr-chat-root #ffr-prechat-form select:focus,
.ffr-chat-root #ffr-prechat-form textarea:focus{
  border-color:#3868a6!important;
  box-shadow:0 0 0 3px rgba(56,104,166,.10)!important;
}

@media(max-width:520px){
  .ffr-chat-root{right:12px!important;bottom:14px!important}
  .ffr-chat-root .ffr-chat-launcher{
    width:54px!important;height:54px!important;min-height:54px!important;
    padding:0!important;justify-content:center!important;border-radius:50%!important;
  }
  .ffr-chat-root .ffr-chat-launcher-icon{font-size:21px!important}
  .ffr-chat-root .ffr-phone-row{grid-template-columns:102px minmax(0,1fr)!important;gap:8px!important}
  .ffr-chat-root .ffr-country-menu{width:172px!important;min-width:172px!important}
  .ffr-chat-root .ffr-country-option{min-height:39px!important;padding:7px!important}
}

/* v0.3.7 final frontend polish */
/* Questionnaire choices: keep labels readable even when the host theme styles buttons */
.ffr-chat-root .ffr-answer-options button,
.ffr-chat-root .ffr-answer-options button:hover,
.ffr-chat-root .ffr-answer-options button:focus,
.ffr-chat-root .ffr-answer-options button:active,
.ffr-chat-root .ffr-answer-options button:disabled{
  background:#fff!important;
  color:#14345e!important;
  -webkit-text-fill-color:#14345e!important;
  border:1px solid #b7c8dd!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
.ffr-chat-root .ffr-answer-options button:hover,
.ffr-chat-root .ffr-answer-options button:focus{
  background:#eef5fd!important;
  border-color:#8eabc9!important;
}
.ffr-chat-root .ffr-answer-options button:disabled{
  opacity:.58!important;
  cursor:default!important;
}

/* Bring country selector and phone number closer together */
.ffr-chat-root .ffr-phone-row{
  grid-template-columns:104px minmax(0,1fr)!important;
  gap:6px!important;
}

@media(max-width:520px){
  /* Larger, easier-to-notice/tap mobile launcher */
  .ffr-chat-root .ffr-chat-launcher{
    width:62px!important;
    height:62px!important;
    min-width:62px!important;
    min-height:62px!important;
    padding:0!important;
    justify-content:center!important;
    border-radius:50%!important;
  }
  .ffr-chat-root .ffr-chat-launcher-icon{
    font-size:25px!important;
    line-height:1!important;
  }
  .ffr-chat-root .ffr-phone-row{
    grid-template-columns:102px minmax(0,1fr)!important;
    gap:6px!important;
  }
}


/* v0.3.8 FundsTracing green accent. Scoped to frontend widget only. */
.ffr-chat-root .ffr-chat-launcher,
.ffr-chat-root .ffr-chat-launcher:hover,
.ffr-chat-root .ffr-chat-launcher:focus,
.ffr-chat-root .ffr-chat-launcher:active{
  background:#03a84e!important;
  border-color:#03a84e!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
.ffr-chat-root .ffr-chat-launcher:hover,
.ffr-chat-root .ffr-chat-launcher:focus{background:#028a40!important;border-color:#028a40!important}
.ffr-chat-root .ffr-primary-button,
.ffr-chat-root .ffr-message-form button[type="submit"]{
  background:#03a84e!important;border-color:#03a84e!important;color:#fff!important;
}
.ffr-chat-root .ffr-primary-button:hover,
.ffr-chat-root .ffr-primary-button:focus,
.ffr-chat-root .ffr-message-form button[type="submit"]:hover,
.ffr-chat-root .ffr-message-form button[type="submit"]:focus{
  background:#028a40!important;border-color:#028a40!important;color:#fff!important;
}
.ffr-chat-root .ffr-message.is-visitor .ffr-message-bubble{background:#03a84e!important;color:#fff!important}
.ffr-chat-root .ffr-chat-header i.is-online{background:#03a84e!important}
.ffr-chat-root .ffr-answer-options button:hover:not(:disabled),
.ffr-chat-root .ffr-answer-options button:focus:not(:disabled){background:#e8f8ef!important;border-color:#03a84e!important;color:#075c2f!important;-webkit-text-fill-color:#075c2f!important}
.ffr-chat-root #ffr-prechat-form input:focus,
.ffr-chat-root #ffr-prechat-form select:focus,
.ffr-chat-root #ffr-prechat-form textarea:focus{border-color:#03a84e!important;box-shadow:0 0 0 3px rgba(3,168,78,.12)!important}
.ffr-chat-root .ffr-chat-launcher-icon{filter:grayscale(1) brightness(0) invert(1)!important}

/* v0.3.9 FundsTracing green header */
.ffr-chat-root .ffr-chat-header{background:#03a84e!important;color:#fff!important;}
.ffr-chat-root .ffr-chat-header button{color:#fff!important;}
