#detailview-gallery {
    position: relative; /* Add this line */
    height: 300px;
}

#detailview-gallery .stacked {
    height: 300px;
    overflow: hidden;
}

#detailview-gallery .stacked img {
    height: 50%;
}

#detailsModal .title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; /* This will ensure the title stays on top of the images */
}

/* Legacy star rating - keeping for backwards compatibility */
.star-rating {
    position: relative;
    display: inline-flex;
    font-size: 24px; /* Adjust this as needed for your design */
    color: #d4d4d4; /* Gray color for the base stars */
    width: 150px;
}

.star-rating i:not(:last-child) {
    margin-right: 3px; /* You can adjust the space between stars if needed */
}

.star-rating-overlay {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #ffc107; /* Gold color for the overlay stars */
    display: inline-flex;
}

.star-rating-overlay i {
    margin-right: 3px; /* This should be the same as the base star margin for proper alignment */
}

/* New improved star rating system */
.star-rating-new {
    display: inline-flex;
    align-items: center;
    font-size: 16px; /* Smaller stars */
    gap: 2px; /* Clean spacing between stars */
}

.star-rating-new .star-full {
    color: #ffc107; /* Gold for full stars */
}

.star-rating-new .star-empty {
    color: #d4d4d4; /* Light gray for empty stars */
}

/* Half star with gradient effect */
.star-rating-new .star-half {
    background: linear-gradient(to right, #ffc107 50%, #d4d4d4 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#attributes i {
    width: 30px;
}
#detailsModal {
    display: flex;
    row-gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

#detailsModal .title {
    min-width: 300px;
}

#detailsModal .mapAndContent {
    display: flex;
    column-gap: 16px;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

#detailview-gallery {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    column-gap: 4px;
}

#detailview-gallery > .large-image {
    flex-basis: 100%;
}

#detailview-gallery .stacked-images,
#detailview-gallery .medium-image {
    display: none;
}

#detailview-gallery img:first-of-type {
    height: 100%;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

#map {
    width: 100%;
    max-width: 600px;
    height: 200px;
    margin: auto;
}

#attributes > li {
    width: 100%;
}

#detailsModal .topCloseButton {
    cursor: pointer;
    position: absolute;
    right: 25px;
    top: 19px;
    color: white;
    z-index: 1070;
    font-size: 1.5em;
    background: none;
    border: none;
    padding: 8px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#detailsContent {
    width: 100%;
    max-width: 600px;
}

@media screen and (min-width: 768px) {
    #detailview-gallery > .large-image {
        flex-basis: 60%;
    }

    #detailview-gallery > .medium-image {
        display: block;
        flex-basis: 30%;
    }

    #detailview-gallery img {
        height: 100%;
        width: 100%;
        object-fit: cover;
        filter: brightness(0.9);
    }

    #detailview-gallery > .stacked-images {
        /* row-gap: 4px; */
        display: flex;
        flex-direction: column;
        flex-basis: 20%;
        height: 50%;
    }

    #detailsModal .mapAndContent {
        display: flex;
        column-gap: 16px;
        align-items: center;
        flex-direction: row-reverse;
    }

    #attributes {
        column-count: 2;
    }
}

#ratings {
    width: 100%;
    max-width: 600px;
}
#directionsUrl,
#ratings > div {
    font-weight: 600;
}
.modal-body.loading {
    filter: blur(1px);
    opacity: 0.8;
}
.dummy-image {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.dummy-image,
.dummy-content p {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

[type="button"] {
    border-radius: 0 !important;
}

#cafeModal.loading {
    animation: blur 3s infinite;
}

@keyframes blur {
    0% {
        filter: blur(0px);
    }
    100% {
        filter: blur(8px);
    }
}
