/* Missed-call widget styles for demo-hvac.ejs
   Owns: call overlay, missed badge, chat window, hero visual cards.
   Does NOT own: page layout (nav, hero, services, pricing, footer).
*/

/* --- WIDGET CONTAINER --- */
.widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.widget-label-top {
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px 12px 4px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  max-width: 280px;
  text-align: center;
}

/* --- HERO VISUAL CARDS --- */
.hvac-hero-visual {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 340px;
}
.hero-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 20px;
  color: #fff;
}
.hero-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.hero-card-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.phone-ringing {
  display: flex;
  align-items: center;
  gap: 12px;
}
.phone-icon { font-size: 32px; }
.ring-lines {
  position: relative;
  width: 28px;
  height: 28px;
}
.ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--amber);
  border-radius: 50%;
  animation: ripple 1.5s ease-out infinite;
}
.r2 { animation-delay: 0.4s; }
.r3 { animation-delay: 0.8s; }
@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.phone-label {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.call-timer {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.ai-response-block { display: flex; flex-direction: column; gap: 10px; }
.ai-sent-msg, .ai-reply-msg, .ai-response-msg { display: flex; flex-direction: column; gap: 3px; }
.msg-bubble {
  background: rgba(255,255,255,0.15);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  max-width: 260px;
}
.ai-bubble {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.msg-time { font-size: 11px; color: rgba(255,255,255,0.4); padding-left: 4px; }

/* --- CALL OVERLAY --- */
.call-overlay {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 28px;
  width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.call-sim { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.call-ringing-icon { font-size: 40px; animation: ring-anim 0.8s ease-in-out infinite; }
@keyframes ring-anim {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}
.call-number { font-size: 16px; font-weight: 700; color: #fff; font-family: 'DM Mono', monospace; }
.call-ringing-label { font-size: 14px; color: rgba(255,255,255,0.6); }
.call-expire-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.call-expire-bar::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--amber);
  transform-origin: left;
  animation: shrink 4s linear forwards;
}
@keyframes shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* --- MISSED BADGE --- */
.missed-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #DC2626;
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(220,38,38,0.4);
}
.missed-icon { font-size: 14px; }

/* --- CHAT WINDOW --- */
.chat-window {
  width: 340px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 460px;
}
.chat-header {
  background: var(--green);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.chat-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
}
.chat-msg { display: flex; flex-direction: column; }
.msg-inbound { align-items: flex-start; }
.msg-outbound { align-items: flex-end; }
.msg-ai { align-items: flex-start; }
.msg-outbound .msg-bubble {
  background: var(--green);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.msg-inbound .customer-bubble,
.msg-ai .ai-bubble {
  background: #F3F4F6;
  color: var(--fg);
  border-radius: 16px 16px 16px 4px;
}
.msg-ai .ai-bubble {
  background: rgba(27,67,50,0.08);
  border: 1px solid rgba(27,67,50,0.15);
}
.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0 4px;
}
.msg-time { font-size: 11px; color: var(--muted); }
.msg-status { font-size: 11px; color: var(--green); font-weight: 600; }
.msg-ai-tag { font-size: 11px; color: var(--green); font-weight: 600; }
.chat-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.chat-btn-book {
  width: 100%;
  background: var(--amber);
  color: #1A1A1A;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
  text-decoration: none;
}
.chat-btn-book:hover { background: var(--amber-light); }
.chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg);
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--fg);
}
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send {
  background: var(--green);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Responsive */
@media (max-width: 768px) {
  .widget-container { bottom: 12px; right: 12px; }
  .chat-window { width: 300px; }
}