/* ========================================
   Drop Cowboy Comparison Pages Styling
   For /compare/* pages
   ======================================== */

/* ========================================
   1. TL;DR Decision Box
   ======================================== */

.tldr-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #156892;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(39, 170, 225, 0.1);
}

.tldr-box h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #1a1a1a;
  border-bottom: 2px solid #156892;
  padding-bottom: 0.5rem;
}

.tldr-box h4 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2c5282;
}

.tldr-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.tldr-box li {
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  position: relative;
  line-height: 1.6;
}

.tldr-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #156892;
  font-weight: 700;
  font-size: 1.25rem;
}

/* ========================================
   2. Comparison Tables
   ======================================== */

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Show scroll shadow on mobile */
.comparison-table-wrapper::before,
.comparison-table-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  pointer-events: none;
  z-index: 2;
}

.comparison-table-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.comparison-table-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.comparison-table-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 800px;
  background: white;
}

.comparison-table-wrapper thead {
  position: sticky;
  top: 0;
  background: #1a1a1a;
  z-index: 1;
}

.comparison-table-wrapper th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: white;
  border-bottom: 2px solid #156892;
  white-space: nowrap;
}

.comparison-table-wrapper td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.comparison-table-wrapper tbody tr:hover {
  background: #f9fafb;
}

.comparison-table-wrapper tbody tr:last-child td {
  border-bottom: none;
}

/* Checkmarks and X marks */
.comparison-table-wrapper td:has(> :first-child:is(img[alt*="✅"], span:contains("✅"))) {
  color: #10b981;
  font-weight: 600;
}

.comparison-table-wrapper td:has(> :first-child:is(img[alt*="❌"], span:contains("❌"))) {
  color: #ef4444;
  font-weight: 600;
}

.comparison-table-wrapper td:has(> :first-child:is(img[alt*="⚠️"], span:contains("⚠️"))) {
  color: #f59e0b;
  font-weight: 600;
}

/* Table note */
.table-note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
}

/* Responsive table on mobile */
@media (max-width: 768px) {
  .comparison-table-wrapper {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .comparison-table-wrapper table {
    font-size: 0.875rem;
  }

  .comparison-table-wrapper th,
  .comparison-table-wrapper td {
    padding: 0.75rem 0.5rem;
  }
}

/* ========================================
   3. Example/Calculation Boxes
   ======================================== */

.example-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
}

.example-box::before {
  content: "💡";
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.5rem;
}

.example-box > *:first-child {
  margin-top: 0;
  padding-left: 2.5rem;
}

.example-box > *:last-child {
  margin-bottom: 0;
}

.example-box h4 {
  margin-top: 0;
  color: #1e40af;
  font-size: 1.125rem;
}

.example-box strong {
  color: #1e40af;
}

/* ========================================
   4. Comparison Cards (for hub page)
   ======================================== */

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.comparison-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-card:hover {
  border-color: #156892;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(39, 170, 225, 0.2);
}

.comparison-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.5rem;
  color: white;
}

.comparison-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1a1a1a;
}

.comparison-card p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.6;
  flex-grow: 1;
}

.comparison-card .btn-outline {
  margin-top: auto;
  width: 100%;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #156892;
  border: 2px solid #156892;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.comparison-card .btn-outline:hover {
  background: #156892;
  color: white;
}

@media (max-width: 768px) {
  .comparison-cards {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   5. CTA Section
   ======================================== */

.cta-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  padding: 3rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
}

.cta-content {
  text-align: center;
}

.cta-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #1a1a1a;
}

.cta-content p {
  margin-bottom: 1.5rem;
  color: #4b5563;
  line-height: 1.6;
}

.cta-content .btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cta-content .btn-primary {
  background: #156892;
  color: white;
  border: none;
}

.cta-content .btn-primary:hover {
  background: #1e8cbd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 170, 225, 0.3);
}

.cta-content .btn-secondary {
  background: white;
  color: #156892;
  border: 2px solid #156892;
}

.cta-content .btn-secondary:hover {
  background: #156892;
  color: white;
}

@media (max-width: 768px) {
  .cta-section {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }
}

/* ========================================
   6. Disclosure Box (FTC Compliance)
   ======================================== */

.disclosure-box {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 3rem 0 2rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.6;
}

.disclosure-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #1f2937;
  font-weight: 600;
}

.disclosure-box p {
  margin-bottom: 0.75rem;
}

.disclosure-box p:last-child {
  margin-bottom: 0;
}

.disclosure-box a {
  color: #156892;
  text-decoration: underline;
}

/* ========================================
   7. Feature Badges/Icons
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* ========================================
   8. Use Case Sections
   ======================================== */

.use-case-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.use-case-section h4 {
  margin-top: 0;
  color: #1a1a1a;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.use-case-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.use-case-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ========================================
   9. Comparison Matrix (side-by-side)
   ======================================== */

.comparison-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.comparison-column {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}

.comparison-column.drop-cowboy {
  border-color: #156892;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.comparison-column h4 {
  margin-top: 0;
  text-align: center;
  font-size: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid currentColor;
  margin-bottom: 1.5rem;
}

.comparison-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comparison-column li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comparison-column li:last-child {
  border-bottom: none;
}

.comparison-column li::before {
  content: "✓";
  color: #10b981;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.comparison-column.competitor li::before {
  content: "−";
  color: #9ca3af;
}

/* ========================================
   10. Responsive Utilities
   ======================================== */

@media (max-width: 768px) {
  .comparison-matrix {
    grid-template-columns: 1fr;
  }

  .use-case-section {
    padding: 1.5rem;
  }

  .cta-section {
    padding: 2rem 1rem;
  }
}

/* ========================================
   11. Print Styles
   ======================================== */

@media print {
  .cta-section,
  .comparison-cards,
  .related-comparisons {
    display: none;
  }

  .comparison-table-wrapper {
    overflow: visible;
    box-shadow: none;
  }

  .comparison-table-wrapper table {
    page-break-inside: avoid;
  }

  .example-box,
  .disclosure-box {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}

/* ========================================
   12. Accessibility Enhancements
   ======================================== */

/* Focus visible for keyboard navigation */
.comparison-card:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid #156892;
  outline-offset: 2px;
}

/* Ensure sufficient contrast */
.comparison-table-wrapper th {
  background: #1a1a1a;
  color: #ffffff;
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   13. Animation Utilities
   ======================================== */

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ========================================
   14. Dark Mode Support (optional future enhancement)
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

