/**
 * Module Tiles Styles
 *
 * Styles for [lde_module_tiles] shortcode.
 * All classes prefixed with lde-tiles- to avoid conflicts.
 *
 * Depends on: lde-courses-variables (CSS custom properties)
 *
 * @package LDE Module Tiles
 */

/**** HIDE GOOGLE STARS BANNER ****/
.lde-google-reviews-banner {
    display: none !important;
}
/**** HIDE GOOGLE STARS BANNER ****/



/**** FILTER BAR ****/

.lde-tiles-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.lde-tiles-search {
    position: relative;
    flex: 2;
}

.lde-tiles-search-input {
    font: inherit;
    border: 1px solid #ccc;
    padding: 0.7rem 2.7rem 0.7rem 1.2rem;
    border-radius: 0.8rem;
    width: 100%;
    box-sizing: border-box;
}

.lde-tiles-search-input:focus {
    outline: none;
    border-color: var(--lde-primary-color);
}

img.lde-tiles-search-icon {
    display: block;
    position: absolute;
    top: 50%;
    right: 0.7rem;
    width: auto;
    height: 1.4rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.lde-tiles-sort {
    flex: 1;
}

.lde-tiles-sort-select {
    font: inherit;
    border: 1px solid #ccc;
    padding: 0.7rem 1.2rem;
    border-radius: 0.8rem;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.lde-tiles-sort-select:focus {
    outline: none;
    border-color: var(--lde-primary-color);
}

@media screen and (max-width: 550px) {
    .lde-tiles-filter {
        flex-direction: column;
    }

    .lde-tiles-search,
    .lde-tiles-sort {
        flex: none;
        width: 100%;
    }
}

/**** /FILTER BAR ****/


/**** TILE GRID ****/

.lde-tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

@media screen and (max-width: 768px) {
    .lde-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 550px) {
    .lde-tiles-grid {
        grid-template-columns: 1fr;
    }
}

/**** /TILE GRID ****/


/**** TILE CARD ****/
.lde-tiles-card {
    --tile-color: #cccccc;
    background-color: color-mix(in srgb, var(--tile-color) 20%, white);
    border-radius: 0.8rem;
    padding: 1.5rem;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease-out, color 0.2s ease-out;
    position: relative;
}

.lde-tiles-card:hover {
    background-color: var(--tile-color);
    color: #fff;
}

.lde-tiles-card:hover .lde-tiles-card-title, .lde-tiles-card:hover .lde-tiles-card-description  {
    color: #fff;
}

.lde-tiles-card.lde-tiles-hidden-by-pagination {
    display: none;
}

.lde-tiles-card.lde-tiles-hidden-by-search {
    display: none;
}

@media screen and (max-width: 550px) {
    .lde-tiles-card {
        padding: 1.2rem;
    }
}
/**** /TILE CARD ****/


/**** TILE CARD HEADER ****/
.lde-tiles-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    gap: 0.5rem;
}

.lde-tiles-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
    user-select: none;
}
/**** /TILE CARD HEADER ****/


/**** TILE HEART ICON ****/
.lde-tiles-heart {
    flex-shrink: 0;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.lde-tiles-card .lde-wishlist-heart-wrap {
    margin-right: 0;
    background-color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.lde-tiles-card .lde-wishlist-heart-wrap .heart-image, .lde-tiles-card .lde-wishlist-heart-wrap .heart-filled {
    display: block;
    width: 22px;
    height: 19px;
    position: absolute;
    left: 6px;
    top: 8px;
}

.lde-tiles-card .lde-wishlist-heart-wrap .heart-image {

    object-fit: contain;
}

.lde-tiles-card .lde-wishlist-heart-wrap .heart-filled {
    color: transparent;
    transition: color 0.2s ease-out;
}

.lde-tiles-card .lde-add-to-wishlist-button.clicked .heart-filled {
    color: var(--lde-primary-color);
}

.lde-tiles-card .lde-add-to-wishlist-button.clicked .heart-image {
    visibility: hidden;
}
/**** /TILE HEART ICON ****/


/**** TILE DESCRIPTION ****/
.lde-tiles-card-description {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.4;
}
/**** /TILE DESCRIPTION ****/


/**** LOAD MORE BUTTON ****/
.lde-tiles-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

button.lde-tiles-load-more-button {
    background-color: #fff;
    color: var(--lde-primary-color);
    border: 1px solid #999;
    border-radius: 0.8rem;
    padding: 0.6rem 2rem;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}

button.lde-tiles-load-more-button:hover {
    background-color: #f2f2f2;
    border-color: #666;
}

.lde-tiles-load-more-wrap.lde-tiles-all-visible {
    display: none;
}
/**** /LOAD MORE BUTTON ****/


/**** WISHLIST CTA BAR ****/
.lde-tiles-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
}

.lde-tiles-cta-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.lde-tiles-cta-bar-text {
    font-size: 1rem;
}

.lde-tiles-cta-bar-count {
    color: var(--lde-primary-color);
    font-weight: 700;
}

a.lde-tiles-cta-bar-button {
    background-color: var(--lde-primary-color);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease-out;
}

a.lde-tiles-cta-bar-button:hover {
    background-color: var(--lde-accent-color);
    color: #fff;
}

@media screen and (max-width: 550px) {
    .lde-tiles-cta-bar {
        padding: 0.8rem 1rem;
    }

    .lde-tiles-cta-bar-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/**** /WISHLIST CTA BAR ****/


/**** NO RESULTS ****/

.lde-tiles-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

/**** /NO RESULTS ****/