#op-chat-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:99998;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
#op-chat-overlay.is-open{display:flex}

#op-chat{
  width:min(460px,100%);
  height:min(650px,calc(100vh - 36px));
  max-height:calc(100vh - 36px);
  background:#fff;
  border-radius:18px;
  box-shadow:0 22px 70px rgba(0,0,0,.3);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  font-family:Arial,Helvetica,sans-serif;
}

#op-chat-header{
  flex:0 0 auto;
  background:#f4510b;
  color:#fff;
  padding:15px 17px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}
#op-chat-header b{
  display:block;
  font-size:17px;
}
#op-chat-header small{
  display:block;
  opacity:.9;
  margin-top:2px;
  font-size:12px;
}
#op-chat-close{
  border:0;
  background:transparent;
  color:#fff;
  cursor:pointer;
  font-size:31px;
  line-height:1;
}

#op-chat-messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:16px;
  background:#f5f5f5;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-padding-bottom:16px;
}
.op-chat-message{
  max-width:84%;
  padding:10px 13px;
  margin:0 0 10px;
  border-radius:15px;
  font-size:14px;
  line-height:1.42;
  white-space:pre-wrap;
  word-wrap:break-word;
}
.op-chat-bot{
  background:#fff;
  margin-right:auto;
  border-bottom-left-radius:5px;
}
.op-chat-user{
  background:#ffe2cf;
  margin-left:auto;
  border-bottom-right-radius:5px;
}
.op-chat-wait{
  opacity:.65;
  font-style:italic;
}

.op-chat-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:2px 0 12px;
}
.op-chat-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 12px;
  border-radius:10px;
  background:#fff;
  border:1px solid #f4510b;
  color:#f4510b;
  text-decoration:none;
  font:700 13px Arial,Helvetica,sans-serif;
}
.op-chat-action:hover{
  background:#fff4ed;
}
.op-chat-action-phone{
  background:#f4510b;
  color:#fff;
}
.op-chat-action-phone:hover{
  background:#d94106;
}

#op-chat-form{
  flex:0 0 auto;
  padding:11px;
  display:flex;
  gap:8px;
  background:#fff;
  border-top:1px solid #e7e7e7;
}
#op-chat-input{
  flex:1;
  min-width:0;
  resize:none;
  height:45px;
  max-height:110px;
  padding:11px 12px;
  border:1px solid #ccc;
  border-radius:12px;
  font:14px Arial,Helvetica,sans-serif;
  outline:none;
}
#op-chat-input:focus{
  border-color:#f4510b;
}
#op-chat-send{
  border:0;
  border-radius:12px;
  padding:0 17px;
  background:#f4510b;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
#op-chat-send:disabled,
#op-chat-input:disabled{
  opacity:.6;
}

@media(max-width:560px){
  #op-chat-overlay{
    padding:0;
    align-items:stretch;
  }

  #op-chat{
    width:100%;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
  }

  #op-chat-header{
    padding-top:max(15px, env(safe-area-inset-top));
  }

  #op-chat-form{
    padding-bottom:max(11px, env(safe-area-inset-bottom));
  }
}

@supports not (height:100dvh){
  @media(max-width:560px){
    #op-chat{
      height:100vh;
      max-height:100vh;
    }
  }
}


/* Choices inside the conversation: compact underlined links */
.op-chat-options{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 14px;
  margin:2px 0 12px;
}

.op-chat-option{
  appearance:none;
  border:0;
  background:transparent;
  color:#f4510b;
  padding:2px 0;
  min-height:0;
  cursor:pointer;
  font:700 14px/1.35 Arial,Helvetica,sans-serif;
  text-align:left;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.op-chat-option:hover,
.op-chat-option:focus-visible{
  color:#c83f07;
  text-decoration-thickness:2px;
  outline:none;
}

.op-chat-option:disabled{
  opacity:.45;
  cursor:default;
  text-decoration:none;
}

@media(max-width:560px){
  .op-chat-options{
    gap:9px 16px;
  }

  .op-chat-option{
    font-size:15px;
    padding:3px 0;
  }
}
