/*
 Theme Name:   Bootscore Child
 Description:  Bootscore Child Theme
 Author:       Bootscore
 Author URI:   https://bootscore.me
 Template:     bootscore
 Version:      6.0.0
 Requires at least: 5.0
 Tested up to: 6.6
 Requires PHP: 7.4
 License: MIT License
 License URI: https://github.com/bootscore/bootscore-child/blob/main/LICENSE
 Text Domain:  bootscore
*/

/* 
All style editing is done via /assets/scss/_bootscore_custom.scss
*/

/* 
  FALLBACK: Direct CSS fixes for responsive tables
  This bypasses SCSS compilation to ensure the styles are applied immediately.
*/
.entry-content .wp-block-table,
.entry-content figure.table-responsive {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: visible !important; /* Evita el scroll horizontal */
    margin-bottom: 1.5rem;
}

@media (max-width: 767.98px) {
    .entry-content .wp-block-table.alignleft,
    .entry-content .wp-block-table.alignright,
    .entry-content figure.table-responsive.alignleft,
    .entry-content figure.table-responsive.alignright {
        float: none !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.entry-content .wp-block-table table,
.entry-content figure.table-responsive table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important; /* Permite que las columnas auto-ajusten su tamaño */
    margin-bottom: 0;
}

/* Forzar que las celdas se ajusten y se encojan permitiendo saltos de línea */
.entry-content .wp-block-table td,
.entry-content .wp-block-table th,
.entry-content figure.table-responsive td,
.entry-content figure.table-responsive th {
    white-space: normal !important;       /* Permite saltos de línea normales */
    word-wrap: break-word !important;      /* Rompe palabras si es necesario */
    word-break: break-word !important;
    min-width: 0 !important;               /* Permite que se encojan al máximo */
}
