/* =========================================================
   Shiv Nandani Enterprises - AI Assistant Widget Styles
   ========================================================= */

.sne-ai-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, #F97316), #FB923C);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  cursor: pointer;
  z-index: 9998;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: sne-ai-pulse 2.4s infinite;
}

.sne-ai-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.sne-ai-float .sne-ai-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #16A34A;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #fff;
  letter-spacing: 0.02em;
}

@keyframes sne-ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.sne-ai-tooltip {
  position: fixed;
  bottom: 34px;
  left: 96px;
  background: var(--primary-color, #0F172A);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 9997;
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,0.15));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sne-ai-tooltip.show {
  opacity: 1;
}

.sne-ai-panel {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(0,0,0,0.06);
}

.sne-ai-panel.open {
  display: flex;
  animation: sne-ai-slideup 0.25s ease;
}

@keyframes sne-ai-slideup {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.sne-ai-header {
  background: linear-gradient(120deg, var(--primary-color, #0F172A), var(--secondary-color, #1E293B));
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sne-ai-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-color, #F97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sne-ai-header-info {
  flex: 1;
  line-height: 1.25;
}

.sne-ai-header-info strong {
  display: block;
  font-size: 0.95rem;
}

.sne-ai-header-info span {
  font-size: 0.72rem;
  color: #CBD5E1;
}

.sne-ai-lang-toggle {
  display: flex;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  font-size: 0.72rem;
  margin-right: 4px;
}

.sne-ai-lang-toggle button {
  border: none;
  background: transparent;
  color: #E2E8F0;
  padding: 5px 9px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}

.sne-ai-lang-toggle button.active {
  background: var(--accent-color, #F97316);
  color: #fff;
}

.sne-ai-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  opacity: 0.85;
}
.sne-ai-close:hover { opacity: 1; }

.sne-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sne-ai-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.sne-ai-msg.bot {
  background: #fff;
  color: #1E293B;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sne-ai-msg.user {
  background: var(--primary-color, #0F172A);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.sne-ai-msg.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  align-self: flex-start;
}

.sne-ai-quickreplies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
  background: #F8FAFC;
}

.sne-ai-quickreplies button {
  border: 1px solid var(--border-color, #E2E8F0);
  background: #fff;
  color: var(--primary-color, #0F172A);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.sne-ai-quickreplies button:hover {
  background: var(--accent-color, #F97316);
  color: #fff;
  border-color: var(--accent-color, #F97316);
}

.sne-ai-typing {
  display: flex;
  gap: 4px;
  padding: 10px 13px;
  background: #fff;
  border-radius: 14px;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sne-ai-typing span {
  width: 6px;
  height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  animation: sne-ai-blink 1.2s infinite ease-in-out;
}
.sne-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.sne-ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes sne-ai-blink {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

.sne-ai-inputbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border-color, #E2E8F0);
  background: #fff;
}

.sne-ai-inputbar input[type="text"] {
  flex: 1;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.sne-ai-inputbar input[type="text"]:focus {
  border-color: var(--accent-color, #F97316);
}

.sne-ai-iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #F1F5F9;
  color: var(--primary-color, #0F172A);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.sne-ai-iconbtn:hover {
  background: #E2E8F0;
}

.sne-ai-iconbtn.send {
  background: var(--accent-color, #F97316);
  color: #fff;
}
.sne-ai-iconbtn.send:hover {
  background: var(--accent-color-hover, #EA580C);
}

.sne-ai-iconbtn.mic.listening {
  background: #DC2626;
  color: #fff;
  animation: sne-ai-mic-pulse 1s infinite;
}

@keyframes sne-ai-mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

.sne-ai-iconbtn.speaker.active {
  background: var(--primary-color, #0F172A);
  color: #fff;
}

.sne-ai-footer-note {
  font-size: 0.65rem;
  text-align: center;
  color: #94A3B8;
  padding: 4px 10px 8px;
  background: #fff;
}

.sne-ai-setup-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  font-size: 0.75rem;
  padding: 10px 12px;
  margin: 10px 16px 0;
  border-radius: 10px;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .sne-ai-panel {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 90px;
  }
  .sne-ai-float {
    left: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }
}
