/*
HeavyDutyPR Review Styler
Version: 1.1.1
Purpose: Review article layout, product review styling, comparison tables, affiliate buttons, TOC, sidebar widgets, and mobile table handling.
*/

/* Main article readability */
.entry-content-single {
  font-size: 17px;
  line-height: 1.75;
}

.entry-content-single > p:first-of-type {
  font-size: 18px;
  line-height: 1.8;
  color: #243447;
}

/* Hero image */
.entry-image-single img {
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(5, 40, 71, 0.12);
}

/* Table of contents */
#ez-toc-container {
  border: 1px solid #dbe3ea !important;
  border-radius: 16px;
  padding: 20px 22px !important;
  margin: 30px 0;
  background: #f7f9fb !important;
  box-shadow: 0 8px 22px rgba(5, 40, 71, 0.06);
}

#ez-toc-container .ez-toc-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #052847;
}

#ez-toc-container a {
  color: #084378;
  text-decoration: none;
}

#ez-toc-container a:hover {
  text-decoration: underline;
}

/* Section headings */
.entry-content-single h2 {
  margin-top: 56px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e6edf3;
  font-size: 32px;
  line-height: 1.25;
  color: #052847;
}

.entry-content-single h3 {
  margin-top: 46px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-left: 6px solid #052847;
  border-radius: 12px;
  background: #f7f9fb;
  font-size: 25px;
  line-height: 1.3;
  color: #052847;
}

.entry-content-single h4 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 20px;
  color: #052847;
}

/* Product images */
.entry-content-single .wp-block-image {
  margin: 22px 0 14px;
}

.entry-content-single .wp-block-image img {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* Amazon button */
.entry-content-single .no-margin {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 24px;
}

.amz-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 13px 22px !important;
  border-radius: 999px !important;
  background: #052847 !important;
  border: 1px solid #052847 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(5, 40, 71, 0.18);
  transition: all 0.2s ease;
  margin-left: auto;
  margin-right: auto;
}

.amz-button:hover {
  background: #084378 !important;
  border-color: #084378 !important;
  opacity: 1 !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(5, 40, 71, 0.22);
}

/* Lists inside product reviews */
.entry-content-single ul.wp-block-list {
  padding-left: 0;
  list-style: none;
}

.entry-content-single ul.wp-block-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 26px;
}

.entry-content-single ul.wp-block-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #052847;
}

/* Comparison tables */
.entry-content-single .wp-block-table {
  margin: 26px 0 36px;
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: 0 8px 24px rgba(5, 40, 71, 0.08);
}

.entry-content-single .wp-block-table table {
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.entry-content-single .wp-block-table th {
  background: #052847;
  color: #ffffff;
  font-weight: 700;
  border-color: #052847 !important;
}

.entry-content-single .wp-block-table td,
.entry-content-single .wp-block-table th {
  padding: 14px 16px !important;
  border-color: #e6edf3 !important;
  vertical-align: top;
}

.entry-content-single .wp-block-table tbody tr:nth-child(even) {
  background: #f7f9fb;
}

/* Affiliate disclosure / after entry */
.after-entry blockquote {
  border-left: 5px solid #052847;
  border-radius: 14px;
  background: #f7f9fb;
  padding: 18px 22px;
  color: #243447;
}

/* Author box */
.author-box {
  border: 1px solid #e6edf3;
  border-radius: 18px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(5, 40, 71, 0.06);
}

/* Sidebar widgets */
.sidebar .widget {
  border: 1px solid #e6edf3;
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(5, 40, 71, 0.05);
}

.sidebar .widget-title {
  color: #052847;
  font-size: 20px;
}

/* Quick Recommendations styling - no post editing required.
   This targets the common structure: H2 Quick Recommendations > H3 > product paragraph > description paragraph.
   Supports up to 8 recommendation cards. */
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) {
  margin-top: 52px;
  margin-bottom: 22px;
}

.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 {
  padding: 16px 18px;
  border-left: 0;
  border-radius: 14px 14px 0 0;
  background: #052847;
  color: #ffffff;
  margin-top: 22px;
  margin-bottom: 0;
  font-size: 20px;
}

.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p {
  margin: 0;
  padding: 18px 20px 8px;
  border-left: 1px solid #e6edf3;
  border-right: 1px solid #e6edf3;
  background: #ffffff;
  font-weight: 700;
  color: #052847;
}

.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p,
.entry-content-single h2:has(.ez-toc-section#Quick_Recommendations) + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p + h3 + p + p {
  margin-top: 0;
  margin-bottom: 22px;
  padding: 0 20px 18px;
  border-left: 1px solid #e6edf3;
  border-right: 1px solid #e6edf3;
  border-bottom: 1px solid #e6edf3;
  border-radius: 0 0 14px 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(5, 40, 71, 0.06);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .entry-content-single {
    font-size: 16px;
  }

  .entry-content-single h2 {
    font-size: 27px;
  }

  .entry-content-single h3 {
    font-size: 22px;
    padding: 16px;
  }

  .amz-button {
    width: 100%;
  }

  .entry-content-single .wp-block-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }

  .entry-content-single .wp-block-table::before {
    content: "Swipe left to view full comparison table";
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #5b6775;
    font-weight: 600;
  }

  .entry-content-single .wp-block-table table {
    min-width: 760px;
    width: 760px;
    table-layout: auto !important;
  }

  .entry-content-single .wp-block-table table.has-fixed-layout {
    table-layout: auto !important;
  }

  .entry-content-single .wp-block-table th,
  .entry-content-single .wp-block-table td {
    white-space: normal;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none;
    font-size: 15px;
    line-height: 1.45;
  }

  .entry-content-single .wp-block-table th {
    white-space: nowrap;
  }

  .entry-content-single .wp-block-table td:first-child,
  .entry-content-single .wp-block-table th:first-child {
    min-width: 180px;
  }
}

/* Top affiliate disclosure inserted by plugin */
.hdpr-affiliate-note {
  margin: 24px 0 28px;
  padding: 14px 18px;
  border-left: 5px solid #052847;
  border-radius: 14px;
  background: #f7f9fb;
  color: #243447;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 8px 22px rgba(5, 40, 71, 0.05);
}
