﻿/* ==========================================================================
   HAIKS & KSeFio AI Assistant Floating Widget
   ========================================================================== */

.haiks-assistant-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Trigger Button */
.haiks-assistant-btn {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #2EC4B6;
  background: #1E293B;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(46, 196, 182, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
  outline: none;
}

.haiks-assistant-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(46, 196, 182, 0.5);
}

.haiks-assistant-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Online Indicator Badge */
.haiks-assistant-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #10B981;
  border: 2px solid #0F172A;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
}

/* Speech Bubble Prompt */
.haiks-assistant-bubble {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 290px;
  background: #1E293B;
  color: #F8FAFC;
  padding: 14px 16px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 13.5px;
  line-height: 1.45;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
  animation: bubblePop 0.4s ease-out;
}

@keyframes bubblePop {
  0% { opacity: 0; transform: scale(0.85) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.haiks-assistant-bubble .bubble-text {
  margin-right: 18px;
}

.haiks-assistant-bubble .bubble-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.haiks-assistant-bubble .bubble-close:hover {
  color: #F8FAFC;
}

/* Chat Dialog Window */
.haiks-chat-modal {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(46, 196, 182, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.haiks-chat-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.haiks-chat-header {
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border-bottom: 1px solid #334155;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.haiks-chat-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.haiks-chat-header-profile img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #2EC4B6;
  object-fit: cover;
}

.haiks-chat-header-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #F8FAFC;
}

.haiks-chat-header-info span {
  font-size: 11px;
  color: #10B981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.haiks-chat-header-info span::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
}

.haiks-chat-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.haiks-chat-close:hover {
  color: #F8FAFC;
}

/* Chat Body */
.haiks-chat-body {
  padding: 18px;
  max-height: 440px;
  overflow-y: auto;
}

.haiks-chat-msg-intro {
  background: #1E293B;
  border-left: 3px solid #2EC4B6;
  padding: 12px 14px;
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Form Styles */
.haiks-chat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.haiks-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.haiks-form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.haiks-form-group input,
.haiks-form-group textarea {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 12px;
  color: #F8FAFC;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.haiks-form-group input:focus,
.haiks-form-group textarea:focus {
  border-color: #2EC4B6;
  box-shadow: 0 0 0 2px rgba(46, 196, 182, 0.2);
}

.haiks-form-group textarea {
  resize: none;
  min-height: 64px;
}

.haiks-hp-field {
  display: none !important;
}

.haiks-submit-btn {
  background: linear-gradient(135deg, #2EC4B6, #00F2FF);
  color: #0F172A;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: opacity 0.2s, transform 0.15s;
}

.haiks-submit-btn:hover {
  opacity: 0.93;
  transform: translateY(-1px);
}

.haiks-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success & Status View */
.haiks-chat-success {
  text-align: center;
  padding: 24px 12px;
  display: none;
}

.haiks-chat-success.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.haiks-success-icon {
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px auto;
}

.haiks-chat-success h4 {
  margin: 0 0 8px 0;
  color: #F8FAFC;
  font-size: 16px;
}

.haiks-chat-success p {
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}
