/* =========================================================
   MIMORA BOX LIVE CHAT
   ========================================================= */

.mimora-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: #ff69a6;
  color: #fff;
  font-size: 23px;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 10px 30px rgba(255, 105, 166, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mimora-chat-launcher:hover {
  transform: translateY(-2px);
}

.mimora-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 20px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.mimora-chat-badge.is-visible {
  display: flex;
}

.mimora-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  overflow: hidden;
  display: none;
  flex-direction: column;
  border: 1px solid #f3d7e3;
}

.mimora-chat-panel.is-open {
  display: flex;
}

.mimora-chat-header {
  background: linear-gradient(135deg, #ff69a6, #ff8fbd);
  color: #fff;
  padding: 17px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mimora-chat-header-info {
  display: flex;
  flex-direction: column;
}

.mimora-chat-header strong {
  font-size: 16px;
}

.mimora-chat-header small {
  font-size: 11px;
  opacity: 0.9;
}

.mimora-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.mimora-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fffafb;
}

.mimora-chat-empty {
  text-align: center;
  padding: 50px 18px;
  color: #777;
}

.mimora-chat-empty i {
  display: block;
  font-size: 34px;
  color: #ff69a6;
  margin-bottom: 12px;
}

.mimora-chat-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.mimora-chat-message.is-customer {
  align-items: flex-end;
}

.mimora-chat-message.is-admin {
  align-items: flex-start;
}

.mimora-chat-bubble {
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mimora-chat-message.is-customer .mimora-chat-bubble {
  background: #ff69a6;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.mimora-chat-message.is-admin .mimora-chat-bubble {
  background: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 5px;
}

.mimora-chat-time {
  margin-top: 4px;
  font-size: 10px;
  color: #999;
}

.mimora-chat-form {
  padding: 12px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  background: #fff;
}

.mimora-chat-input {
  flex: 1;
  resize: none;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  min-height: 42px;
  max-height: 100px;
}

.mimora-chat-input:focus {
  border-color: #ff69a6;
}

.mimora-chat-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ff69a6;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  align-self: flex-end;
}

.mimora-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mimora-chat-status {
  padding: 5px 12px;
  text-align: center;
  font-size: 11px;
  color: #777;
  background: #fff;
}

@media (max-width: 600px) {
  .mimora-chat-launcher {
    right: 16px;
    bottom: 16px;
  }

  .mimora-chat-panel {
    right: 12px;
    bottom: 84px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100vh - 105px));
  }
}