/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom utilities for the tip-off system */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom focus styles */
.focus-ring:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-color: #3b82f6;
}

/* Smooth transitions */
.transition-all {
  transition: all 0.2s ease-in-out;
}

/* Custom button hover effects */
.btn-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading spinner for form submissions */
.loading {
  position: relative;
  display: inline-block;
  opacity: 0.7;
}

/* Chat UI Styles */
.chat-header {
  background: #e3f0ff;
  border-bottom: 1px solid #dbeafe;
  padding: 1rem 1.5rem;
  border-radius: 1rem 1rem 0 0;
}

.chat-messages {
  background: #f8fafc;
  padding: 1rem;
  overflow-y: auto;
  min-height: 300px;
  max-height: 50vh;
}

.chat-message-bubble {
  display: inline-block;
  word-break: break-word;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  max-width: 70%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.chat-message-bubble.tipper {
  background: #f1f0f0;
  color: #222;
  align-self: flex-start;
}

.chat-message-bubble.ward_councillor {
  background: #e0f7fa;
  color: #155e75;
  align-self: flex-end;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #dbeafe;
  background: #fff;
  border-radius: 0 0 1rem 1rem;
}

@media (max-width: 600px) {
  .chat-header, .chat-form {
    padding: 0.5rem 0.75rem;
  }
  .chat-messages {
    padding: 0.5rem;
  }
  .chat-message-bubble {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
  }
}


.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Dropdown specific styles */
.dropdown-menu {
  z-index: 50;
  max-height: 300px;
  overflow-y: auto;
}

/* Clean dropdown button styling */
.dropdown-menu button {
  border: none;
  background: none;
  font: inherit;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  text-align: left;
  border-radius: 0;
  cursor: pointer;
}

.dropdown-menu button:hover {
  background-color: inherit;
  transform: translateY(-1px);
}

/* Focus styles for accessibility */
.dropdown-menu button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background-color: rgba(59, 130, 246, 0.1);
}

/* Icon hover effects */
.dropdown-menu button:hover svg {
  transform: scale(1.1);
  transition: transform 0.2s ease-in-out;
}
