/* 1. ASTRA THEME HEADER FIX */
body:not(.home) .ast-above-header,
body:not(.home) .ast-below-header {
    display: none;
}

/* 2. MOBILE-SAFE CONTAINER: CENTER THE FOLDER ROWS */
.dlp-folders,
.dlp-folders .dlp-folder {
    list-style: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    text-align: center !important; /* Centers the text and icons together */
    width: 100% !important;
}

.dlp-folders .dlp-folder {
    margin-bottom: 25px !important;
}

/* 3. CENTER THE FOLDER LABEL AND KEEP IT INLINE */
.dlp-folders .dlp-folder-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto 15px auto !important;
    font-size: var(--wp--preset--font-size--medium) !important; /* Matches WP Medium preset */
    position: relative !important;
}

/* 4. STRIP ABSOLUTE POSITIONING TO SNAP THE ICON TO THE CENTERED TEXT */
.dlp-folders .dlp-folder .dlp-icon,
.dlp-folders .dlp-folder .dlp-icon.folder,
.dlp-folders .dlp-folder .dlp-icon.folder_open,
.dlp-folders .dlp-folder .dlp-icon img,
.dlp-folders .dlp-folder .dlp-icon svg,
.dlp-folders .dlp-folder-label::before {
    position: static !important; /* Strips absolute positioning out entirely */
    float: none !important;      /* Prevents theme from floating it left */
    left: auto !important;       /* Clears the left anchor hook */
    top: auto !important;
    margin-right: 12px !important; /* Creates a clean gap between the icon and text */
    margin-left: 0 !important;
    vertical-align: middle !important;
    /* NOTE: We leave 'display' undefined here so the plugin's show/hide toggle works cleanly */
}

/* 5. FORCE EXPANDED TABLES TO BE FULL-WIDTH & NEATLY LEFT-ALIGNED */
.dlp-folders .dlp-folder-content {
    text-align: left !important;   
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.dlp-folders .dlp-folder-content .dataTables_wrapper,
.dlp-folders .dlp-folder-content .posts-data-table {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
}

.dlp-folders .posts-data-table th, 
.dlp-folders .posts-data-table td {
    text-align: left !important;
}