/* DP-AUTO SHOP Chatbot Widget Styles - Inspired by ZWIZ.AI CMS */
:root {
  --dp-primary: #e63946;
  --dp-primary-hover: #d62828;
  --dp-dark: #1d212a;
  --dp-dark-surface: #2b303c;
  --dp-light: #f8f9fa;
  --dp-accent: #00b4d8;
  --dp-green: #2a9d8f;
  --dp-border: #e0e0e0;
  --dp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Prompt", sans-serif;
  --dp-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#dp-chatbot-root * {
  box-sizing: border-box;
  font-family: var(--dp-font);
  margin: 0;
  padding: 0;
}

/* Floating Launcher Button */
.dp-launcher-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dp-primary), #b71c1c);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.dp-launcher-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(230, 57, 70, 0.6);
}

.dp-launcher-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.dp-unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ffc107;
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #fff;
}

.dp-launcher-tooltip {
  position: fixed;
  bottom: 35px;
  right: 98px;
  background: var(--dp-dark);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--dp-shadow);
  z-index: 999998;
  white-space: nowrap;
  animation: dpBounce 2s infinite ease-in-out;
  cursor: pointer;
}

.dp-launcher-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--dp-dark);
}

@keyframes dpBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

/* Chat Window Modal */
.dp-chat-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 395px;
  height: 620px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--dp-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  border: 1px solid rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dp-chat-window.dp-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Chat Header */
.dp-header {
  background: linear-gradient(135deg, #181b22, #292e3a);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--dp-primary);
}

.dp-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e63946;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dp-title-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.dp-status-line {
  font-size: 12px;
  color: #8bd3dd;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ec4b6;
  box-shadow: 0 0 8px #2ec4b6;
}

.dp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dp-header-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
}

.dp-header-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Quick Action Bar (ZWIZ-style Pills) */
.dp-quick-bar {
  background: #f1f3f5;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: none;
}

.dp-quick-bar::-webkit-scrollbar {
  display: none;
}

.dp-quick-pill {
  white-space: nowrap;
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dp-quick-pill:hover, .dp-quick-pill.active {
  background: var(--dp-primary);
  color: #fff;
  border-color: var(--dp-primary);
}

/* Message Area */
.dp-messages-area {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dp-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: dpFadeIn 0.2s ease-out;
}

.dp-msg.bot {
  align-self: flex-start;
}

.dp-msg.user {
  align-self: flex-end;
}

.dp-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.dp-msg.bot .dp-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dp-msg.user .dp-msg-bubble {
  background: var(--dp-primary);
  color: #ffffff;
  border-top-right-radius: 2px;
}

.dp-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.dp-msg.user .dp-time {
  text-align: right;
}

/* Product Card Carousel / Cards */
.dp-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dp-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #eee;
}

.dp-card-content {
  padding: 10px 12px;
}

.dp-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.dp-card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--dp-primary);
  margin-bottom: 6px;
}

.dp-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.dp-card-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
}

.dp-card-btn {
  width: 100%;
  padding: 8px;
  background: var(--dp-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.dp-card-btn:hover {
  background: var(--dp-primary-hover);
}

/* Vehicle Selector Panel */
.dp-selector-box {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-selector-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.dp-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
}

/* PromptPay & Slip Upload Form */
.dp-slip-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
  text-align: center;
}

.dp-qr-img {
  width: 160px;
  height: 160px;
  margin: 8px auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.dp-upload-btn {
  display: inline-block;
  background: var(--dp-green);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

/* Chat Input Bar */
.dp-input-bar {
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dp-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 13.5px;
  outline: none;
  background: #f8fafc;
  transition: border-color 0.2s;
}

.dp-input:focus {
  border-color: var(--dp-primary);
  background: #fff;
}

.dp-send-btn {
  background: var(--dp-primary);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.dp-send-btn:hover {
  background: var(--dp-primary-hover);
}

.dp-send-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Channels Footer */
.dp-channels-footer {
  padding: 6px 14px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

.dp-channels-links {
  display: flex;
  gap: 10px;
}

.dp-channel-link {
  color: #38bdf8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.dp-channel-link:hover {
  text-decoration: underline;
}

@keyframes dpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .dp-chat-window {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}
