/* Married to the Mop — AI Assistant · red / white / black brand */
:root {
  --mtm-red: #b01f23;
  --mtm-red-dark: #8a181b;
  --mtm-red-light: #fce8e9;
  --mtm-black: #111111;
  --mtm-grey: #f5f5f5;
  --mtm-border: #e0e0e0;
  --mtm-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

#mtm-assistant-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483000;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mtm-black);
}

#mtm-assistant-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  background: linear-gradient(145deg, var(--mtm-red), var(--mtm-red-dark));
  color: #fff;
  box-shadow: var(--mtm-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

#mtm-assistant-launcher:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 48px rgba(176, 31, 35, 0.45);
}

#mtm-assistant-launcher svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

#mtm-assistant-panel {
  display: none;
  position: absolute;
  bottom: 76px;
  right: 0;
  width: min(400px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--mtm-shadow);
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--mtm-black);
}

#mtm-assistant-panel.open {
  display: flex;
  animation: mtmSlideUp 0.25s ease;
}

@keyframes mtmSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.mtm-assistant-header {
  background: var(--mtm-red);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 3px solid var(--mtm-black);
}

.mtm-assistant-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mtm-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.mtm-assistant-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.mtm-assistant-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.mtm-assistant-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.9;
  line-height: 1;
  padding: 4px;
}

.mtm-assistant-close:hover {
  opacity: 1;
}

.mtm-assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mtm-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  word-wrap: break-word;
  color: var(--mtm-black);
}

.mtm-msg.bot {
  align-self: flex-start;
  background: var(--mtm-grey);
  border: 1px solid var(--mtm-border);
  border-left: 3px solid var(--mtm-red);
  border-bottom-left-radius: 4px;
}

.mtm-msg.bot strong {
  color: var(--mtm-red-dark);
}

.mtm-msg.user {
  align-self: flex-end;
  background: var(--mtm-black);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.mtm-msg a {
  color: var(--mtm-red);
  font-weight: 600;
  text-decoration: underline;
}

.mtm-msg a:hover {
  color: var(--mtm-red-dark);
}

.mtm-msg.user a {
  color: #fff;
}

.mtm-msg ul {
  margin: 8px 0 4px;
  padding-left: 18px;
}

.mtm-msg li {
  margin-bottom: 4px;
}

.mtm-typing {
  align-self: flex-start;
  padding: 12px 16px;
  background: var(--mtm-grey);
  border: 1px solid var(--mtm-border);
  border-radius: 14px;
  display: none;
  gap: 4px;
  margin: 0 16px 8px;
}

.mtm-typing.show {
  display: flex;
}

.mtm-typing span {
  width: 7px;
  height: 7px;
  background: var(--mtm-red);
  border-radius: 50%;
  animation: mtmBounce 1.2s infinite;
}

.mtm-typing span:nth-child(2) { animation-delay: 0.15s; }
.mtm-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mtmBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.mtm-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
  background: #fff;
}

.mtm-quick-replies button {
  border: 1.5px solid var(--mtm-black);
  background: #fff;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--mtm-black);
  transition: background 0.15s, color 0.15s;
}

.mtm-quick-replies button:hover {
  background: var(--mtm-red);
  color: #fff;
  border-color: var(--mtm-red);
}

.mtm-assistant-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 2px solid var(--mtm-black);
  background: #fff;
}

#mtm-assistant-input {
  flex: 1;
  border: 1.5px solid var(--mtm-black);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  color: var(--mtm-black);
  background: #fff;
}

#mtm-assistant-input::placeholder {
  color: #888;
}

#mtm-assistant-input:focus {
  border-color: var(--mtm-red);
  box-shadow: 0 0 0 3px rgba(176, 31, 35, 0.15);
}

#mtm-assistant-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--mtm-black);
  background: var(--mtm-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

#mtm-assistant-send:hover {
  background: var(--mtm-red-dark);
}

#mtm-assistant-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  #mtm-assistant-root {
    bottom: 16px;
    right: 16px;
  }
  #mtm-assistant-panel {
    width: calc(100vw - 24px);
    right: -8px;
  }
}
