/* ==========================================================
   VG Ambient Image Block
   Frontend styles
   ========================================================== */


/* ----------------------------------------------------------
   1. Desktop layout
   ---------------------------------------------------------- */

.vg-ambient-image {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    border-bottom: 1px solid #d7d7d7;
    padding-bottom: 24px;
}


/* Image */

.vg-ambient-image__image {
    min-width: 0;
}

.vg-ambient-image__img {
    display: block;
    width: 100%;
    height: auto;
}


/* Product information */

.vg-ambient-image__content {
    min-width: 0;
    text-align: left;
}

.vg-ambient-image__button {
    text-align: left;
}


/* Desktop product button */

.wp-block-vg-ambient-image .wp-block-button > a.wp-block-button__link {
    font-size: 20px !important;
    padding: 12px 20px;
    line-height: 1.4;
}


/* ----------------------------------------------------------
   2. Lightbox
   ---------------------------------------------------------- */

.vg-ambient-image__lightbox {
    display: block;
    cursor: zoom-in;
}

.vg-ambient-image__lightbox img {
    display: block;
    width: 100%;
    height: auto;
}


/* ----------------------------------------------------------
   3. Mobile-only elements
   ---------------------------------------------------------- */

.vg-ambient-image__mobile-details {
    display: none;
}


/* ----------------------------------------------------------
   4. Mobile layout
   ---------------------------------------------------------- */

@media (max-width: 767px) {

    /* Image above product information */

    .vg-ambient-image {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding-bottom: 16px;
    }


    /* Product information: details left, link right */

    .vg-ambient-image__content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 0;
        align-items: start;
        text-align: left;
    }


    /* Hide desktop title and description */

    .vg-ambient-image__title,
    .vg-ambient-image__description {
        display: none;
    }


    /* Mobile expandable product information */

    .vg-ambient-image__mobile-details {
        display: block;
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        margin: 0;
    }


    /* Arrow and title on the same row */

    .vg-ambient-image__mobile-summary {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 28px;
        cursor: pointer;
        list-style: none;
    }

    .vg-ambient-image__mobile-summary::-webkit-details-marker {
        display: none;
    }


    /* Arrow icon */

    .vg-ambient-image__mobile-summary svg {
        display: block;
        flex: 0 0 20px;
        transition: transform 0.2s ease;
    }

    .vg-ambient-image__mobile-details[open] svg {
        transform: rotate(180deg);
    }


    /* Mobile product title */

    .vg-ambient-image__mobile-title {
        display: block;
        min-width: 0;
		font-family: var(--wp--preset--font-family--quicksand);
		text-transform: uppercase !important;
        font-size: 18px;
        font-weight: 300;
        line-height: 1.25;
		/*color: red !important;*/
    }


    /* Expandable description */

    .vg-ambient-image__mobile-description {
        font-size: 16px;
        line-height: 1.5;
        margin: 12px 0 0 28px;
    }


    /* Product link */

    .vg-ambient-image__button {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        align-self: start;
    }

    .wp-block-vg-ambient-image .wp-block-button > a.wp-block-button__link {
        font-size: 14px !important;
        padding: 4px 0;
        line-height: 1.4;
        background: transparent;
        color: inherit;
        border: 0;
        border-radius: 0;
        text-decoration: underline;
        white-space: nowrap;
    }

}
