#slc-chat-box {
    width: 300px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    z-index: 9999;
}
#slc-title-bar {
    background: #2c3e50;
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#slc-title-text {
    font-size: 16px;
}
#slc-toggle-btn {
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}
#slc-chat-body.minimized {
    display: none;
}
#slc-messages {
    height: 350px;
    overflow-y: auto;
    background: #fff;
    margin: 10px 0;
    padding: 5px;
    border: 1px solid #ddd;
}

.emojionearea .emojionearea-button {
    left: 5px;
    top: auto;
    bottom: 5px;
    right: auto;
}

.slc-textarea-wrapper {
  position: relative;
  width: 100%;
  margin-top: 10px;
}

.slc-textarea-wrapper textarea {
  width: 100%;
  height: 60px;
  padding: 10px 80px 10px 10px; /* left, top/bottom, right */
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  line-height: 1.4em;
  word-wrap: break-word;
  max-height: 200px;
}


.slc-textarea-wrapper button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  height: 20px;
  padding: 0 14px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.slc-textarea-wrapper button:hover {
  background-color: #005f8d;
}

#emoji-btn {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.slc-textarea-wrapper textarea {
  padding-left: 40px; /* space for emoji button */
}

#slc-messages {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
}

.slc-message {
  clear: both;
  padding: 8px 12px;
  margin-bottom: 10px;
  max-width: 70%;
  border-radius: 10px;
  word-wrap: break-word;
}

.user-msg {
  background-color: #dcf8c6;
  float: right;
  text-align: right;
}

.admin-msg {
  background-color: #f1f0f0;
  float: left;
  text-align: left;
}

#slc-messages::after {
  content: "";
  display: block;
  clear: both;
}

.slc-sender {
    clear: both;
    font-size: 12px;
    color: #555;
    margin-bottom: 2px;
}
.slc-message.admin-msg {
    text-align: left;
}
.slc-message.user-msg {
    text-align: right;
}

.slc-message {
  position: relative;
  clear: both;
  padding: 10px 14px;
  margin-bottom: 14px;
  max-width: 75%;
  border-radius: 16px;
  word-wrap: break-word;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-msg {
  background-color: #dcf8c6;
  float: right;
  text-align: left;
  border-bottom-right-radius: 0;
}

.admin-msg {
  background-color: #ffffff;
  float: left;
  text-align: left;
  border-bottom-left-radius: 0;
  border: 1px solid #ddd;
}

.slc-sender {
  display: block;
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
  padding-left: 2px;
}

.emojionearea .emojionearea-editor {
    min-height: 4em;
    padding: 6px 12px 26px 12px;
}

#slc-send-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background-color: #3498db;
  color: white;
  border: none;
  
  width: 30px;
  height: 20px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

#slc-send-btn:hover {
  background-color: #2980b9;
  transform: scale(1.05);
}

#slc-name{
	width: 100%;
}

.system-msg {
    background-color: #e9f5ff;
    color: #333;
    padding: 8px 12px;
    margin: 10px;
    border-radius: 10px;
    text-align: center;
    font-style: italic;
    font-size: 14px;
}

#slc-chat-box {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    width: 300px;
}

#slc-chat-box.bottom-right {
    right: 20px;
    left: auto;
}

#slc-chat-box.bottom-left {
    left: 20px;
    right: auto;
}

.slc-text{
    font-size: 16px;    
}

/* Premium email gate notice */
#slc-name {
  box-sizing: border-box;
  border: 1px solid #d7dde7;
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  background: #fff;
  color: #1f2937;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#slc-name:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.14);
}

#slc-name.slc-input-error {
  border-color: #ef4444;
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.slc-email-notice {
  display: none;
  margin: 8px 0 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(154, 52, 18, 0.08);
}

.slc-email-notice.is-visible {
  display: block;
  animation: slcNoticeIn 0.22s ease-out;
}

@keyframes slcNoticeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Force the frontend widget to stay visible above theme overlays. */
body #slc-chat-box {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  bottom: 20px !important;
  width: 300px !important;
  max-width: calc(100vw - 40px) !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
  transform: none !important;
}
body #slc-chat-box.bottom-right,
body #slc-chat-box:not(.bottom-left) { right: 20px !important; left: auto !important; }
body #slc-chat-box.bottom-left { left: 20px !important; right: auto !important; }
body #slc-chat-box #slc-title-bar { display: flex !important; visibility: visible !important; opacity: 1 !important; }
body #slc-chat-box #slc-chat-body { visibility: visible; opacity: 1; }
@media (max-width: 480px) {
  body #slc-chat-box { right: 12px !important; left: 12px !important; bottom: 12px !important; width: auto !important; max-width: none !important; }
}
