/**
 * ═══════════════════════════════════════════════════════════════════════
 *  KLEIN PARK - SMART AI CHATBOT CSS
 * ═══════════════════════════════════════════════════════════════════════
 */

:root {
  --smart-ai-primary: #ff6600;
  --smart-ai-secondary: #ff8833;
  --smart-ai-dark: #2c3e50;
  --smart-ai-light: #ecf0f1;
  --smart-ai-white: #ffffff;
  --smart-ai-shadow: rgba(0, 0, 0, 0.15);
  --smart-ai-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   TOGGLE BUTTON (Lebegő gomb)
   ═══════════════════════════════════════════════════════════════════ */

#smart-ai-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 6px 25px var(--smart-ai-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  animation: pulse 2s infinite;
}

#smart-ai-toggle:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 30px rgba(255, 102, 0, 0.4);
}

#smart-ai-toggle:active {
  transform: scale(0.95);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 6px 25px var(--smart-ai-shadow);
  }
  50% {
    box-shadow: 0 6px 30px rgba(255, 102, 0, 0.6);
  }
}

/* Notification Badge */
.smart-ai-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  background: #e74c3c;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
  to {
    transform: translateY(-3px);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   CHATBOX (Beszélgetési ablak)
   ═══════════════════════════════════════════════════════════════════ */

#smart-ai-chatbox {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 420px;
  max-width: calc(100vw - 60px);
  height: 650px;
  max-height: calc(100vh - 60px);
  background: var(--smart-ai-white);
  border-radius: var(--smart-ai-radius);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  overflow: hidden;
}

#smart-ai-chatbox.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-header {
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--smart-ai-radius) var(--smart-ai-radius) 0 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.smart-ai-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.smart-ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.95;
  margin-top: 4px;
}

.smart-ai-status-dot {
  width: 8px;
  height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#smart-ai-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#smart-ai-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════════════
   MESSAGES AREA
   ═══════════════════════════════════════════════════════════════════ */

#smart-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom scrollbar */
#smart-ai-messages::-webkit-scrollbar {
  width: 6px;
}

#smart-ai-messages::-webkit-scrollbar-track {
  background: transparent;
}

#smart-ai-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

#smart-ai-messages::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* ═══════════════════════════════════════════════════════════════════
   MESSAGE BUBBLES
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  animation: fadeInUp 0.3s forwards;
}

.smart-ai-message.visible {
  opacity: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.smart-ai-message.smart-ai-user {
  flex-direction: row-reverse;
}

.smart-ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

.smart-ai-user .smart-ai-avatar {
  background: linear-gradient(135deg, #3498db, #2980b9);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.smart-ai-content {
  flex: 1;
  max-width: 75%;
}

.smart-ai-text {
  background: white;
  padding: 14px 16px;
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
  color: #2c3e50;
  font-size: 15px;
}

.smart-ai-user .smart-ai-text {
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  color: white;
  border-radius: 12px 12px 4px 12px;
}

.smart-ai-text strong {
  font-weight: 600;
  color: var(--smart-ai-primary);
}

.smart-ai-user .smart-ai-text strong {
  color: white;
  text-decoration: underline;
}

.smart-ai-time {
  font-size: 11px;
  color: #95a5a6;
  margin-top: 6px;
  padding: 0 4px;
}

.smart-ai-user .smart-ai-time {
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.smart-ai-action-btn {
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
}

.smart-ai-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.smart-ai-action-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   FEEDBACK GOMBOK
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.smart-ai-feedback-label {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 500;
}

.smart-ai-feedback-btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smart-ai-feedback-btn:hover:not(:disabled) {
  background: #f8f9fa;
  transform: scale(1.1);
  border-color: var(--smart-ai-primary);
}

.smart-ai-feedback-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.smart-ai-feedback-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-typing {
  display: flex;
  gap: 12px;
  align-items: center;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.smart-ai-dots {
  background: white;
  padding: 12px 16px;
  border-radius: 12px 12px 12px 4px;
  display: flex;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.smart-ai-dots span {
  width: 8px;
  height: 8px;
  background: var(--smart-ai-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.smart-ai-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.smart-ai-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   INPUT AREA
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-input-area {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 12px;
  align-items: center;
}

#smart-ai-input {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  padding: 12px 18px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
  font-family: inherit;
}

#smart-ai-input:focus {
  border-color: var(--smart-ai-primary);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

#smart-ai-input::placeholder {
  color: #95a5a6;
}

#smart-ai-send {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--smart-ai-primary), var(--smart-ai-secondary));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 102, 0, 0.3);
}

#smart-ai-send:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

#smart-ai-send:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER INFO
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-footer {
  padding: 12px 20px;
  background: #f8f9fa;
  text-align: center;
  font-size: 11px;
  color: #7f8c8d;
  border-top: 1px solid #e0e0e0;
}

.smart-ai-footer strong {
  color: var(--smart-ai-primary);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #smart-ai-chatbox {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    bottom: 10px;
    right: 10px;
    border-radius: 16px;
  }
  
  #smart-ai-toggle {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    font-size: 28px;
  }
  
  .smart-ai-content {
    max-width: 85%;
  }
  
  .smart-ai-text {
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS & EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.smart-ai-shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Smooth transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
