#plugin-client-modal {
    position: fixed;
    background: #c8c8c859;
    top: 0;
    border: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
#plugin-client-modal-loader {
    position: absolute;
}

/* BasePress Custom Group Tiles Styles */
.bpress-tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: stretch; /* This ensures all grid items have equal height */
}

.bpress-tiles-container .bpress-section {
    width: 100%;
    display: flex; /* Make the section a flex container */
    flex-direction: column;
}

.bpress-tiles-container .bpress-grid {
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height of the grid item */
}

.bpress-tiles-container .bpress-grid .bpress-section.bpress-col {
    margin: 0;
    padding: 0;
    flex: 1; /* Allow it to grow and fill available space */
    display: flex;
    flex-direction: column;
}
.bpress-tile {
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

/* Ensure cards have equal height */
.bpress-tiles-container .bpress-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px; /* Set a minimum height for consistency */
}

.bpress-tiles-container .bpress-card.fix-height {
    flex: 1; /* Allow the card to grow and fill available space */
}

.bpress-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bpress-tile-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: 15px;
}

.bpress-tile-link:hover {
    text-decoration: none;
    color: inherit;
}

.bpress-tile-header {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.3;
    border-left: none;
    padding: 0;
}

.bpress-tile-header.show-icon {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bpress-tile-header .bp-icon {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1.2em;
}

.bpress-tile-title {
    flex: 1;
    font-weight: 600;
}

.bpress-tile-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    margin-top: 8px;
}

.bpress-post-count {
    font-weight: normal;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Responsive Grid System */
.bpress-col-2 { width: 16.66%; }
.bpress-col-3 { width: 25%; }
.bpress-col-4 { width: 33.33%; }
.bpress-col-6 { width: 50%; }
.bpress-col-12 { width: 100%; }

/* Responsive Breakpoints for CSS Grid */
@media (max-width: 768px) {
    .bpress-tiles-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .bpress-tiles-container .bpress-card {
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .bpress-tiles-container {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 15px;
    }

    .bpress-tiles-container .bpress-card {
        min-height: 150px;
    }

    .bpress-tile {
        min-height: 100px;
    }

    .bpress-tile-link {
        padding: 12px;
    }

    .bpress-tile-header {
        font-size: 1em;
    }
}

/* BasePress Theme Integration */
.bpress-tiles-container .bpress-card {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bpress-tiles-container .bpress-card:hover {
    border-color: #ccc;
}

/* Override any conflicting BasePress grid styles */
.bpress-tiles-container .bpress-grid {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    letter-spacing: normal !important;
    text-rendering: auto !important;
}

.bpress-tiles-container .bpress-col {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

/* Icon styling to match BasePress */
.bpress-tile-header .bp-icon:before {
    font-family: 'basepress-icon-font', 'dashicons';
    font-size: inherit;
    line-height: inherit;
    text-decoration: inherit;
    font-weight: normal;
    font-style: normal;
    vertical-align: top;
    text-align: center;
    -webkit-transition: color .1s ease-in 0;
    transition: color .1s ease-in 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Equal height tiles - Enhanced for better flex behavior */
.bpress-tiles-container .fix-height {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bpress-tiles-container .bpress-tile-link {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bpress-tiles-container .bpress-tile-description {
    flex: 1;
}

/* Card body should grow to fill available space */
.bpress-tiles-container .bpress-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bpress-tiles-container .bpress-section-list {
    flex: 1;
}

/* Card footer should stay at bottom */
.bpress-tiles-container .bpress-card-footer {
    margin-top: auto;
}

 .bpress-grid{
    box-sizing: border-box;
    letter-spacing: -0.31em; /* Webkit: collapse white-space between units */
    *letter-spacing: normal; /* reset IE < 8 */
    *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */
    text-rendering: optimizespeed;
}

.bpress-grid *{
    box-sizing: border-box;
    zoom: 1; *display: inline; /* IE < 8: fake inline-block */
    letter-spacing: normal;
    word-spacing: normal;
    text-rendering: auto;
}

.bpress-grid:before,
.bpress-grid:after{
    content: '';
    display: table;
}

.bpress-grid:after{
    content: '';
    display: inline-block;
    width: 100%;
}

.bpress-col{
    display: inline-block;
    margin: 10px 0;
    padding: 0;
    vertical-align: top;
}

.bpress-col.no-padding{
    padding: 0;
}

.bpress-gap{
    display: inline-block;
}


/**
 * 2.0 - Cards
 */

.bpress-card{
    position: relative;
    top: 0;
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 2px;
    background-color: #fff;
    box-shadow: 0 5px 60px rgba(0,0,0,0.15);
    transition: all 250ms ease;
}

.bpress-card:not(.fix-height){
    margin-bottom: 20px !important;
    padding: 25px !important;;
}

.bpress-card:hover{
    position: relative;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
    transition: all 250ms cubic-bezier(.02, .01, .47, 1);
}

h1.bpress-card-header, h2.bpress-card-header {
    margin: -25px -25px 10px;
    padding: 10px 25px 10px 20px;
    border-left: 5px solid #dd8a0d;
    border-radius: 2px 2px 0 0;
    background-color: #ddd;
    font-size: 1.3em !important;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.bpress-card-header span.dashicons {
    color: grey;
    font-weight: bold;
    margin-right: 5px;
}
h2.bpress-card-header.show-icon {
    display: flex;
    align-items: center;
}
li.bpress-post-link.show-icon span.dashicons {
    color: grey;
}
li.bpress-post-link.show-icon {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    padding-left: 20px;
}
.bpress-post-link:hover {
    padding-left: 15px !important;
    background-color: #f3f3f3;
    border-left: 5px solid #d43e3e;
}

.bpress-card-header.small{
    padding: 5px 25px 5px 20px;
    font-size: 1.2em;
}

.bpress-card > a{
    margin: 0;
    padding: 0;
    border: none;
    background-color: transparent;
    background-image: none;
    border-radius: 0;
    text-decoration: none !important;
    color: #333;
}

h1.bpress-card-header a,
h2.bpress-card-header a,
h1.bpress-card-header a:hover,
h2.bpress-card-header a:hover,
.bpress-card > a:hover{
    color: #333;
    text-decoration: none;
}

h1.bpress-card-header.show-icon a,
h2.bpress-card-header.show-icon a{
    display: table-cell;
}

h1.bpress-card-header.show-icon span[class^="bp-"],
h2.bpress-card-header.show-icon span[class^="bp-"]{
    display: table-cell;
    padding-right: 0.5em;
}

.bpress-card .bpress-card-top-image{
    position: relative;
    width: calc( 100% + 50px ) !important;
    max-width: calc( 100% + 50px ) !important;
    margin: -25px -25px 25px !important;
    border-radius: 2px 2px 0 0 !important;
    box-shadow: none !important;
}

.bpress-card .bpress-card-top-image.small{
    text-align: center;
}

.bpress-card .bpress-card-top-image.no-image{
    font-size: 10em;
    text-align: center;
    background-color: #cde8ee;
}

.bpress-card .bpress-card-title{
    margin: 0 0 1em;
    padding: 0;
    font-size: 20px;
    font-weight: 300;
    color: #333;
}

.bpress-card .bpress-card-title a:hover{
    color: #333;
}

.bpress-card-body{
    margin: 0;
    padding: 0;
    color: #333;
}

.bpress-card-body.no-margin{
    margin: 0;
    padding: 0;
}

.bpress-card-footer{
    display: block;
    position: absolute;
    bottom: 0;
    width: 100%;
    margin: 15px -25px 0;
    padding: 15px 25px;
    border-top: 1px solid #eee;
    border-radius: 0 0 2px 2px;
    color: #2283c3;
    cursor: pointer;
}

.bpress-card-footer-post{
    display: block;
    margin: 15px -25px 0;
    padding: 15px 25px;
    border-top: 1px solid #eee;
    border-radius: 0 0 2px 2px;
    color: #2283c3;
}

.bpress-card:hover .bpress-card-footer,
.bpress-card:hover .bpress-card-footer-post{
    background-color: #eee;
    transition: all 250ms cubic-bezier(.02, .01, .47, 1);
}

.bpress-card-footer:hover{
    color: #d43e3e;
}

.bpress-card input,
.bpress-card input:hover{
    background-image: none !important;
}



/**
 * 4.0 - Sections List Type
 */

.bpress-section{
    padding-bottom: 50px;
}

.bpress-post-count{
    font-size: 0.8em;
}

.bpress-post-link{
    margin: 2px -25px;
    padding: 6px 25px;
    list-style-type: none;
}

.bpress-post-link:hover{
    padding-left: 20px;
    background-color: #f3f3f3;
    border-left: 5px solid #dd8a0d;
}

.bpress-post-link a{
    display: block;
    font-size: 1.2em;
    font-weight: 300;
    color: #333;
    text-decoration: none;
}

.bpress-post-link a:hover{
    text-decoration: none;
}

.bpress-post-link.single-section a{
    font-size: 1.2em;
    color: #333;
    font-weight: 300;
}

.bpress-post-link.show-icon a{
    display: table-cell;
    width: 100%;
    color: #333;
}

.bpress-post-link.show-icon span[class^="bp-"]{
    display: table-cell;
    padding-right: 0.5em;
}
span.bp-chevron-right:before {
    content: "\f054";
}
span[class^="bp-"], span[class*=" bp-"] {
    font-family: 'basepress' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1.bpress-card-header.show-icon span[class^="bp-"], h2.bpress-card-header.show-icon span[class^="bp-"] {
    display: table-cell;
    padding-right: 0.5em;
}
span[class^="bp-"], span[class*=" bp-"] {
    font-family: 'basepress' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}