/**
 * Ultimate Fix for Custom Section No Title
 * Completely remove ALL borders and backgrounds when title is hidden
 * This overrides inline styles in the template
 */

/* Force override inline styles with maximum specificity */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove white background from custom content */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove ALL borders from individual items */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-item-icon {
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    background-color: transparent !important;
    margin: 0 !important;
    padding: 5px 0 !important;
}

/* Keep last child without border */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-item-icon:last-child {
    border: none !important;
    border-bottom: none !important;
}

/* Subtle hover without background */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-item-icon:hover {
    background: transparent !important;
    background-color: rgba(0, 150, 136, 0.03) !important;
}

/* Remove padding from links */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-link-icon {
    padding: 5px 0 !important;
    background: transparent !important;
}

/* Ensure stat-box has no styles */
html body .custom-section .stat-box:not(:has(.stat-box-header)) {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure stat-box-content is transparent */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .stat-box-content {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove any possible borders from shortcode content */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .shortcode-content {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Override any media query styles */
@media all {
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon,
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content,
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .shortcode-content {
        background: transparent !important;
        border: none !important;
    }
}

/* Mobile specific overrides */
@media (max-width: 767px) {
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon,
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }
}

/* Desktop specific overrides */
@media (min-width: 768px) {
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon,
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }
}

/* Final insurance - remove all child element borders */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon *,
html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content *,
html body .custom-section .stat-box:not(:has(.stat-box-header)) .shortcode-content * {
    border-color: transparent !important;
}