.gf_otter_chat_holder {
    --gfo-margin: 2rem;
    --gfo-padding-x: 1rem;
    --gfo-padding-y: 0.5rem;
    --gfo-title-background: var(--e-global-color-accent, #333);
    --gfo-title-hover-background: var(--e-global-color-accent, #222);
    --gfo-title-color: #fff;
    --gfo-body-border-color: #333;
    --gfo-body-background: #fff;
    --gfo-max-width: 20rem;
    --gfo-max-height: 25rem;

    --gfo-field-gap: 10px;

    --gfo-system-chat-bubble-background: #efefef;
    --gfo-system-chat-bubble-color: #000;

    --gfo-customer-chat-bubble-background: var(--e-global-color-accent, #0587cd);
    --gfo-customer-chat-bubble-color: #fff;

    --gfo-next-background: var(--e-global-color-accent, #333);
    --gfo-next-color: #fff;

    --gfo-icon-size: 3rem;

    /* width of send button when text question */
    --gfo-text-input-send-width: 5rem;

    position: fixed;
    left: var(--gfo-margin);
    bottom: var(--gfo-margin);
    width: 100%;
    max-width: var(--gfo-max-width);
    z-index: 1;
}

.gf_otter_chat_holder.side_right {
    left: auto;
    right: var(--gfo-margin);
}

.gf_otter_chat_next {
    background: var(--gfo-next-background);
    color: var(--gfo-next-color);
}

.gf_otter_chat_body .gform_wrapper {
    --gf-form-gap-y: var(--gfo-field-gap);
}

.gf_otter_chat_holder.typing .gf_otter_chat_next_holder,
.gf_otter_chat_holder.done .gf_otter_chat_typing,
.gf_otter_chat_holder.done .gf_otter_chat_next_holder,
.gf_otter_chat_holder.customer_input .gf_otter_chat_typing {
    display: none;
}

.gf_otter_chat_title.circle {
    border-radius: 50%;
    aspect-ratio: 1/1;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gf_otter_chat_holder:not(.open) .gf_otter_chat_text_open,
.gf_otter_chat_holder.open .gf_otter_chat_text_close,
.gf_otter_chat_holder .gfield_required_text,
.gf_otter_chat_title.rectangle .gf_otter_chat_icon,
.gf_otter_chat_title.circle .gf_otter_chat_text {
    display: none;
}

.gf_otter_chat_icon {
    display: inline-block;
    justify-content: center;
    align-items: center;;
}
.gf_otter_chat_icon img, .gf_otter_chat_icon svg {
    width: var(--gfo-icon-size);
    max-height: var(--gfo-icon-size);
}

.gf_otter_chat_title {
    padding: var(--gfo-padding-y) var(--gfo-padding-x);
    background: var(--gfo-title-background);
    border-width: 0;
    color: var(--gfo-title-color);
    cursor: pointer;
    display: block;
    width: 100%;
    transition: 0.2s linear all;
    text-align: left;
    position: relative;
}
.gf_otter_chat_next:hover, .gf_otter_chat_next:focus,
.gf_otter_chat_title:hover, .gf_otter_chat_title:focus {
    background: var(--gfo-title-hover-background);
}
.gf_otter_chat_text_icon {
    position: absolute;
    right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 0;
    top: 0;
}
.gf_otter_chat_text_icon svg {
    width: 22px;
    height: 22px;
}
.gf_otter_chat_title path, .gf_otter_chat_text_icon path {
    fill: currentColor;
}
.gf_otter_chat_body {
    padding: var(--gfo-padding-y) var(--gfo-padding-x);
    background: var(--gfo-body-background);
    border: 1px solid var(--gfo-body-border-color);
    position: relative;
    max-height: min( 85vh, var(--gfo-max-height) );
    overflow-y: auto;
    overflow-x: hidden;
}
.gf_otter_chat_body .gform_confirmation_message, .gf_otter_chat_typing, .gf_otter_chat_body .gfield .gfield_label, .gf_otter_chat_body .gf_otter_customer_reply {
    padding: 7.5px 12.5px;
    border-radius: 5px;
    display: inline-block;
}
.gf_otter_chat_body .gform_confirmation_message, .gf_otter_chat_typing, .gf_otter_chat_body .gfield .gfield_label {
    background: var(--gfo-system-chat-bubble-background);
    color: var(--gfo-system-chat-bubble-color);
    border-top-left-radius: 0;
}
.gf_otter_chat_body .gf_otter_customer_reply {
    background: var(--gfo-customer-chat-bubble-background);
    color: var(--gfo-customer-chat-bubble-color);
    border-top-right-radius: 0;
    float: right;
}
.gf_otter_chat_body .gf_otter_customer_reply_container:before,
.gf_otter_chat_body .gf_otter_customer_reply_container:after {
    content: '';
    display: block;
    clear: both;
}

.gf_otter_not_visible {
    /* conditional logic needs overriding to not be showing stuff just yet! */
    display: none !important;
}

.gf_otter_transcript .gfield {
    margin-bottom: var(--gfo-field-gap);
}

.gf_otter_chat_next_holder {
    margin-top: var(--gfo-field-gap);
}
.gf_otter_chat_next {
    width: 100%;
    border-width: 0;
}

/* Text inputs re-arrange a bit */
.gf_otter_chat_holder.gf_otter_chat_holder.customer_input[data-current-field-type="gfield--type-text"]
.gf_otter_current_field .ginput_container {
    max-width: calc(100% - var(--gfo-text-input-send-width));
}
.gf_otter_chat_holder.gf_otter_chat_holder.customer_input[data-current-field-type="gfield--type-text"]
.gf_otter_chat_next_holder {
    position: absolute;
    bottom: var(--gfo-padding-y);
    right: var(--gfo-padding-x);
}

/* https://css-loaders.com/dots/ */
.gf_otter_chat_loading {
  width: 35px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,var(--gfo-system-chat-bubble-color) 90%,#0000);
  background: 
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/3) 50%;
  animation: gf_otter_chat_loading 1s infinite linear;
}
@keyframes gf_otter_chat_loading {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}

.gf_otter_chat_holder.shake {
    animation: gf_oter_chat_shake 0.25s linear infinite;
}
@keyframes gf_oter_chat_shake {
 0% { transform: translateX(0) }
 25% { transform: translateX(5px) }
 50% { transform: translateX(-5px) }
 75% { transform: translateX(5px) }
 100% { transform: translateX(0) }
}