/* ============================================
   OFO AI - Chatbot Widget Styles
   Premium Floating Chat Widget
   ============================================ */

/* Chat Toggle Button */
.ofo-ai-toggle {
  position: fixed;
  bottom: 60px;
  right: 15px;
  width: 95px;
  height: 95px;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  transition: transform 0.3s ease;
}

.ofo-ai-toggle:hover {
  transform: scale(1.1);
}

.chat-icon-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: ofo-mascot-float 3s ease-in-out infinite;
}

.ofo-ai-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.ofo-ai-toggle.active .chat-icon-container {
  display: none;
}

.ofo-ai-toggle svg.close-icon {
  width: 35px;
  height: 35px;
  fill: #1a5a82;
  background: #fff;
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ofo-ai-toggle:not(.active) svg.close-icon {
  display: none;
}

/* Anten Sinyal Işığı (Badge Dot) */
.ofo-ai-toggle .badge-dot {
  position: absolute;
  top: 5px;
  right: 15px;
  width: 10px;
  height: 10px;
  background: #00d2ff;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 10px #00d2ff, 0 0 20px rgba(0, 210, 255, 0.6);
  animation: ofo-signal-pulse 1.5s infinite;
  z-index: 10;
  pointer-events: none;
}

.ofo-ai-toggle.active .badge-dot {
  display: none;
}

/* Maskot Yüzme Animasyonu */
@keyframes ofo-mascot-float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Anten Sinyal Animasyonu */
@keyframes ofo-signal-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 15px #00d2ff, 0 0 25px rgba(0, 210, 255, 0.8);
  }

  100% {
    transform: scale(0.85);
    opacity: 0.8;
  }
}

/* Chat Window */
.ofo-ai-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 400px;
  height: 580px;
  max-height: 80vh;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ofo-ai-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Chat Header */
.ofo-ai-header {
  background: linear-gradient(135deg, #63b5f5 0%, #1a5a82 100%);
  color: #fff;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  flex-shrink: 0;
}

.ofo-ai-avatar {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent !important;
}

.ofo-ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: ofo-mascot-float 3s ease-in-out infinite;
}

.ofo-ai-header-info {
  flex: 1;
}

.ofo-ai-header-info h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.4px;
}

.ofo-ai-header-info span {
  font-size: 13px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.ofo-ai-header-info span::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
}

.ofo-ai-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ofo-ai-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Chat Messages Area */
.ofo-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.ofo-ai-messages::-webkit-scrollbar {
  width: 5px;
}

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

/* Message Bubbles */
.ofo-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: ofo-msg-in 0.3s ease-out;
}

.ofo-msg.bot {
  align-self: flex-start;
}

.ofo-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ofo-msg-avatar {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent !important;
}

.ofo-ai-msg-mascot {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ofo-msg-bubble {
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ofo-msg.bot .ofo-msg-bubble {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 2px;
}

.ofo-msg.user .ofo-msg-bubble {
  background: linear-gradient(135deg, #63b5f5 0%, #1a5a82 100%);
  color: #fff;
  border-top-right-radius: 2px;
}

.ofo-msg-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  padding: 0 5px;
}

.ofo-msg.user .ofo-msg-time {
  text-align: right;
}

/* Chat Input Area */
.ofo-ai-input-area {
  padding: 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.ofo-ai-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 15px;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s;
}

.ofo-ai-input:focus {
  border-color: #63b5f5;
  background: #fff;
}

.ofo-ai-send {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #63b5f5, #1a5a82);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ofo-ai-send svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.ofo-ai-send:hover {
  transform: scale(1.05);
}

.ofo-ai-powered {
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: #94a3b8;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

@keyframes ofo-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .ofo-ai-window {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
  }
}