// phpcs:ignoreFile
/*
  NOTE: This file is replicated here:
  https://github.com/rvk-utd/reykjavik-www/blob/develop/client/src/core/layouts/default/chatwidget.css.ts
  Please notify that project if changes are made here.
*/

/* Chat widget theme based on the default light theme.
   Source: livechat-template-reyk.less.
   Documentation: https://all.docs.genesys.com/WID/Current/GCDeveloper/Branding
*/

.cx-widget.cx-theme-reyk {
  color: #444a52;
  background-color: #fff;
  scrollbar-face-color: #cccccc;
}
.cx-widget.cx-theme-reyk .cx-theme {
  background-color: #fff;
  color: #444a52;
  border-color: #dae1e8 !important;
}
.cx-widget.cx-theme-reyk .cx-overlay {
  background-color: #fff;
}
.cx-widget.cx-theme-reyk .cx-svg-icon-tone1 {
  fill: #0367e1;
}
.cx-widget.cx-theme-reyk .cx-svg-icon-tone2 {
  fill: #8c8c8c;
}
.cx-widget.cx-theme-reyk .cx-svg-icon-shadow1 {
  fill: #000000;
  opacity: 0.2;
}
.cx-widget.cx-theme-reyk .cx-svg-icon-shadow2 {
  fill: #000000;
  opacity: 0.1;
}
.cx-widget.cx-theme-reyk * {
  border-color: #dae1e8;
  background-color: #fff
}
.cx-widget.cx-theme-reyk .cx-titlebar .cx-title {
  color: #444a52;
}
.cx-widget.cx-theme-reyk .cx-buttons-window-control .cx-svg-icon-tone1 {
  fill: #8795a6;
}
.cx-widget.cx-theme-reyk .cx-input-icon-overlay .cx-svg-icon-tone1 {
  fill: #98a7b8;
}
.cx-widget.cx-theme-reyk .cx-input-group-btn .cx-svg-icon-tone1 {
  fill: #fdfdfd;
}
.cx-widget.cx-theme-reyk label {
  color: #444a52;
}
.cx-widget.cx-theme-reyk a {
  color: #000000;
}
.cx-widget.cx-theme-reyk a:hover {
  color: #000000;
}
.cx-widget.cx-theme-reyk .cx-icon-alert-circle {
  color: #f53131;
}
.cx-widget.cx-theme-reyk .cx-footer,
.cx-widget.cx-theme-reyk .cx-branding {
  color: #66759b;
}
.cx-widget.cx-theme-reyk .cx-footer *,
.cx-widget.cx-theme-reyk .cx-branding * {
  fill: #66759b;
}
.cx-widget.cx-theme-reyk .cx-form-control.cx-error {
  border-color: #f53131;
}

.chat-container-open {
  position: fixed;
  bottom: 100px;
  right: 40px;
  width: min(387px, 100% - 100px) !important;
  height: min(579px, 100% - 121px);
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 21px 2px rgba(0, 0, 0, .2);
  display: flex !important;
  flex-direction: column;
  z-index: 999997;
}

.chat-down{
  position: fixed;
  bottom: 110px;
  right: 40px;
  width: min(387px, 100% - 100px) !important;
  height: 50px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 21px 2px rgba(0, 0, 0, .2);
  display: flex !important;
  flex-direction: column;
  z-index: 999997;
}

.chat-down #preChatForm,
.chat-down #chatBox,
.chat-down .input-area{
  display: none;
}

.chat-header {
  padding: 15px;
  background: #0367e1;
  color: white;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header span {
  font-size: 21px;
  font-weight: 700;
}

#chatBox {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding: 20px;
}

.input-area {
  padding: 15px;
  background: white;
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 10px 10px;
}

.typing-indicator-area {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 8px;
  min-height: 20px;
  padding: 0 10px;
}

.message-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#messageInput {
  flex: 1;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  outline: none;
  min-height: 120px;
  height: fit-content;
}

#messageInput:focus {
  border-color: #007bff;
}

.button-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.file-upload-button {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.file-upload-button:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.file-upload-button svg {
  width: 20px;
  height: 20px;
}

#sendButton {
  padding: 8px 16px;
  background-color: #0367e1;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#sendButton:hover {
  background-color: #0056b3;
}

#disconnectButton {
  background-color: #dc3545;
  color: white;
}

#disconnectButton:hover {
  background-color: #c82333;
}

/* Message styles */
.message {
  margin-bottom: 10px;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
}

/* Bot message style */
.bot-message {
  background-color: #e9ecef;
  color: #333;
  margin-right: auto;
  border-bottom-left-radius: 0px;
  font-weight: 700;
}

/* Agent message style */
.agent-message {
  background-color: #e9ecef;
  margin-right: auto;
  border-bottom-left-radius: 0px;
}

/* Customer/human message style */
.human-message {
  background-color: white;
  margin-left: auto;
  border-bottom-right-radius: 0px;
  border: 1px solid #c7cbd0;
}

.nickname {
  font-size: 0.8em;
  margin-bottom: 5px;
  opacity: 0.8;
  font-weight: bold;
}

#typingIndicator {
  color: #666;
  font-style: italic;
  animation: fadeIn 0.3s ease-in;
}

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

/* File upload styles */
.file-upload {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.file-name {
  display: block;
  margin-top: 8px;
  font-size: 0.9em;
  color: #666;
}

.message-attachment {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.9em;
}

/* System message style */
.system-message {
  background-color: #f8d7da;
  color: #721c24;
  text-align: center;
  margin: 10px auto;
  padding: 8px 15px;
  border-radius: 15px;
  width: fit-content;
}

/* Typing indicator styles */
.typing-indicator {
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  background-color: rgba(248, 249, 250, 0.9);
  padding: 8px;
  border-radius: 8px;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
  animation: fadeIn 0.3s ease-in;
  pointer-events: none;
}

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

#closeButton {
  background: none;
  border: none;
  color: white;
  font-size: 17px;
  cursor: pointer;
  padding: 9px;
  line-height: 1;
  transition: opacity 0.3s;
}

#closeButton:hover {
  opacity: 0.8;
}

#downButton, #downButtonPre {
  background: none;
  border: none;
  color: white;
  font-size: 17px;
  cursor: pointer;
  padding: 9px;
  line-height: 1;
  transition: opacity 0.3s;
  margin-left: auto;
}


#downButton:hover, #downButtonPre:hover {
  opacity: 0.8;
}

/* Add these styles for agent attachments */
.bot-message .message-attachment {
  background: rgba(0, 0, 0, 0.05);
  margin-top: 8px;
  padding: 8px;
  border-radius: 5px;
}

.bot-message .message-attachment a {
  color: #007bff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bot-message .message-attachment a:hover {
  text-decoration: underline;
}

/* Quick Reply Button Styles */
.quick-reply-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-reply-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 14px;
}

.quick-reply-button:hover {
  background-color: #0056b3;
}

/* When quick reply buttons are in a bot message */
.bot-message .quick-reply-button {
  background-color: #e9ecef;
  color: #333;
}

.bot-message .quick-reply-button:hover {
  background-color: #dee2e6;
}

/* Markdown styles */
.message div {
  word-wrap: break-word;
}

.message code {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.message pre {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
}

.message a {
  color: inherit;
  text-decoration: underline;
}

.message mark {
  background-color: rgba(255, 255, 0, 0.4);
  padding: 0 2px;
}

.cx-form-inputs {
  padding: 20px 20px 10px 20px;
}

.cx-control-label {
  display: block;
  margin-bottom: 5px;
  font-size: .75em;
  font-weight: 700;
  line-height: 1rem;
  clear: right;
}
.cx-input {
  width: 100%;
  margin-bottom: 10px;
  padding: 4px 12px;
  border: 1px solid #c7cbd0;
  border-radius: 4px;
  height: 32px;
}
.cx-webchat-info-first {
  margin-top: 1rem;
}

.cx-webchat-info-label {
  margin-bottom: 1rem;
}
.takki {
  background: #0367e1;
  float: right;
  margin-right: 1rem;
  color: white;
  padding: 0.5rem 1rem;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
}

.timeCustomer {
  text-align: right;
  font-size: 0.8rem;
  width: 100%;
}

.timeAgent {
  text-align: left;
  font-size: 0.8rem;
  width: 100%;
}
