/**
 * Custom Section Borderless Mode
 * Complete removal of all borders when title is hidden
 */

/* Override with highest specificity */
html body .custom-section .stat-box:not(:has(.stat-box-header)) {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove ALL possible borders from content wrapper */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .stat-box-content {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove borders from all possible child elements */
html body .custom-section .stat-box:not(:has(.stat-box-header)) * {
    border-color: transparent !important;
    outline: none !important;
}

/* Specific removal for posts list */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .posts-list-icon {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
}

/* Remove item borders */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-item-icon {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 8px 0 !important;
}

/* Remove borders from custom content */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .custom-content {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Remove borders from shortcode content */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .shortcode-content {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Clean hover state */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-item-icon:hover {
    background-color: rgba(0, 150, 136, 0.05) !important;
    border: none !important;
}

/* Link styling without borders */
html body .custom-section .stat-box:not(:has(.stat-box-header)) .post-link-icon {
    border: none !important;
    padding: 6px 0 !important;
}

/* Mobile specific */
@media (max-width: 767px) {
    html body .custom-section .stat-box:not(:has(.stat-box-header)),
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .stat-box-content,
    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 {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}

/* Desktop specific */
@media (min-width: 768px) {
    html body .custom-section .stat-box:not(:has(.stat-box-header)),
    html body .custom-section .stat-box:not(:has(.stat-box-header)) .stat-box-content,
    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 {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}