/* ============================================================
   BALLOON GALLERY — FINAL CLEAN CSS (SQUARE BUTTONS VERSION)
   ============================================================ */

/* ------------------------------
   THUMBNAIL GRID
--------------------------------*/
.bg-balloon-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.bg-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;             
    object-fit: cover;
    border-radius: 0 !important;      
}


/* ------------------------------
   LIGHTBOX OVERLAY
--------------------------------*/
#bg-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
}

.bg-lightbox-backdrop {
    position: absolute;
    inset: 0;
}

/* LIGHTBOX PANEL */
.bg-lightbox-content {
    position: relative;
    background: #fff;
    max-width: 1100px;
    width: 90%;
    margin: 50px auto;
    border-radius: 12px;
    padding: 0;
    z-index: 1000000;
}

/* HEADER */
.bg-lightbox-header {
    background: #f3f3f3;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.bg-lightbox-heading {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* CLOSE BUTTONS */
.bg-lightbox-close,
.bg-quote-close-x {
    width: 32px;
    height: 32px;
    border: 1px solid #000 !important;
    border-radius: 6px !important;
    font-size: 20px;
    background: #fff !important;
    cursor: pointer;
    color: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ------------------------------
   LIGHTBOX ARROWS
--------------------------------*/
.bg-lightbox-prev,
.bg-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #000 !important;
    color: #fff !important;       
    width: 40px;
    height: 40px;
    border-radius: 6px !important; /* ← SQUARE ARROWS */
    text-align: center;
    font-size: 22px;
    line-height: 40px;
    cursor: pointer;
    border: none !important;
}

.bg-lightbox-prev { left: -20px; }
.bg-lightbox-next { right: -20px; }

.bg-lightbox-prev:hover,
.bg-lightbox-next:hover {
    background: #111 !important;
    color: #fff !important;
}


/* ------------------------------
   LIGHTBOX INNER
--------------------------------*/
.bg-lightbox-inner {
    display: flex;
    gap: 30px;
    padding: 30px;
}

/* CONSISTENT IMAGE SIZE */
.bg-lightbox-image-wrapper {
    width: 500px;
    max-width: 100%;
    height: 500px;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
}


/* TEXT AREA */
.bg-lightbox-text {
    flex: 1;
}

.bg-lightbox-title {
    margin: 0 0 10px 0;
    font-size: 24px;
}

/* STYLE LINK */
.bg-lightbox-style a {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 600;
}

/* DESCRIPTION */
.bg-lightbox-desc,
.bg-lightbox-notes {
    margin: 0 0 12px 0;
}


/* ------------------------------
   LIGHTBOX BUTTONS → SQUARE
--------------------------------*/
.bg-lightbox-case-pill,
.bg-open-quote-form {
    background: #000 !important;
    color: #fff !important;
    padding: 12px 22px;
    border-radius: 6px !important; /* ← MATCHING SQUARES */
    display: inline-block;
    margin-top: 10px;
    border: none !important;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
}

.bg-lightbox-case-pill:hover,
.bg-open-quote-form:hover {
    background: #111 !important;
    color: #fff !important;
    text-decoration: none !important;
}


/* ------------------------------
   QUOTE MODAL
--------------------------------*/
#bg-quote-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99999999;
}

#bg-quote-modal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* PANEL */
.bg-quote-inner {
    background: #fff;
    max-width: 850px;
    width: 90%;
    border-radius: 12px;
    display: flex;
    gap: 30px;
    padding: 30px;
    position: relative;
}

/* IMAGE (250px) */
.bg-quote-left img {
    max-width: 250px !important;
    border-radius: 10px;
}

/* RIGHT SIDE */
.bg-quote-right {
    flex: 1;
}

.bg-quote-phone {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

#bg-quote-form input,
#bg-quote-form textarea {
    width: 100%;
    border: 1px solid #ccc !important;
    padding: 10px;
    border-radius: 6px;
    margin-top: 4px;
    margin-bottom: 20px;
}

/* FIX PINK BORDERS */
.bg-quote-submit,
.bg-quote-cancel {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* BUTTON ROW */
.bg-quote-buttons {
    display: flex;
    gap: 15px;
}

/* QUOTE BUTTONS → SQUARE */
.bg-quote-submit {
    background: #000 !important;
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 6px !important; /* ← MATCHING */
    cursor: pointer;
}

.bg-quote-cancel {
    background: #eee !important;
    color: #000 !important;
    padding: 10px 22px;
    border-radius: 6px !important; /* ← MATCHING */
    cursor: pointer;
}

/* ------------------------------
   RESPONSIVE
--------------------------------*/
@media (max-width: 900px) {

    /* ===== Existing mobile layout intent ===== */
    .bg-quote-inner {
        flex-direction: column;
    }

    .bg-quote-left img {
        max-width: 100%;
    }

    /* Force balloon gallery shortcode to span full width */
    .bg-section {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .bg-balloon-gallery {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
        width: 100%;
    }

    .bg-item .bg-thumb {
        width: 100%;
        aspect-ratio: 4 / 3;
        overflow: hidden;
    }

    .bg-item .bg-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* ===== Mobile lightbox fixes (ONLY under 900px) ===== */

    /* Overlay must be scrollable on iOS */
    #bg-lightbox-overlay {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Panel should fill the screen on phones */
    .bg-lightbox-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        min-height: 100dvh !important;
    }

    .bg-lightbox-header {
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    /* Stack image above text */
    .bg-lightbox-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 16px !important;
    }

    /* Remove the rigid 500x500 desktop box */
    .bg-lightbox-image-wrapper {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
    }

    /* Let image scale naturally */
    .bg-lightbox-image {
        width: 100% !important;
        height: auto !important;
        max-height: 42dvh !important;
        object-fit: contain;
        display: block;
    }

    /* Ensure arrows are visible and tappable on small screens */
    .bg-lightbox-prev,
    .bg-lightbox-next {
        position: fixed !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: #000 !important;
        color: #fff !important;
        width: 48px !important;
        height: 48px !important;
        line-height: 48px !important;
        font-size: 26px !important;
        border-radius: 6px !important;
        z-index: 1000001 !important;
        border: none !important;
    }

    .bg-lightbox-prev { left: 10px !important; }
    .bg-lightbox-next { right: 10px !important; }

    .bg-lightbox-title {
        font-size: 20px;
    }
}

