/* =================================================================
   Mullet Concierge chat widget
   Floating bottom-right launcher + expanding panel.
   Uses brand palette inline (so it works even if global tokens shift).
   ================================================================= */

.mc-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1A1A1A;
}

/* Launcher button (closed state) -------------------------------- */
.mc-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mp-section-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 14px 22px 14px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 14px 32px -10px rgba(var(--mp-section-primary-rgb), 0.55), 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.mc-launcher:hover {
  background: var(--mp-section-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px rgba(var(--mp-section-primary-rgb), 0.65), 0 6px 14px rgba(0, 0, 0, 0.22);
}
.mc-launcher:focus-visible {
  outline: 3px solid rgba(var(--mp-section-primary-rgb), 0.45);
  outline-offset: 3px;
}
.mc-launcher .mc-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.mc-launcher-text {
  white-space: nowrap;
}
.mc-launcher-hint {
  font-size: 11px;
  opacity: 0.85;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Panel (open state) -------------------------------------------- */
.mc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: calc(100vw - 36px);
  height: 580px;
  max-height: calc(100vh - 36px);
  background: #FFFFFF;
  border: 1px solid rgba(var(--mp-section-primary-rgb), 0.30);
  border-radius: 18px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 36px 80px -30px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.18);
}
.mc-root[data-open="true"] .mc-panel { display: flex; }
.mc-root[data-open="true"] .mc-launcher { display: none; }

@media (max-width: 480px) {
  .mc-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 80px);
    right: 0;
    bottom: 0;
  }
  .mc-root { right: 8px; bottom: 8px; }
}

/* Panel header -------------------------------------------------- */
.mc-header {
  background: #04342C;
  color: #FFFFFF;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mc-header-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.mc-header-sub {
  font-size: 11px;
  opacity: 0.65;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: 1px;
}
.mc-header-meta {
  flex: 1;
  line-height: 1.25;
}
.mc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22D3A5;
  box-shadow: 0 0 0 4px rgba(34, 211, 165, 0.18);
  flex-shrink: 0;
}
.mc-close,
.mc-reset {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease;
}
.mc-close:hover,
.mc-reset:hover { background: rgba(255, 255, 255, 0.14); }
.mc-reset:focus-visible,
.mc-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 1px;
}

/* Conversation area --------------------------------------------- */
.mc-convo {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  background: #F8F7F4;
}
.mc-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.mc-msg-user {
  align-self: flex-end;
  background: var(--mp-section-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.mc-msg-bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: #1A1A1A;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom-left-radius: 4px;
}
.mc-msg-system {
  align-self: center;
  font-size: 12px;
  color: #5F5E5A;
  font-style: italic;
  font-family: 'Source Serif Pro', Georgia, serif;
  padding: 6px 10px;
  max-width: 90%;
  text-align: center;
}

/* Suggested prompts (shown only at start of conversation) ------- */
.mc-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 2px;
  align-self: flex-start;
  max-width: 90%;
}
.mc-suggest-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #5F5E5A;
  margin-bottom: 2px;
}
.mc-suggest-btn {
  background: #FFFFFF;
  border: 1px solid rgba(var(--mp-section-primary-rgb), 0.30);
  color: #04342C;
  text-align: left;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
  line-height: 1.4;
}
.mc-suggest-btn:hover {
  background: rgba(var(--mp-section-primary-rgb), 0.08);
  border-color: var(--mp-section-primary);
}

/* Typing indicator ---------------------------------------------- */
.mc-typing {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  gap: 4px;
}
.mc-typing span {
  width: 6px;
  height: 6px;
  background: var(--mp-section-primary);
  border-radius: 50%;
  animation: mc-blink 1.2s infinite ease-in-out;
}
.mc-typing span:nth-child(2) { animation-delay: 0.16s; }
.mc-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes mc-blink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* Composer ------------------------------------------------------ */
.mc-composer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.mc-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.4;
  color: #1A1A1A;
  background: #FFFFFF;
  transition: border-color 0.14s ease;
}
.mc-input:focus {
  outline: none;
  border-color: var(--mp-section-primary);
  box-shadow: 0 0 0 3px rgba(var(--mp-section-primary-rgb), 0.18);
}
.mc-send {
  background: var(--mp-section-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  height: 40px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease;
  flex-shrink: 0;
}
.mc-send:hover:not(:disabled) { background: var(--mp-section-primary-hover); }
.mc-send:disabled { opacity: 0.4; cursor: not-allowed; }
.mc-disclaimer {
  font-size: 10px;
  color: #5F5E5A;
  text-align: center;
  letter-spacing: 0.2px;
}
