/**
 * @file
 * Floating chatbot widget styles.
 *
 * Positions the DeepChat web component as a floating panel with an
 * Intercom-style toggle button in the bottom-right corner. Includes
 * vehicle context header and responsive breakpoints.
 *
 * NOTE: Product card, carousel, and fitment badge styles are applied via
 * DeepChat's htmlClassUtilities (in chatbot-widget.js) because those
 * elements render inside DeepChat's shadow DOM where external CSS
 * cannot reach.
 */

.cws-chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cws-chatbot-toggle {
  height: 48px;
  border-radius: 24px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  font-size: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.cws-chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  background: #2d2d2d;
}

.cws-chatbot-toggle:focus-visible {
  outline: 3px solid #666;
  outline-offset: 2px;
}

.cws-chatbot-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cws-chatbot-toggle.cws-toggle-open {
  width: 48px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.cws-chatbot-panel {
  display: none;
  width: 520px;
  height: 600px;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  background: #fff;
}

.cws-chatbot-panel.open {
  display: flex;
  flex-direction: column;
}

.cws-chatbot-panel deep-chat {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
}

/* Panel header toolbar */
.cws-panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.cws-new-conversation {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cws-new-conversation:hover {
  background: #e0e0e0;
  color: #333;
}

/* Vehicle context header bar */
.cws-vehicle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--cws-header-color, #1976d2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.cws-vehicle-label {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cws-vehicle-clear {
  background: none;
  border: none;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.cws-vehicle-clear:hover {
  color: #fff;
}

/* Responsive: near-full-screen overlay on mobile */
@media (max-width: 768px) {
  .cws-chatbot-panel.open {
    position: fixed;
    top: 2.5%;
    left: 2.5%;
    right: 2.5%;
    bottom: 2.5%;
    width: auto;
    height: auto;
    border-radius: 12px;
    z-index: 10000;
    margin-bottom: 0;
  }

  .cws-chatbot-toggle {
    z-index: 10001;
  }
}
