/* SOC Chat - Modern Attractive Design */

.soc-chat-container {
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Suggestions */
#suggestions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(15, 15, 30, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.suggestion-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.suggestion-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Messages Container */
.chat-messages {
  height: 600px;
  overflow-y: auto;
  padding: 20px;
  margin-bottom: 20px;
  background: rgba(10, 10, 20, 0.6);
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 rgba(26, 26, 46, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

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

.chat-messages::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

/* Messages */
.message {
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease-out;
}

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

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

.message-user .message-header {
  justify-content: flex-end;
}

.message-user .message-content {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 14px 18px;
  border-radius: 18px 18px 4px 18px;
  max-width: 80%;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  font-size: 15px;
  line-height: 1.5;
}

.message-assistant .message-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  padding: 18px;
  border-radius: 18px 18px 18px 4px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-assistant .message-content p {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.message-error .message-content {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Loading Indicator */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-style: italic;
}

.loading::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Tables */
.table-responsive {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
}

.table-dark thead {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.table-dark th {
  padding: 14px 16px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #60a5fa;
  border-bottom: 2px solid #3b82f6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-dark td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  font-size: 14px;
}

.table-dark tbody tr {
  transition: all 0.2s ease;
}

.table-dark tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.01);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(15, 23, 42, 0.5);
}

/* Input Form */
.chat-input-form {
  position: sticky;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 16px 0 0 0;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.chat-input-form .input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.chat-input-form .form-control {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(59, 130, 246, 0.3);
  color: white;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.chat-input-form .form-control:focus {
  background: rgba(15, 23, 42, 1);
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.chat-input-form .form-control::placeholder {
  color: #6b7280;
}

.chat-input-form .btn-primary {
  padding: 14px 32px;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-input-form .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.chat-input-form .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.chat-input-form .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Severity Badges */
.severity-critical {
  color: #ef4444;
  font-weight: 600;
}

.severity-high {
  color: #f97316;
  font-weight: 600;
}

.severity-medium {
  color: #eab308;
  font-weight: 600;
}

.severity-low {
  color: #22c55e;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .soc-chat-container {
    padding: 16px;
    border-radius: 12px;
  }
  
  .chat-messages {
    height: 400px;
  }
  
  .message-user .message-content,
  .message-assistant .message-content {
    max-width: 95%;
  }
  
  #suggestions-container {
    padding: 12px;
  }
  
  .suggestion-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .chat-input-form .form-control {
    font-size: 14px;
    padding: 12px 16px;
  }
  
  .chat-input-form .btn-primary {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .table-dark th,
  .table-dark td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

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

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Scrollbar for Tables */
.table-responsive {
  max-height: 500px;
  overflow-y: auto;
}

.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 4px;
}

/* Highlight important data */
.table-dark td:first-child {
  font-weight: 600;
  color: #60a5fa;
}

/* Add subtle glow effect */
.soc-chat-container {
  position: relative;
}

.soc-chat-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #2563eb, #1d4ed8, #3b82f6);
  border-radius: 18px;
  opacity: 0.1;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite;
  background-size: 300% 300%;
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
