/* Base typography - apply ONLY to inbi-post-content */
#inbi-post-content,
#inbi-post-content .et_pb_text,
#inbi-post-content p {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* Headings - SCOPED to inbi-post-content only */
#inbi-post-content h1, 
#inbi-post-content h2, 
#inbi-post-content h3, 
#inbi-post-content h4,
#inbi-post-content .et_pb_text h1,
#inbi-post-content .et_pb_text h2,
#inbi-post-content .et_pb_text h3,
#inbi-post-content .et_pb_text h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #111;
  margin-top: 1em;
  margin-bottom: 1em;
}

#inbi-post-content h1,
#inbi-post-content .et_pb_text h1 { font-size: 42px; }
#inbi-post-content h2,
#inbi-post-content .et_pb_text h2 { font-size: 32px; }
#inbi-post-content h3,
#inbi-post-content .et_pb_text h3 { font-size: 26px; }
#inbi-post-content h4,
#inbi-post-content .et_pb_text h4 { font-size: 22px; }

/* Paragraph spacing - SCOPED to inbi-post-content */
#inbi-post-content p,
#inbi-post-content .et_pb_text p {
  margin-bottom: 1.2em;
}

/* Clean tables with horizontal lines only - SCOPED to inbi-post-content */
#inbi-post-content table,
#inbi-post-content .et_pb_text table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 2em;
  border: none;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border-radius: 6px;
  overflow: hidden;
  font-size: 14px;
}

#inbi-post-content th, 
#inbi-post-content td,
#inbi-post-content .et_pb_text th,
#inbi-post-content .et_pb_text td {
  border: none;
  border-bottom: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Specific styling for large summary tables - SCOPED to inbi-post-content */
#inbi-post-content table td:first-child,
#inbi-post-content .et_pb_text table td:first-child {
  font-size: 12px;
  max-width: 200px;
  white-space: normal;
}

/* Numeric columns stay compact - SCOPED to inbi-post-content */
#inbi-post-content table td:not(:first-child),
#inbi-post-content .et_pb_text table td:not(:first-child) {
  white-space: nowrap;
  text-align: left;
}

#inbi-post-content tr:last-child td,
#inbi-post-content .et_pb_text tr:last-child td {
  border-bottom: none;
}

#inbi-post-content th,
#inbi-post-content .et_pb_text th {
  background-color: #f9f9f9;
  font-weight: 600;
}

/* Table row hover - SCOPED to inbi-post-content */
#inbi-post-content table tr:hover td,
#inbi-post-content .et_pb_text table tr:hover td {
  background: #f5f7fa;
}

/* HR becomes vertical spacing only - SCOPED to inbi-post-content */
#inbi-post-content hr,
#inbi-post-content .et_pb_text hr {
  border: none;
  height: 20px;
  margin: 20px 0;
}

/* Strong text - SCOPED to inbi-post-content */
#inbi-post-content strong,
#inbi-post-content .et_pb_text strong {
  font-weight: 600;
  color: #222;
}

/* Callout block styling - SCOPED to inbi-post-content */
#inbi-post-content .inbi-callout {
  background-color: #f0f4fa;
  border-left: 4px solid #0077cc;
  padding: 16px;
  margin: 2em 0;
  border-radius: 4px;
}

/* Lists - SCOPED to inbi-post-content */
#inbi-post-content ul, 
#inbi-post-content ol,
#inbi-post-content .et_pb_text ul,
#inbi-post-content .et_pb_text ol {
  margin-left: 2em;
  padding-left: 0.5em;
}

#inbi-post-content li,
#inbi-post-content .et_pb_text li {
  margin-bottom: 0.5em;
}

/* Links - SCOPED to inbi-post-content only */
#inbi-post-content a,
#inbi-post-content .et_pb_text a {
  color: var(--et_primary_color, #963638);
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

#inbi-post-content a:hover,
#inbi-post-content .et_pb_text a:hover {
  color: var(--et_primary_color_hover, #963638);
  text-decoration: underline;
}

/* Blockquote styling - SCOPED to inbi-post-content */
#inbi-post-content blockquote,
#inbi-post-content .et_pb_text blockquote {
  border-left: 4px solid #0077cc;
  background: #f0f4fa;
  color: #333;
  padding: 1em 1.5em;
  margin: 2em 0;
  border-radius: 4px;
}

/* Divi section spacing and padding - SCOPED to inbi-post-content */
#inbi-post-content .et_pb_section {
  padding: 10px 0 !important;
  margin-bottom: 20px;
  box-shadow: none !important;
  background-color: transparent;
}



/* Ensure consistent padding for section content - SCOPED to inbi-post-content */
#inbi-post-content .et_pb_section .et_pb_row {
  padding: 0 0px !important;
}

#inbi-post-content .et_pb_section:not(:first-child) {
  margin-top: 20px;
}

/* Code blocks - white background only for fullwidth code modules - SCOPED to inbi-post-content */
#inbi-post-content .et_pb_fullwidth_code {
  background: white !important;
  padding: 20px 40px;
  border-radius: 6px;
  /* box-shadow: 3px 8px 8px 4px rgba(0, 0, 0, 0.03); */
}

/* Post title section styling - white background with rounded corners - SCOPED to inbi-post-content */
#inbi-post-content .et_pb_section .et_pb_post_title_0_tb_body.et_pb_post_title {
  border-radius: 6px;
}

/* ================================================================================ */
/* Premium Gate setup */
/* ================================================================================ */

/* Premium table container */
.premium-table-container {
    position: relative;
}

/* Full table overlay (original approach) */
.premium-table-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.95) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none; /* Allow scrolling underneath */
}

.premium-overlay-content {
    background: #ffffff;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    pointer-events: auto; /* Re-enable for CTA button */
}

.premium-overlay-text {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.premium-upgrade-btn {
    background: #e74c3c;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.premium-upgrade-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Row-specific premium overlays */
.premium-table-with-row-overlays .premium-row-with-overlay {
    position: relative;
}

.premium-row-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
    backdrop-filter: blur(1px);
}

.premium-row-overlay-content {
    text-align: center;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 90%;
}

.premium-row-overlay-text {
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.3;
}

.premium-row-upgrade-btn {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.premium-row-upgrade-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Ensure proper table styling for premium overlays */
#inbi-post-content .premium-table-with-row-overlays,
#inbi-post-content .et_pb_text .premium-table-with-row-overlays {
    position: relative;
}

#inbi-post-content .premium-table-with-row-overlays tr,
#inbi-post-content .et_pb_text .premium-table-with-row-overlays tr {
    position: relative;
}

/* Row-specific premium overlays - NEW APPROACH */
.premium-row-overlay-container {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.premium-row-overlay-container td {
    position: relative;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.premium-row-overlay {
    position: absolute;
    top: -30px; /* Adjust to cover the actual row above */
    left: 0;
    right: 0;
    height: 30px; /* Adjust to match row height */
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
    backdrop-filter: blur(1px);
    pointer-events: auto;
}

.premium-row-overlay-content {
    text-align: center;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    max-width: 90%;
}

.premium-row-overlay-text {
    display: block;
    font-size: 10px;
    margin-bottom: 4px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.2;
}

.premium-row-upgrade-btn {
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    text-decoration: none;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.premium-row-upgrade-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Style for premium rows that are partially visible */
.premium-row-with-overlay {
    opacity: 0.7;
}

.premium-row-with-overlay td:not(:first-child):not(:nth-child(2)) {
    background: #f8f9fa !important;
    color: #bdc3c7 !important;
}

/* Premium content blocks */
.premium-content-visible {
    /* Content that is visible to premium users */
}

.premium-content-blocked {
    /* Content that is blocked for non-premium users */
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 20px 0;
}

.premium-content-blocked.divi-cta-module {
    padding: 0;
    background: transparent;
}

/* Premium CTA styling */
.premium-cta {
    margin: 20px 0;
    text-align: center;
}

.premium-cta.priority-primary {
    /* Primary CTA styling - more prominent */
    background: #e74c3c;
    color: white;
    padding: 20px;
    border-radius: 6px;
}

.premium-cta.priority-secondary {
    /* Secondary CTA styling - less prominent */
    background: #f8f9fa;
    border: 1px solid #e74c3c;
    padding: 15px;
    border-radius: 6px;
}

/* Responsive adjustments for premium overlays */
@media (max-width: 768px) {
    .premium-row-overlay-text {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .premium-row-upgrade-btn {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .premium-overlay-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .premium-overlay-text {
        font-size: 14px;
    }
    
    .premium-upgrade-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* ================================================================================ */