.gm-style-iw.gm-style-iw-c {
    padding: 0 !important;
    max-width: 300px !important;
    border-radius: 8px !important;
    background: white !important;
    overflow: visible !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
    padding: 0 !important;
}

/* Close button styling */
button.gm-ui-hover-effect {
    top: 0 !important;
    right: 0 !important;
    width: 26px !important;
    height: 26px !important;
    padding: 6px !important;
    background: #eb6b40 !important;
    border-radius: 0 8px 0 8px !important;
    z-index: 999 !important;
    transform: none !important;
    opacity: 1 !important;
    margin: 0 !important;
}

button.gm-ui-hover-effect img {
    width: 14px !important;
    height: 14px !important;
    filter: brightness(0) invert(1) !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Header section - Base styles */
.gm-style-iw-d > div:first-child {
    position: relative !important;
    width: 100% !important;
}

.gm-style-iw-d .header-section,
.gm-style-iw-d > div:first-child > div:first-child {
    position: relative !important;
    width: 100% !important;
    min-height: 140px !important;
    background: #1e2c33 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
}

/* Category label */
.gm-style-iw-d [class*="restaurant-type"],
.gm-style-iw-d .venue-category,
.gm-style-iw-d h3:first-child {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    padding: 4px 8px !important;
    background: #eb6b40 !important;
    color: white !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    border-radius: 3px !important;
    z-index: 998 !important;
    font-weight: 600 !important;
    margin: 0 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important;
}

/* Title styling */
.gm-style-iw-d h1,
.gm-style-iw-d h2,
.gm-style-iw-d h4,
.gm-style-iw-d .firstHeading {
    color: white !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 998 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
    font-weight: 600 !important;
    position: relative !important;
}

/* Image handling */
.gm-style-iw-d img.featured-img,
.gm-style-iw-d img[class*="featured"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 2 !important;
}

/* Overlay for image cases */
.gm-style-iw-d .header-section::before,
.gm-style-iw-d > div:first-child > div:first-child::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%) !important;
    z-index: 3 !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

/* Content area */
.gm-style-iw-d #bodyContent,
.gm-style-iw-d [id*="content"],
.gm-style-iw-d > div:first-child > div:last-child {
    padding: 15px !important;
    text-align: center !important;
    background: white !important;
    position: relative !important;
    z-index: 4 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* View Details button */
.gm-style-iw-d a.btn,
.gm-style-iw-d a.btn-outline-primary,
.gm-style-iw-d a.btn-block,
.gm-style-iw-d a[href*="greaterzion.com"],
.gm-style-iw-d .view-details-btn {
    display: block !important;
    width: 200px !important;
    padding: 10px 20px !important;
    margin: 10px auto !important;
    background: #eb6b40 !important;
    color: white !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    position: relative !important;
    z-index: 5 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Remove the tail */
.gm-style-iw-t::after {
    display: none !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .gm-style-iw.gm-style-iw-c {
        max-width: 280px !important;
    }
    
    .gm-style-iw-d .header-section,
    .gm-style-iw-d > div:first-child > div:first-child {
        min-height: 120px !important;
    }
    
    .gm-style-iw-d h1,
    .gm-style-iw-d h2,
    .gm-style-iw-d h4,
    .gm-style-iw-d .firstHeading {
        font-size: 20px !important;
    }
} 