/* LINE Chat Widget Styles */

.line-chat-widget {
  position: fixed;
  bottom: 100px;
  right: 2rem;
  width: 380px;
  max-width: calc(100vw - 4rem);
  height: 550px;
  max-height: calc(100vh - 150px);
  background: var(--bg-glass);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.08);
  display: none;
  flex-direction: column;
  z-index: 998;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.line-chat-widget.active {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

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

.line-chat-header {
  background: linear-gradient(135deg, #06C755, #05a847);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.line-chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.line-chat-avatar svg {
  width: 32px;
  height: 32px;
  fill: #06C755;
}

.line-chat-info {
  flex: 1;
}

.line-chat-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.line-chat-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.line-chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.line-chat-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.line-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.line-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.line-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.line-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.line-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.line-chat-message {
  display: flex;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease-out;
}

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

.line-chat-message.bot {
  align-self: flex-start;
}

.line-chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.line-chat-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.line-chat-message.bot .line-chat-message-avatar {
  background: linear-gradient(135deg, #06C755, #05a847);
}

.line-chat-message.user .line-chat-message-avatar {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
}

.line-chat-message-bubble {
  max-width: 260px;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  word-wrap: break-word;
}

.line-chat-message.bot .line-chat-message-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.line-chat-message.user .line-chat-message-bubble {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  color: white;
  border-bottom-right-radius: 4px;
}

.line-chat-typing {
  display: flex;
  gap: 0.25rem;
  padding: 0.875rem 1.125rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.line-chat-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-blue);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.line-chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.line-chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.line-chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-glow);
  background: rgba(10, 10, 15, 0.5);
}

.line-chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.line-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.line-chat-input::placeholder {
  color: var(--text-secondary);
}

.line-chat-input:focus {
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.15);
}

.line-chat-send {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #06C755, #05a847);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.line-chat-send:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(6, 199, 85, 0.5);
}

.line-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.line-chat-send svg {
  width: 20px;
  height: 20px;
}

.line-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.line-chat-quick-reply {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.line-chat-quick-reply:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 480px) {
  .line-chat-widget {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 90px;
    height: calc(100vh - 120px);
  }
}
