/*
 * 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.
 */

/* Leaflet CSS - OpenStreetMap mapping library */
@import url('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');

/* Custom styles for AI summary ordered lists */
.prose ol {
  counter-reset: list-counter;
  list-style: none;
  padding-left: 0;
}

.prose ol > li {
  counter-increment: list-counter;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.prose ol > li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: #1f2937;
  min-width: 1.5rem;
}

.prose ol > li > strong {
  color: #111827;
  font-weight: 600;
}

/* Styles for markdown content in protest descriptions */
.protest-content a {
  text-decoration: underline;
  color: #2563eb;
  transition: color 0.2s ease;
}

.protest-content a:hover {
  color: #1d4ed8;
}

.protest-content p {
  margin-bottom: 0.5rem;
}

/* Disableable field styling */
.disableable:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Like button styling */
.like-button {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.like-button:hover {
  transform: translateY(-1px);
}

.like-button:active {
  transform: translateY(0);
}

/* Disabled state styling */
.like-button.disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

.like-button.disabled:hover {
  transform: none;
}

/* Like count styling */
.like-count {
  font-variant-numeric: tabular-nums;
  min-width: 1.5rem;
  text-align: center;
}

/* CSS-only tooltip - generic reusable class */
.css-tooltip {
  position: relative;
}

.css-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #5a6c88;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  max-width: 375px;
  white-space: normal;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.css-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #666769;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.css-tooltip:hover::after,
.css-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Mobile: Show tooltip on touch/active state */
@media (max-width: 640px) {
  .css-tooltip:active::after,
  .css-tooltip:active::before {
    opacity: 1;
    visibility: visible;
  }
}
