.chat-row.chat-type-alert.chat-mode-livechat {
  margin-bottom:20px;
}
.chat-view {
  padding: 1em;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.chat-row .chat-system div.system-message {
  margin:0;
  padding:4px 8px;
  background-color: #F3F8FE;
  font-size:10px;
  line-height: 16px;
  color:#010101;
}

/* date */
.chat-date-divider {
  margin:12px 0;
  border-top:1px solid #dcdcdc;
}
.chat-date-divider .divider-content {
  padding:12px 16px;
  font-size:10px;
  line-height: 12px;
  color:#626262;
}

/* received */
.chat-received .received-profile {
  margin-top:4px;
}
.chat-received .received-bubble {
  border-radius:8px;
  background-color: #e2e9f8;
  vertical-align: top;
  border:1px solid #e2e9f8;
}
.chat-received .control-text {
  padding:10px;
  font-size:14px;
  line-height: 18px;
}
.chat-row .chat-time {
  font-size:10px;
  color:#626262;
  padding: .5em 1em;
}
.chat-received .received-isolation {
  margin: 0;
}
.chat-received .received-time-isolation {
  margin-left: -24px !important;
}

.chat-received .chat-time {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-emotion {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5em;
}

.chat-emotion img.chat-emotion-image {
  width: 3rem;
  height: 3rem;
}

.chat-emotion span.chat-emotion-message {
  font-size: .8rem;
}

/* sending */
.chat-sending .chat-time {
  margin-left: 10%;
  text-align: end;
}

.chat-sending .sending-attachment {
  margin-left: 10%;
  text-align: end;
}

.chat-sending .sending-container {
  margin-left: 10%;
  text-align: end;
}

.chat-sending .sending-bubble {
  padding:0;
  background-color: #f9f9f9 !important;
  border-radius:8px;
  border:none;
  vertical-align: top;
}
.chat-sending .sending-text {
  padding:10px;
  font-size:14px;
  line-height: 18px;
  color:#010101;
}

/* received button */
.chat-received .control-button-group .control-button {
  padding: 10px;
  font-size: 14px;
  line-height: 18px;
  color:#010101;
}
.chat-received .control-button-group .control-button .control-button-link {
  cursor: pointer;
}
/* .chat-received .control-button-group .control-button .control-button-link i {
  padding-left: 5px !important;
} */

.chat-received .control-button-flow-group {
  padding:0;
}
.chat-received .control-button-flow-group .control-button-flow {
  margin:5px;
  padding: 10px;
  font-size:14px;
  line-height: 18px;
  color:#010101;
}

/* img add */
.chat-input-container > .chat-attachment {
  padding:0;
  display: flex;
  gap:8px;
}

.chat-input-container > .chat-attachment .chat-attachment-item .chat-attachment-remove-button {
  top:4px;
  right:4px;
  width:16px;
  height:16px;
  background-color: #010101;
}

.chat-input-container > .chat-attachment .chat-attachment-item .chat-attachment-remove-button:before {
  content:"✕";
  clear: both;
  line-height: 16px;
  text-align: center;
}

.chat-input-container > .chat-attachment .chat-attachment-item .chat-attachment-remove-button i {
  position: absolute;
  opacity: 0;
  top:0;
  left:0;
  width: 16px;
  height: 16px;
}

/* bottom button */
.chat-input-container > div.chat-buttons-bottom-stack-container {
  font-size: 0;
}
.chat-input-container > div.chat-buttons-bottom-stack-container .button-stack {
  border-top:1px solid #E2E9F8;
  font-size:14px;
  line-height: 18px;
  color:#010101;
  padding:10px;
}
.chat-input-container > div.chat-buttons-bottom-flow-container {
  font-size:0;
  padding:10px;  
}
.chat-input-container > div.chat-buttons-bottom-flow-container .button-flow {
  font-size:14px;
  line-height: 18px;
  color:#010101;
  margin: 0 8px 0 0;
}

/* keypad */
.keypad button, .numpad button, .menupad button {
  border-radius:4px;
}

.keypad button.react-grid-item.keypad-button.keypad-empty-button {
  background:#fff url(../img/logo_cogi.png) no-repeat 50% 50%;
  background-size:20px;
}

.input-display .cell-focused {
  background-color: #3c69f0;
}


/* amp */
.chat-received .received-bubble .control-map.invalidate-receiver {
  border-radius:0 0 8px 8px;
}

/* audioplay */
.notice-box > audio + button {
  left:auto !important;
  right:0;
  font-size:0 !important;
  cursor: pointer;
}
.notice-box > audio + button::before {
  content:"✕";
  clear: both;
  font-size:20px;
}

/* modal */
.modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 64px 52px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  overscroll-behavior: none;
  overflow: hidden;
}

@keyframes fadeIn {
  from {
      opacity: 0;
  }
  to {
      opacity: 1;
  }
}

.modal-container {
  position: relative;
  width: 360px;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  border:1px solid #dcdcdc;
}

.modal-top {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  padding: 0 34px;
}

.modal-body {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.modal-top + .modal-body {
  margin-top:10px
}
.feedback-wrap {
  display: flex;
  gap:12px;
}
.feedback-wrap .feedback-item {
  border:none;
  margin:0;
  padding:0;
  background-color: transparent;
}
.feedback-wrap .feedback-item::before {
  color:#D98329;
  content:'★';
  font-size:20px;
}
.feedback-wrap .feedback-item.active ~ .feedback-item::before {
  color:#8A8A8A;
  content:'☆';
}

.feedback-button-icon {
  width: 64px;
  height: 64px;
  background: none;
  border: none;
  cursor: pointer;
}

.modal-bottom {
  display: flex; 
  margin-top: 30px;
  gap: 20px;
  width: 100%;
}
.modal-bottom .modal-btn-close {
  width:100%;
  height: 36px;
  border-radius:8px;
  font-size:13px;
  line-height: 16px;
  font-weight: 500;
  color:#3c69f0;
  flex-shrink: 1;
  border:1px solid #3c69f0;
  background-color: #fff;
}
.modal-bottom .modal-btn-complete {
  border:none;
  width:100%;
  height: 36px;
  border-radius:8px;
  font-size:13px;
  line-height: 16px;
  font-weight: 500;
  color:#fff;
  flex-shrink: 1;
  background-color: #3c69f0;
}

.modal-close {
  display: flex;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 0;
  justify-content: center;
  align-items: center;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 20px;
  background-color: #010101;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.section-item {
  margin: 0;
  padding: 0;
}
.section-item  + .section-item {
  margin-top:16px;
}
.section-item + .checkbox-wrap {
  margin-top:8px;
}
.checkbox-wrap {
  display: block;
}
.checkbox {
  display: inline-flex;
  position: relative;
  align-items: center;
  min-width: 16px;
  min-height: 16px;
  vertical-align: top;
  cursor: default;
}

.checkbox input {
  position: absolute;
  appearance: none;
  background-color: transparent;
  cursor: pointer;
  top: 0;
  left:0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  z-index: 2;
  opacity: 0;
}
.checkbox input:disabled {
  cursor: default;
}

.checkbox .txt {
  display: inline-flex;
  font-size: 14px;
  color: #010101;
  line-height: 16px;
  vertical-align: top;
  white-space: nowrap;
  padding:0;
  margin: 0 0 0 10px;
}

.checkbox .icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
  padding:0;
}

.checkbox .icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin:0;
  padding:0;
  border: 1px solid #d3e4f1;
  background-color: #fff;
  box-sizing: border-box;
}

.checkbox .icon::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 5px;
  margin:0;
  padding:0;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg);
  box-sizing: border-box;
}

.checkbox input[type="checkbox"]:checked + .icon::before {
  background-color: #3C69F0;
  border-color: #3C69F0;
}

.checkbox input[type="checkbox"]:checked + .icon::after {
  border-color: #fff;
}

.checkbox input:disabled ~ .icon,
.checkbox input:disabled ~ .txt {
  opacity: 0.5;
  cursor: default;
}
.textarea-wrap {
  margin:0;
  padding:10px 16px;
  width:100%;
  height: 100px;
  border:1px solid #d3e4f1;
  border-radius:4px;
  font-size:13px;
  line-height: 16px;
  color:#010101;
}
.textarea-wrap::placeholder {
  color:#aab8d8;
}
.text-body3 + .textarea-wrap {
  margin-top:4px;
}

/* chat-livechat-disconnected */
.chat-livechat-disconnected-popup {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  width: 100%;
  background-color:#FF8C4E;
  padding:8px;
  gap:8px;
}

.chat-livechat-disconnected-popup > div {
  padding: 0;
  background-color: transparent;
  color: #fff;
  line-height: 1.5em;
  width:100%;
}
.chat-livechat-disconnected-popup-close {
  display: inline-flex;
  width: 24px;
  height: 24px;
  background-color: #FFD1B9;
  border-radius:100%;
  white-space: nowrap;
  position: relative;
  align-items: center;
  justify-content: center;
  border:none;
}
.chat-livechat-disconnected-popup-close::before,
.chat-livechat-disconnected-popup-close::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 12px;
    background-color: #D85711;
}

.chat-livechat-disconnected-popup-close::before {
    transform: rotate(45deg);
}

.chat-livechat-disconnected-popup-close::after {
    transform: rotate(-45deg);
}

/* ai */
.ai-wrap {
  display: inline-flex;
  align-items: center;
  padding:6px 12px;
  gap:8px;
  box-shadow: 0px 4px 10px 0px #00000026;
  background-color: #F7F8FD;
  border-radius:16px;
  position: fixed;
  min-width: 124px;
  top:8px;
  right:9px;
}
.ai-wrap .icon {
  width: 36px;
  height: 36px;
}
.ai-wrap .title {
  font-size:13px;
  line-height: 16px;
  color:#010101;
  font-weight: 500;
}

/* feedback */
.chat-feedback-container {
  border-radius:10px;
  padding:16px;
}

.chat-feedback-grade-container {
  padding:0;
}
.chat-feedback-info-text {
  font-size:12px;
  line-height: 16px;
  color:#010101;
  padding:0;
}
.chat-feedback-grade-star-container {
  display: flex;
  gap:12px;
}
.chat-feedback-info-text + .chat-feedback-grade-star-container {
  margin-top:8px;
}
.chat-feedback-grade-star {
  padding:0;
}
.chat-feedback-grade-star-on::before {
  display: none;
}
.chat-feedback-grade-star-off:before {
  display: none;
}
.chat-feedback-grade-star-on::after {
  color:#D98329;
  content:'★';
  font-size:24px;
}
.chat-feedback-grade-star-off::after {
  color:#8A8A8A;
  content:'☆';
  font-size:24px;
}
.chat-feedback-resolve-container {
  margin-top:12px;
  padding:0;
}
.chat-feedback-resolve-value-container {
  display: flex;
  gap:40px;
}

.chat-feedback-resolve-value-container > div > div {
  display: flex;
  align-items: center;
  gap:12px;
}
.chat-feedback-resolve-value-container > div > div > input {
  width: 16px;
  height: 16px;
  margin: 0 !important;
}
.chat-feedback-resolve-value-container > div > div > label {
  font-size:12px;
  line-height: 18px;
  color:#010101;
  margin: 0;
  padding: 0;
}
.chat-feedback-comment-container {
  margin-top:12px;
  padding:0;
}
.chat-feedback-comment-max-bytes {
  font-size:10px;
  line-height: 14px;
  color:#aab8d8;
}
.chat-feedback-info-text + .chat-feedback-comment-max-bytes {
  margin-top:8px;
}
.chat-feedback-comment-container textarea {
  border:1px solid #d3e4f1;
  border-radius:4px;
  font-size:12px;
  line-height: 16px;
  padding:10px 16px;
  color:#010101;
}
.chat-feedback-comment-container textarea::placeholder {
  color:#aab8d8;
}

.chat-feedback-buttons-container {
  display: flex;
  margin-top:12px;
  gap:20px;
}
.chat-feedback-buttons-container .chat-feedback-cancel-button {
  border:1px solid #3c69f0;
  background-color: transparent;
  color:#3c69f0;
  border-radius:8px;
  font-size:12px;
}
.chat-feedback-buttons-container .chat-feedback-send-button {
  border:1px solid #3c69f0;
  background-color: #3c69f0;
  border-radius:8px;
  font-size:12px;
}

/* markdown */
.control-markdown {
  padding:12px;
  border-radius:8px;
}
.control-markdown ol {
  margin: 0;
  padding: 0 24px;
}
.control-markdown p {
  margin: 0;
  padding: 0;
}
.control-markdown ol + p {
  margin-top:20px;
}
.control-markdown p + ol {
  margin-top:8px;
}

.cg-message-container {
  padding: 2em;
  line-height: 2em;
  text-align: center;
  background-color: #f5f5f5;
}

.action-group button {
  border: none;
  background-color: transparent;
  /* padding: .3rem .5rem; */
  color: #555;
  font-size: 1.2rem;
  cursor: pointer;
}

/* dark-theme */
.dark-theme {
  background-color: #212121;
}
.dark-theme .chat-date-divider {
  border-top:1px solid #626262;
}
.dark-theme .chat-date-divider .divider-content {
  background-color: #212121;
  color:#dcdcdc;
}
.dark-theme .chat-received .received-isolation {
  color:#fff;
}
.dark-theme .control-markdown {
  border:1px solid #626262;
}
.dark-theme .chat-sending .sending-bubble {
  background-color: #303030 !important;
}
.dark-theme .chat-sending .sending-text {
  color:#fff;
}
.dark-theme .chat-received .received-bubble {
  background-color: #3b404b;
  border:1px solid #3b404b;
  color:#fff;
}
.dark-theme .dialog-feedback-button {
  background-color: #212121;
}
.dark-theme .chat-row .chat-time {
  color:#dcdcdc;
}
.dark-theme .chat-row .chat-system {
  background-color: #2a2d31;
  color:#fff;
}

/* ai */
.dark-theme .ai-wrap {
  background-color: #434448;
}
.dark-theme .ai-wrap .title {
  color:#fff;  
}

/* live */
.dark-theme .chat-livechat-disconnected-popup {
  background-color: #d7672b;
}

/* modal */
.dark-theme .modal-container {
  border:1px solid #626262;
  background-color: #303030;
}

/* checkbox */
.dark-theme .checkbox .txt {
  color:#fff;
}

/* feedback */
.dark-theme .chat-feedback-container {
  background-color: #303030;
  border:1px solid #626262;
}
.dark-theme .chat-feedback-info-text {
  color:#fff;
}
.dark-theme .chat-feedback-grade-star-off::after {
  color:#dcdcdc;
}
.dark-theme .chat-feedback-resolve-value-container > div > div > label {
  color:#fff;
}
.dark-theme .chat-feedback-info-text + .chat-feedback-comment-max-bytes {
  color:#727783;
}
.dark-theme .chat-feedback-comment-container textarea {
  background-color: #303030;
  border:1px solid #4E4E4E;
  color:#fff;
}
.dark-theme .chat-feedback-comment-container textarea::placeholder {
  color:#727783;
}

.dark-theme .cg-message-container {
  padding: 2em;
  line-height: 2em;
  text-align: center;
  background-color: #555;
  color: #fff;
}

.dark-theme .action-group button {
  color: #fff;
}

/* sending-message-input */
.chat-input-container .input-container {
  display: flex;
}

.chat-input-buttons .input-button-container {
  display: flex;
  align-items: center;
}

textarea.sending-message-input {
  flex-grow: 1;
  margin: 1em;
  overflow: hidden;
  border: none;
  background-color: transparent;
}

.dark-theme textarea.sending-message-input {
  background-color: transparent;
  color: #fff;
}

.dark-theme textarea.sending-message-input::placeholder {
  color: #aaa;
}

.chat-input-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .5em .5em .5em;
}

.chat-input-buttons .send-button {
  width: 32px;
  height: 32px;
  margin: 5px;
}

.chat-input-container {
  overflow: hidden;
  flex-shrink: 0;
  background-color: #f9f9f9;
  border-top: 1px solid #ddd;
}

.dark-theme .chat-input-container {
  background-color: #555;
  color: #fff;
}

.chat-view-container {
  flex-grow: 1;
  position: relative;
}

.chat-header-container {
  flex-shrink: 0;
}

.chat-input-container .chat-attachment {
  padding: 1em 1em 0 1em;
}

.chat-attachment-item {
  border-radius: .3em;
  margin: 0 .3em;
}

.chat-view .chat-attachment-item {
  border: 1px solid #ddd;
}

.dark-theme .chat-attachment-item {
  background-color: #fff;
  border: none;
}

.dark-theme .feedback-button-message {
  color: white;
}

@media screen and (min-width: 480px) {
  .chat-input-container {
    margin: 1em 1em 2em 1em;
    border: 1px solid #ddd;
    border-radius: .5em;
    background-color: transparent;
    box-shadow: 0px 5px 10px #ddd;
  }

  .dark-theme .chat-input-container {
    background-color: #333;
    box-shadow: none;
  }
}
