img.content-image-admin-list {
    max-width: 50px;
}

textarea.pf {
    width: 95%;
    height: 70px;
    min-width: 200px;
}

input.wide {
    width: 95%;
}

select.wide {
    width: 97% !important;
}

img.content-image-max-500 {
    max-width: 500px;
}

.page-content-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Use pixel-based gap for precision */
    justify-content: flex-start;
    align-content: flex-start;
}

.tile {
    flex: 0 1 calc((100% - 40px) / 3); /* 2 gaps x 20px = 40px total */
    box-sizing: border-box;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}


/* Set a fixed height for image container */
.content-container .imgResize {
    height: 200px; /* or whatever max height you want */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.content-tile-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* keeps aspect ratio and fits inside the box */
}

/* Responsive layout */
@media (max-width: 900px) {
    .tile {
        flex: 0 1 48%;
    }
}

@media (max-width: 600px) {
    .tile {
        flex: 0 1 100%;
    }
}

div.tile p.boxTitle,
div.tile p.boxTitleNo {
    padding-left: 20px;
    padding-bottom: 10px;
    padding-right: 20px;
}

div.tile p.boxSub,
div.tile p.boxCont {
    padding-left: 20px;
    padding-bottom: 20px;
    padding-right: 20px;
}

div#content-image-select-box {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ffffff;
}

div#content-parent-select-box {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ffffff;
}

.content-image-select-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.content-image-select-tile {
    flex: 1 1 calc((100% - 20px) / 3);
    min-width: 150px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

    .content-image-select-tile > div {
        height: 200px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .content-image-select-tile img {
        height: 100%;
        width: auto;
        object-fit: cover;
        display: block;
    }

    /* Hover effect */
    .content-image-select-tile:hover {
        background-color: #f0f0f0;
        border-color: #999;
    }

    /* Selected tile */
    .content-image-select-tile.selected {
        background-color: #007bff;
        color: white;
        border-color: #0056b3;
    }

    .content-image-select-tile:hover {
        background-color: #f0f0f0;
        border-color: #999;
        cursor: pointer;
    }

    .content-image-select-tile.selected {
        background-color: #2266bb;
        border-color: #2266bb;
    }

        .content-image-select-tile.selected p.boxSub,
        .content-image-select-tile.selected p.boxCont {
            color: #ffffff;
        }

#content-page-parent-select-1,
#content-page-parent-select-2 {
    border-radius: 3px;
    background: #eeeeee;
    margin-bottom: 5px;
    padding: 3px;
}
