/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.asc-chat-widget-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0073aa;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 9998;
  font-size: 24px;
}

.asc-chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none; /* Hidden by default */
  flex-direction: column;
  z-index: 9999;
}

.asc-chat-window.asc-active {
  display: flex;
}

.asc-chat-header {
  background-color: #0073aa;
  color: white;
  padding: 15px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-weight: bold;
}

.asc-chat-body {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
}

.asc-chat-footer {
  padding: 15px;
  border-top: 1px solid #eee;
}

.asc-chat-footer textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  box-sizing: border-box;
  resize: none;
}

.asc-chat-message {
  margin-bottom: 15px;
  max-width: 80%;
  clear: both;
}

.asc-chat-message p {
  margin: 0;
  padding: 10px 15px;
  border-radius: 18px;
  word-wrap: break-word;
}

.asc-message-user {
  float: right;
}
.asc-message-user p {
  background-color: #0073aa;
  color: white;
}

.asc-message-agent {
  float: left;
}

.asc-message-agent p {
  background-color: #f1f1f1;
  color: #444;
}

/* Google Login Button styles for shortcode */
.asc-google-login-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.2s;
}

.asc-google-login-button:hover {
  background-color: #357ae8;
  color: white;
}

.asc-google-login-button .dashicons {
  font-size: 18px;
  height: 18px;
  width: 18px;
}

/* Header controls */
.asc-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.asc-chat-control-button {
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  line-height: 1;
  padding: 0 5px;
}

#asc-close-chat:hover {
  opacity: 0.8;
}

/* Footer input area controls */
.asc-chat-input-area {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.asc-chat-input-area textarea {
  border: none;
  flex-grow: 1; /* Take up available space */
  margin: 0;
  height: 40px; /* Adjust height */
}

.asc-chat-input-area textarea:focus {
  outline: none;
  box-shadow: none;
}

#asc-send-message {
  color: #0073aa;
  font-size: 20px;
  transform: rotate(-45deg);
  padding-right: 10px;
}

#asc-send-message:hover {
  opacity: 0.7;
}

/* Remove default border from main footer textarea */
.asc-chat-footer textarea {
  border: none; /* This is now handled by the wrapper */
}
