/* ============================================
   Özkardeş Sigorta – Inline AI Chatbot CSS v2.0
   Sayfa İçi Gömülü Premium Tasarım
   ============================================ */

/* ---------- Inline Chatbot Container ---------- */
.ai-chatbot-inline {
  margin-top: 3.5rem;
}

.ai-chatbot-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(145deg, #0a1628 0%, #122244 40%, #1a3a6e 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(10, 22, 40, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}

.ai-chatbot-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.ai-chatbot-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Left Side (Info) ---------- */
.ai-chatbot-left {
  flex: 0 0 340px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.ai-chatbot-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
}

.ai-chatbot-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.25), rgba(99, 102, 241, 0.2));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.ai-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid #0a1628;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: aiStatusPulse 2s infinite;
}

@keyframes aiStatusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 14px rgba(34, 197, 94, 0.8); }
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(13, 110, 253, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ai-chatbot-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0.25rem 0 0.6rem;
  line-height: 1.3;
}

.ai-chatbot-info > p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.ai-chatbot-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ai-chatbot-features span {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Right Side (Chat Window) ---------- */
.ai-chatbot-right {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.5rem 1.5rem 0;
  display: flex;
  position: relative;
  z-index: 1;
}

.ai-chat-window {
  flex: 1;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* ---------- Chat Header ---------- */
.ai-chat-header {
  background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #1565C0 100%);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.ai-chat-header-left strong {
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ai-chat-status {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

/* ---------- Messages Area ---------- */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 300px;
  scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* Messages */
.ai-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  animation: aiMsgFadeIn 0.35s ease-out forwards;
}

@keyframes aiMsgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg-user {
  flex-direction: row-reverse;
}

.ai-chat-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f0fe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0d6efd;
}

.ai-chat-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  word-break: break-word;
}

.ai-chat-msg-bot .ai-chat-msg-bubble {
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

.ai-chat-msg-user .ai-chat-msg-bubble {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.ai-chat-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px !important;
}

.ai-chat-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: aiDotBounce 1.4s infinite both;
}

.ai-chat-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---------- Suggestions ---------- */
.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 14px 8px;
}

.ai-chat-suggestion {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  white-space: nowrap;
}

.ai-chat-suggestion:hover {
  background: #e8f0fe;
  color: #0d6efd;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

/* ---------- Input Area ---------- */
.ai-chat-input-area {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition: all 0.25s;
  outline: none;
}

.ai-chat-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.ai-chat-input::placeholder {
  color: #94a3b8;
}

.ai-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.ai-chat-send-btn:hover {
  background: linear-gradient(135deg, #0b5ed7, #09459e);
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35);
}

.ai-chat-send-btn:active {
  transform: scale(0.96);
}

/* ---------- Floating Phone Button ---------- */
.phone-float-btn {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 6px 30px rgba(22, 163, 74, 0.45),
    0 0 0 0 rgba(22, 163, 74, 0.4);
  z-index: 10000;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: phonePulse 3s ease-in-out infinite;
  text-decoration: none;
}

.phone-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 40px rgba(22, 163, 74, 0.6);
  animation: none;
}

.phone-float-btn:active {
  transform: scale(0.96);
}

@keyframes phonePulse {
  0%, 100% {
    box-shadow: 0 6px 30px rgba(22, 163, 74, 0.45), 0 0 0 0 rgba(22, 163, 74, 0.4);
  }
  50% {
    box-shadow: 0 6px 30px rgba(22, 163, 74, 0.45), 0 0 0 14px rgba(22, 163, 74, 0);
  }
}

.phone-float-btn:hover svg {
  animation: phoneRing 0.6s ease-in-out;
}

@keyframes phoneRing {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  45% { transform: rotate(12deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.phone-float-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1.4;
}

.phone-float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.04);
}

.phone-float-tooltip .tooltip-number {
  display: block;
  color: #16a34a;
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.phone-float-btn:hover .phone-float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.phone-float-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  border: 2.5px solid #fff;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ai-chatbot-card {
    flex-direction: column;
  }

  .ai-chatbot-left {
    flex: unset;
    padding: 2rem 2rem 1.5rem;
  }

  .ai-chatbot-right {
    padding: 0 1.5rem 1.5rem;
  }

  .ai-chat-messages {
    min-height: 200px;
    max-height: 260px;
  }
}

@media (max-width: 600px) {
  .ai-chatbot-inline {
    margin-top: 2.5rem;
  }

  .ai-chatbot-left {
    padding: 1.5rem 1.25rem 1rem;
  }

  .ai-chatbot-info h3 {
    font-size: 1.3rem;
  }

  .ai-chatbot-right {
    padding: 0 1rem 1rem;
  }

  .ai-chat-messages {
    min-height: 180px;
    max-height: 240px;
  }

  .ai-chatbot-features {
    gap: 0.5rem;
  }

  .ai-chatbot-features span {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .phone-float-btn {
    bottom: 90px;
    right: 18px;
    width: 56px;
    height: 56px;
  }

  .phone-float-tooltip {
    display: none;
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  .phone-float-btn {
    bottom: 95px;
    right: 20px;
    width: 58px;
    height: 58px;
  }
}
