/* ===== SMITH REMODELING - AI CHATBOT STYLESHEET ===== */

:root {
  --cb-ink: #0e0e10;
  --cb-ink-soft: #151518;
  --cb-red: #cc001e;
  --cb-red-grad: linear-gradient(135deg, #ff334b 0%, #cc001e 50%, #990012 100%);
  --cb-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Chat Bubble Trigger */
.smith-chat-bubble {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--cb-ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  
  /* Hidden initially for page intro animations */
  opacity: 0;
  pointer-events: none;
  transform: scale3d(0.8, 0.8, 1) translate3d(0, 0, 0);
  will-change: transform, opacity;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s ease, 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
}
.smith-chat-bubble:hover {
  transform: scale3d(1.08, 1.08, 1) translate3d(0, -2px, 0);
  border-color: var(--cb-red);
  box-shadow: 0 12px 40px rgba(204, 0, 30, 0.45);
}
.smith-chat-bubble:active {
  transform: scale3d(0.95, 0.95, 1) translate3d(0, 0, 0);
}
.smith-chat-bubble svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.smith-chat-bubble.active svg {
  transform: rotate(90deg) scale3d(0.9, 0.9, 1);
}

/* Chat Window Container */
.smith-chat-window {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 380px;
  height: 520px;
  max-width: calc(100vw - 4rem);
  max-height: calc(100vh - 8.5rem);
  border-radius: 16px;
  background: rgba(21, 21, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale3d(0.95, 0.95, 1);
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.smith-chat-window.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  pointer-events: auto;
}

/* Chat Header */
.smith-chat-header {
  padding: 1.25rem 1.5rem;
  background: rgba(14, 14, 16, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.smith-chat-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.smith-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cb-red-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(204, 0, 30, 0.3);
}
.smith-chat-meta {
  display: flex;
  flex-direction: column;
}
.smith-chat-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.smith-chat-status {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.smith-chat-status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34a853;
  box-shadow: 0 0 8px rgba(52, 168, 83, 0.8);
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.smith-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  will-change: opacity, transform;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.smith-chat-close:hover {
  opacity: 1;
  transform: scale3d(1.1, 1.1, 1);
}
.smith-chat-close:active {
  transform: scale3d(0.95, 0.95, 1);
}
.smith-chat-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

/* Chat Messages */
.smith-chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

/* Scrollbar Customization */
.smith-chat-messages::-webkit-scrollbar {
  width: 5px;
}
.smith-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.smith-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* Message Bubbles */
.smith-msg {
  max-width: 80%;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: msgFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  will-change: transform, opacity;
}
@keyframes msgFadeIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.smith-msg.bot {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.smith-msg.user {
  background: var(--cb-red);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(204, 0, 30, 0.15);
}

/* Typing Indicator */
.smith-typing-indicator {
  display: flex;
  gap: 0.25rem;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
  align-items: center;
}
.smith-typing-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
  will-change: transform;
}
.smith-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.smith-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Suggested / Quick Prompt Tags */
.smith-chat-suggestions {
  padding: 0 1.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.smith-suggestion-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  will-change: transform, background-color, border-color, color;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.smith-suggestion-tag:hover {
  background: rgba(204, 0, 30, 0.08);
  border-color: var(--cb-red);
  color: #fff;
  transform: translate3d(0, -1px, 0);
}
.smith-suggestion-tag:active {
  transform: translate3d(0, 0, 0);
}

/* Chat Input Form */
.smith-chat-input-area {
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(14, 14, 16, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 0.75rem;
}
.smith-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #fff;
  outline: none;
  transition: all 0.3s var(--cb-ease);
}
.smith-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.smith-chat-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
.smith-chat-send {
  width: 42px;
  height: 42px;
  background: var(--cb-red-grad);
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  will-change: opacity, transform;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.smith-chat-send:hover {
  opacity: 0.95;
  transform: translate3d(0, -1px, 0);
}
.smith-chat-send:active {
  transform: translate3d(0, 1px, 0);
}
.smith-chat-send svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Booking Flow Interactive Interface */
.smith-chat-booking-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(204, 0, 30, 0.15);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.smith-booking-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #fff;
  outline: none;
}
.smith-booking-input:focus {
  border-color: var(--cb-red);
}
.smith-booking-submit {
  width: 100%;
  background: var(--cb-red-grad);
  border: none;
  border-radius: 6px;
  padding: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}
.smith-booking-submit:hover {
  opacity: 0.9;
}

/* Responsive adjustment for Mobile viewports */
@media (max-width: 500px) {
  .smith-chat-window {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
  }
  .smith-chat-bubble {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
