/* MasterVein support widget — Pack 8
   Single inline chat. No Telegram redirect.
   Brand: orange #ff4d1a, dark theme, Playfair Display + DM Sans. No green.
   Mobile-first (Samsung S25+ ~380px). */

/* Neutralize the legacy "ENHANCED CHAT WIDGET" until source is cleaned */
body .chat-widget, body #chatWidget, body #chatToggle,
body .chat-toggle, body .chat-bubble {
  display: none !important;
}

.mv-sw-root,
.mv-sw-root * {
  box-sizing: border-box;
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.mv-sw-fab {
  position: fixed; right: 18px; bottom: 18px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #ff4d1a; color: #fff;
  border: 0; font-size: 26px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 77, 26, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2147483600;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mv-sw-fab:hover { transform: scale(1.05); }
.mv-sw-fab:active { transform: scale(0.97); }
.mv-sw-fab-dot {
  position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ffd1be; box-shadow: 0 0 0 3px #ff4d1a;
}
.mv-sw-root.is-open .mv-sw-fab { display: none; }

.mv-sw-panel {
  position: fixed; right: 18px; bottom: 18px;
  width: 380px; max-width: calc(100vw - 24px);
  height: 600px; max-height: calc(100vh - 24px);
  background: #0a0a0a; color: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255, 77, 26, 0.25);
  z-index: 2147483600;
  display: none; flex-direction: column; overflow: hidden;
  font-size: 14.5px; line-height: 1.45;
}
.mv-sw-root.is-open .mv-sw-panel { display: flex; }

@media (max-width: 480px) {
  .mv-sw-panel {
    right: 0; bottom: 0; left: 0;
    width: 100vw; max-width: 100vw;
    height: 92vh; max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
  .mv-sw-fab { right: 14px; bottom: 14px; }
}

.mv-sw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 12px 14px;
  background: linear-gradient(135deg, #ff4d1a 0%, #cc3a10 100%);
}
.mv-sw-head-title { display: flex; align-items: center; gap: 10px; }
.mv-sw-head-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #0a0a0a; color: #ff4d1a;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: 18px;
}
.mv-sw-head-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: 17px; letter-spacing: 0.2px;
}
.mv-sw-head-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; opacity: 0.92;
}
.mv-sw-online {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ffd1be; box-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}
.mv-sw-close {
  background: rgba(0,0,0,0.18); border: 0; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.mv-sw-close:hover { background: rgba(0,0,0,0.35); }

.mv-sw-tabs {
  display: flex; background: #131313; border-bottom: 1px solid #1f1f1f;
}
.mv-sw-tab {
  flex: 1; background: transparent; border: 0;
  padding: 11px 10px; color: #888;
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
  cursor: pointer; border-bottom: 2px solid transparent;
}
.mv-sw-tab.is-active { color: #ff4d1a; border-bottom-color: #ff4d1a; }

.mv-sw-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #0a0a0a; }
.mv-sw-view { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.mv-sw-view.is-active { display: flex; }

.mv-sw-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.mv-sw-msg { display: flex; max-width: 85%; }
.mv-sw-msg-user { align-self: flex-end; }
.mv-sw-msg-coach, .mv-sw-msg-ai, .mv-sw-msg-system { align-self: flex-start; }
.mv-sw-bubble {
  padding: 9px 12px; border-radius: 14px;
  white-space: pre-wrap; word-wrap: break-word; font-size: 14px;
}
.mv-sw-msg-user .mv-sw-bubble {
  background: #ff4d1a; color: #fff; border-bottom-right-radius: 4px;
}
.mv-sw-msg-coach .mv-sw-bubble, .mv-sw-msg-ai .mv-sw-bubble {
  background: #1c1c1c; color: #f2f2f2; border-bottom-left-radius: 4px;
}
.mv-sw-msg-system .mv-sw-bubble {
  background: transparent; color: #888; font-style: italic;
  font-size: 13px; border: 1px dashed #2a2a2a;
}

.mv-sw-contact {
  padding: 12px 14px 14px 14px;
  border-top: 1px solid #1f1f1f; background: #0e0e0e;
  display: flex; flex-direction: column; gap: 8px;
}
.mv-sw-contact-title { color: #aaa; font-size: 12.5px; margin-bottom: 2px; }
.mv-sw-contact input {
  background: #1a1a1a; color: #fff;
  border: 1px solid #2a2a2a; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; width: 100%; outline: none;
}
.mv-sw-contact input:focus { border-color: #ff4d1a; }
.mv-sw-btn-primary {
  background: #ff4d1a; color: #fff; border: 0;
  border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer;
}
.mv-sw-btn-primary:hover { background: #e8420f; }

.mv-sw-composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px 12px 12px;
  border-top: 1px solid #1f1f1f; background: #0e0e0e;
}
.mv-sw-composer textarea {
  flex: 1; background: #1a1a1a; color: #fff;
  border: 1px solid #2a2a2a; border-radius: 14px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  resize: none; min-height: 40px; max-height: 120px; outline: none;
}
.mv-sw-composer textarea:focus { border-color: #ff4d1a; }
.mv-sw-send {
  background: #ff4d1a; color: #fff; border: 0;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 18px; cursor: pointer; flex: 0 0 40px;
}
.mv-sw-send:hover { background: #e8420f; }

.mv-sw-faq-list { flex: 1; overflow-y: auto; padding: 10px; }
.mv-sw-faq-cat { margin-bottom: 8px; border: 1px solid #1f1f1f; border-radius: 12px; overflow: hidden; }
.mv-sw-faq-cat-head {
  width: 100%; background: #131313; color: #fff; border: 0;
  text-align: left; padding: 12px 14px;
  font-weight: 600; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.mv-sw-faq-cat-head:hover { background: #1a1a1a; }
.mv-sw-chev { color: #ff4d1a; font-size: 14px; transition: transform .15s ease; }
.mv-sw-faq-cat.is-open .mv-sw-chev { transform: rotate(180deg); }
.mv-sw-faq-cat-body { display: none; padding: 6px 14px 12px 14px; background: #0e0e0e; }
.mv-sw-faq-cat.is-open .mv-sw-faq-cat-body { display: block; }
.mv-sw-faq-item { padding: 8px 0; border-bottom: 1px solid #1a1a1a; }
.mv-sw-faq-item:last-child { border-bottom: 0; }
.mv-sw-faq-q { font-weight: 600; color: #fff; font-size: 13.5px; margin-bottom: 4px; }
.mv-sw-faq-a { color: #bbb; font-size: 13px; line-height: 1.5; }
.mv-sw-faq-error { padding: 16px; color: #aaa; font-size: 13.5px; }

/* PACK8C_FLOW_BUTTONS — guided wizard button rack */
.mv-sw-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 14px 14px;
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
}
.mv-sw-flow-btn {
  width: 100%;
  background: transparent;
  color: #fff;
  border: 1.5px solid #ff4d1a;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  letter-spacing: 0.1px;
  transition: background 0.12s ease, transform 0.08s ease;
}
.mv-sw-flow-btn:hover { background: rgba(255, 77, 26, 0.12); }
.mv-sw-flow-btn:active {
  background: #ff4d1a; color: #fff; transform: scale(0.98);
}
.mv-sw-flow-btn.is-primary { background: #ff4d1a; color: #fff; }
.mv-sw-flow-btn.is-primary:hover { background: #e8420f; }
