/**
 * ============================================================================
 * PULSAR - Estilos do Chat Interativo v1.0
 * ============================================================================
 * Design moderno com glassmorphism, neon e animações fluidas
 * ============================================================================
 */

/* Modal Container */
.pulsar-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pulsar-chat-modal.active {
  opacity: 1;
}

.pulsar-chat-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.pulsar-chat-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  height: 90vh;
  max-height: 800px;
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  border: 1px solid rgba(142, 45, 226, 0.3);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(142, 45, 226, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulsar-chat-modal.active .pulsar-chat-container {
  transform: scale(1);
}

/* Header */
.pulsar-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(142, 45, 226, 0.2) 0%, rgba(0, 224, 255, 0.2) 100%);
  border-bottom: 1px solid rgba(142, 45, 226, 0.3);
}

.pulsar-chat-event-info h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 10px rgba(142, 45, 226, 0.5);
}

.pulsar-chat-event-info p {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.pulsar-chat-close {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 0, 0, 0.2);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulsar-chat-close:hover {
  background: rgba(255, 0, 0, 0.4);
  transform: rotate(90deg);
}

/* Weather Panel */
.pulsar-chat-weather {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.5s ease;
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.weather-icon {
  font-size: 2.5rem;
  animation: weatherPulse 2s ease-in-out infinite;
}

@keyframes weatherPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.weather-temp {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.weather-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: capitalize;
}

.weather-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.weather-loading {
  color: white;
  font-size: 1rem;
}

/* Navigation Panel */
.pulsar-chat-navigation {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(142, 45, 226, 0.2);
}

.btn-nav-waze,
.btn-nav-gmaps {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-nav-waze {
  background: linear-gradient(135deg, #33CCFF 0%, #0099CC 100%);
  color: white;
}

.btn-nav-gmaps {
  background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
  color: white;
}

.btn-nav-waze:hover,
.btn-nav-gmaps:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Messages Area */
.pulsar-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pulsar-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.pulsar-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.pulsar-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(142, 45, 226, 0.5);
  border-radius: 10px;
}

.pulsar-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(142, 45, 226, 0.7);
}

.chat-welcome,
.chat-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Message */
.chat-message {
  display: flex;
  gap: 0.75rem;
  animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.own {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(142, 45, 226, 0.5);
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  max-width: 70%;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.message-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.message-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.message-text {
  background: rgba(142, 45, 226, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  border-radius: 15px;
  border: 1px solid rgba(142, 45, 226, 0.3);
  color: white;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.own .message-text {
  background: rgba(0, 224, 255, 0.2);
  border-color: rgba(0, 224, 255, 0.3);
}

.message-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.message-actions button {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.message-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Social Interactions */
.pulsar-chat-social {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(142, 45, 226, 0.2);
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(142, 45, 226, 0.3);
  background: rgba(142, 45, 226, 0.1);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-social:hover {
  background: rgba(142, 45, 226, 0.3);
  border-color: rgba(142, 45, 226, 0.5);
  transform: translateY(-2px);
}

.btn-social.liked .icon {
  animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
}

.btn-social .icon {
  font-size: 1.2rem;
}

.btn-social .count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Input Area */
.pulsar-chat-input {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(20, 20, 40, 0.95);
  border-top: 1px solid rgba(142, 45, 226, 0.3);
}

.pulsar-chat-input input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(142, 45, 226, 0.3);
  border-radius: 25px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.pulsar-chat-input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.pulsar-chat-input input:focus {
  border-color: rgba(142, 45, 226, 0.6);
  box-shadow: 0 0 20px rgba(142, 45, 226, 0.3);
}

.btn-send {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
  border: none;
  border-radius: 25px;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(142, 45, 226, 0.4);
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(142, 45, 226, 0.6);
}

.btn-send:active {
  transform: translateY(0);
}

/* Notification */
.pulsar-notification {
  position: fixed;
  top: 20px;
  right: -300px;
  background: rgba(142, 45, 226, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 20000;
  transition: right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
}

.pulsar-notification.show {
  right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .pulsar-chat-container {
    width: 95%;
    height: 95vh;
    border-radius: 15px;
  }

  .pulsar-chat-header {
    padding: 1rem;
  }

  .pulsar-chat-event-info h3 {
    font-size: 1.1rem;
  }

  .pulsar-chat-weather {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .pulsar-chat-navigation {
    flex-direction: column;
  }

  .message-content {
    max-width: 85%;
  }

  .pulsar-chat-social {
    flex-wrap: wrap;
  }

  .btn-social {
    flex: 1 1 45%;
  }
}

@media (max-width: 480px) {
  .pulsar-chat-container {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .weather-temp {
    font-size: 1.5rem;
  }

  .weather-icon {
    font-size: 2rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  .pulsar-chat-container {
    background: rgba(240, 240, 250, 0.95);
    border-color: rgba(142, 45, 226, 0.2);
  }

  .message-text {
    color: #1a1a2e;
  }

  .pulsar-chat-event-info h3 {
    color: #1a1a2e;
  }

  .pulsar-chat-event-info p {
    color: rgba(26, 26, 46, 0.7);
  }
}
