/* General Styles */
body {
    font-family: sans-serif;
}

/* Airbnb-style Grid Gallery */

/* Grid Container */
.cgp-airbnb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Maintain 4 columns on desktop */
    gap: 5px;
    position: relative;
    max-width: 100%;
    margin-bottom: 20px;
}

.cgp-grid-item {
    position: relative;
    overflow: hidden;
}

.cgp-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cgp-grid-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.cgp-show-all-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

.cgp-show-all-button:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Gallery View */
.cgp-gallery-view {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
}

.cgp-gallery-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin: 20px auto;
    max-width: 1200px;
    padding: 20px;
}

/* Filters Container */
.cgp-filters-container {
    flex: 1;
    position: relative;
    max-width: 200px;
}

.cgp-gallery-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 30px;
    cursor: pointer;
}

.cgp-search-bar {
    margin-bottom: 20px;
}

#cgp-search-input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
}

/* Category and Tag Selector Styles */
.cgp-filter-group {
    margin-bottom: 20px;
}

.cgp-filter-group h4 {
    margin-bottom: 10px;
}

.cgp-filter-group .ck-button {
    margin: 4px;
    background-color: #EFEFEF;
    border-radius: 4px;
    border: 1px solid #D0D0D0;
    overflow: auto;
    float: left;
}

.cgp-filter-group .ck-button label {
    float: left;
    width: auto;
    cursor: pointer;
}

.cgp-filter-group .ck-button label span {
    text-align: center;
    padding: 3px 10px;
    display: block;
    border-radius: 4px;
}

.cgp-filter-group .ck-button label input {
    position: absolute;
    opacity: 0; /* Hide the checkbox */
	display: none;
}

.cgp-filter-group .ck-button input:hover + span {
    background-color: #efE0E0;
}

.cgp-filter-group .ck-button input:checked + span {
    background-color: #911;
    color: #fff;
}

.cgp-filter-group .ck-button input:checked:hover + span {
    background-color: #c11;
    color: #fff;
}

/* Clear floats */
.cgp-filter-group::after {
    content: "";
    display: table;
    clear: both;
}

/* Thumbnail Images */
.cgp-thumbnail-images {
    flex: 1.5;
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: 80vh; /* Adjust the height based on viewport */
    margin: 0 20px;
}

.cgp-thumbnail-image {
    width: 100px;
    height: 100px;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.cgp-thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cgp-thumbnail-image:hover {
    border-color: #0073aa;
}

/* Large Image Container */
.cgp-large-image-container {
    flex: 2;
    text-align: center;
    max-height: 80vh;
    overflow: hidden;
}

#cgp-large-image {
    max-width: 100%;
    max-height: 100%;
    height: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cgp-gallery-container {
        flex-direction: column;
        align-items: center;
    }

    .cgp-filters-container,
    .cgp-thumbnail-images,
    .cgp-large-image-container {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .cgp-thumbnail-images {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
        margin-top: 20px;
    }

    .cgp-thumbnail-image {
        width: 80px;
        height: 80px;
    }

    .cgp-filters-container {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .cgp-airbnb-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .cgp-show-all-button {
        font-size: 14px;
        padding: 8px 12px;
    }
}
