/* Page-specific overrides */
html, body { overflow-x: hidden; }
.container { max-width: 800px; width: 100%; min-width: 0; }
main { min-width: 0; }

/* Top bar (back button + calendar) */
.detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.detail-top-bar .back-btn {
  margin-bottom: 0;
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}
.back-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
}

/* Strike Detail */
.strike-detail {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  min-width: 0;
  max-width: 100%;
}
.strike-header-image {
  margin: 0 0 24px 0;
  line-height: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.strike-header-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
  object-fit: contain;
  vertical-align: middle;
}
.strike-header {
  margin-bottom: 24px;
}
.strike-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  min-width: 0;
}
.strike-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.last-updated {
  margin: 8px 0 16px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.last-updated time {
  font-weight: 600;
  color: var(--text);
}
.strike-date-label {
  background: var(--primary-100);
  color: var(--primary-600);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--primary-200);
}
.strike-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.pill.red { background: #fee2e2; color: #b91c1c; }
.pill.orange { background: #ffedd5; color: #c2410c; }
.pill.yellow { background: #fef9c3; color: #a16207; }
.pill.green { background: #dcfce7; color: #166534; }
.pill.blue { background: var(--primary-50); color: var(--primary-600); }
.pill.gray { background: var(--bg-soft); color: var(--text-dim); }

/* Strike description: tracker aesthetics, scannability */
.strike-description,
.strike-description-body {
  font-size: 16px;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 24px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
}
.strike-description p,
.strike-description-body p,
.strike-description li,
.strike-description-body li {
  line-height: 1.65;
}
.strike-description h1,
.strike-description h2,
.strike-description h3,
.strike-description h4,
.strike-description h5,
.strike-description h6,
.strike-description-body h1,
.strike-description-body h2,
.strike-description-body h3,
.strike-description-body h4,
.strike-description-body h5,
.strike-description-body h6 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #1e293b;
}
.strike-description h3,
.strike-description h4,
.strike-description-body h3,
.strike-description-body h4 {
  margin-top: 2rem;
}
.strike-description h1,
.strike-description-body h1 { font-size: 24px; }
.strike-description h2,
.strike-description-body h2 { font-size: 20px; }
.strike-description h3,
.strike-description-body h3 { font-size: 18px; }
.strike-description h4,
.strike-description-body h4 { font-size: 16px; }
.strike-description p,
.strike-description-body p {
  margin: 0 0 0.75rem 0;
}
.strike-description ul,
.strike-description ol,
.strike-description-body ul,
.strike-description-body ol {
  margin: 12px 0;
  padding-left: 2.25rem !important;
  margin-left: 0;
  list-style-position: outside;
}
.strike-description ul,
.strike-description-body ul {
  list-style-type: disc;
}
.strike-description ol,
.strike-description-body ol {
  list-style-type: decimal;
}
.strike-description li,
.strike-description-body li {
  margin-bottom: 0.6rem;
  padding-left: 8px;
  display: list-item;
}
.strike-description strong,
.strike-description b,
.strike-description-body strong,
.strike-description-body b {
  font-weight: 600;
  color: #0f172a;
}
.strike-description em,
.strike-description i,
.strike-description-body em,
.strike-description-body i {
  font-style: italic;
}
.strike-description a,
.strike-description-body a {
  color: #2563eb;
  text-decoration: none;
}
.strike-description a:hover,
.strike-description-body a:hover {
  text-decoration: underline;
}
.strike-description blockquote,
.strike-description-body blockquote {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  font-style: normal;
  color: #475569;
}
.strike-description blockquote p,
.strike-description-body blockquote p {
  margin: 0 0 0.5rem 0;
}
.strike-description blockquote p:last-child,
.strike-description-body blockquote p:last-child {
  margin-bottom: 0;
}
.strike-description code,
.strike-description-body code {
  background: var(--primary-50);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}
.strike-description pre,
.strike-description-body pre {
  background: var(--primary-50);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 16px 0;
}
.strike-description pre code,
.strike-description-body pre code {
  background: none;
  padding: 0;
}
.strike-description hr,
.strike-description-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 1.5rem 0;
}
.strike-description table,
.strike-description-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.strike-description th,
.strike-description-body th {
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: #1e293b;
}
.strike-description td,
.strike-description-body td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}
.strike-description tr:last-child td,
.strike-description-body tr:last-child td {
  border-bottom: none;
}

.strike-updated {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
}
.updated-label {
  font-weight: 600;
  color: var(--text-dim);
}
.strike-updated time {
  color: var(--text-dim);
  font-weight: 500;
}
.date-separator {
  margin: 0 8px;
  color: var(--border);
}

.detail-section {
  margin-bottom: 24px;
}
.detail-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}
.detail-section p {
  margin: 0 0 8px 0;
  color: var(--text-dim);
}
.detail-section ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}
.detail-section li {
  margin-bottom: 4px;
}
.citations {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.citations h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
}
.citations ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.citations li {
  margin-bottom: 8px;
}
.citations a {
  color: var(--primary-600);
  text-decoration: none;
  font-size: 14px;
}
.citations a:hover {
  text-decoration: underline;
}

/* Public Impact */
.public-impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.impact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.impact-icon {
  font-size: 20px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border-radius: 50%;
  transition: all 0.2s ease;
}
.impact-item:hover .impact-icon {
  background: var(--primary-100);
  transform: scale(1.1);
}
.impact-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Effective Dates */
.effective-dates-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.effective-dates-list li {
  margin: 0;
  padding: 0;
}
.effective-dates-list li strong {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-600);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--primary-200);
  white-space: nowrap;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding-left: 24px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-marker {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 2px 4px rgba(13, 64, 118, 0.08);
}
.timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.timeline-description {
  color: var(--text);
  line-height: 1.5;
}
/* Sources Toggle */
.sources-toggle {
  transition: color 0.2s ease;
}
.sources-toggle:hover {
  color: var(--primary-500);
}
.sources-icon {
  transition: transform 0.2s ease;
  display: inline-block;
}
.sources-content {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sources-content.hidden {
  display: none !important;
}
.sources-icon.rotated {
  transform: rotate(-90deg);
}

/* Feedback Buttons */
.feedback-buttons {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  align-items: flex-start;
  flex-wrap: wrap;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.feedback-btn-icon {
  font-size: 14px;
}
.feedback-btn:hover:not(:disabled) {
  background: var(--primary-50);
  border-color: var(--primary-300);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 64, 118, 0.1);
}
.feedback-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.feedback-btn.thumbs-up.active {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}
.feedback-btn.thumbs-down.active {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}
.feedback-btn.report.active {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-600);
}
.feedback-btn-icon {
  font-size: 18px;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.modal-body {
  margin-bottom: 24px;
}
.modal-form-group {
  margin-bottom: 20px;
}
.modal-form-group label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 14px;
}
.modal-form-group textarea,
.modal-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.modal-form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.modal-form-group textarea:focus,
.modal-form-group input:focus {
  outline: none;
  border-color: var(--primary-400);
}
.modal-form-group .help-text {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}
.modal-form-group .error-text {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.modal-form-group.has-error .error-text {
  display: block;
}
.modal-form-group.has-error textarea,
.modal-form-group.has-error input {
  border-color: var(--danger);
}
.recaptcha-container {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.modal-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.modal-btn-cancel {
  background: white;
  color: var(--text);
  border-color: var(--border);
}
.modal-btn-cancel:hover {
  background: var(--bg-soft);
  border-color: var(--primary-200);
}
.modal-btn-submit {
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-600);
}
.modal-btn-submit:hover:not(:disabled) {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 64, 118, 0.2);
}
.modal-btn-submit:disabled {
  background: var(--text-dim);
  cursor: not-allowed;
  transform: none;
}
.modal-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}
.modal-message.show {
  display: block;
}
.modal-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.modal-message.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* AI Badge */
.ai-badge {
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  background: var(--bg-soft);
  flex-wrap: wrap;
}
.ai-badge .ai-icon {
  height: 14px;
  width: 14px;
  vertical-align: middle;
  flex-shrink: 0;
  color: var(--primary-600);
}
.ai-badge strong {
  color: var(--text);
  font-weight: 600;
}
.ai-badge a {
  color: var(--primary-600);
  text-decoration: underline;
  font-weight: 500;
}
.ai-badge a:hover {
  color: var(--primary-600);
  text-decoration: none;
}

/* Social Share */
.social-share {
  margin: 32px 0 24px 0;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.social-share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.social-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}
.social-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 64, 118, 0.1);
}
.social-share-btn svg {
  flex-shrink: 0;
}
.social-share-btn-text {
  white-space: nowrap;
}
.social-share-btn.copied {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-600);
}
/* Platform-specific colors on hover */
.social-share-twitter:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
  color: white;
}
.social-share-facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: white;
}
.social-share-linkedin:hover {
  background: #0A66C2;
  border-color: #0A66C2;
  color: white;
}
.social-share-whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
  color: white;
}
.social-share-email:hover {
  background: var(--primary-500);
  border-color: var(--primary-600);
  color: white;
}
.social-share-copy:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}
.social-share-native:hover {
  background: var(--primary-500);
  border-color: var(--primary-600);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 16px; }
  .nav-inner { padding: 14px 16px; }
  .strike-detail { padding: 20px; }
  .strike-title { font-size: 24px; }
  .strike-meta { flex-direction: column; }
  .effective-dates-list li strong { white-space: normal; }
  .public-impact-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
  }
  .impact-item {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .impact-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    margin: 0 auto;
  }
  .impact-label {
    font-size: 12px;
  }
  .timeline { padding-left: 16px; }
  .timeline-item { padding-left: 16px; }
  .timeline-marker { left: -12px; }

  /* Mobile: stretch buttons full-width with proper tap targets.
     Thumbs-up + thumbs-down share the first row (50/50), Report
     spans the full width on a second row. */
  .feedback-buttons {
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
  }
  .feedback-btn {
    font-size: 14px;
    padding: 12px 14px;
    min-height: 44px;
    justify-content: center;
    flex: 1 1 calc(50% - 5px);
  }
  .feedback-btn.report {
    flex: 1 1 100%;
  }
  .feedback-btn-icon {
    font-size: 16px;
  }
  .modal {
    padding: 24px;
    margin: 10px;
  }
  .ai-badge {
    font-size: 0.8rem;
    padding: 10px 12px;
    gap: 6px;
  }
  .ai-badge .ai-icon {
    height: 12px;
    width: 12px;
  }
  
  .social-share {
    padding: 16px;
    margin: 24px 0 20px 0;
  }
  .social-share-buttons {
    gap: 6px;
  }
  .social-share-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-height: 36px;
  }
  .social-share-btn-text {
    display: none;
  }
  .social-share-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Calendar Dropdown — Detail Page */
.cal-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.ical-btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ical-btn-detail:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-100);
}
.cal-dropdown {
  display: none;
  position: fixed;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 64, 118, 0.15);
  z-index: 1000;
  min-width: 180px;
  overflow: hidden;
}
.cal-dropdown-wrapper.open .cal-dropdown {
  display: block;
}
.cal-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s ease;
  white-space: nowrap;
}
.cal-dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}
.cal-dropdown-item + .cal-dropdown-item {
  border-top: 1px solid var(--border);
}
