/* PU184 Google Places Photos – 0.5.3
   Das aktive ASL-Theme baut jeden .sl-item bereits als zweispaltiges Grid:
   links Text, rechts Bild. Das Plugin fügt den Google-Foto-Block deshalb als
   direktes Kind des Store-<li> ein und belegt gezielt die rechte Grid-Spalte. */

.pu-google-photo-col {
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* Nach erfolgreichem Fotoladen wird der Store-Titel vom JS als direktes
   Kind des <li> verschoben. So kann er über beide Spalten laufen, ohne
   den ASL-Textwrapper aufzulösen. */
.sl-item.pu-has-google-photo {
    grid-template-areas:
        "title title"
        "text image" !important;
    column-gap: 24px !important;
    row-gap: 0 !important;
}

.sl-item.pu-has-google-photo > .pu-google-photo-title {
    grid-area: title !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 0 14px 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

/* Während des Ladens und nach erfolgreichem Laden: vorhandene ASL-Gridspalten nutzen. */
.sl-item.pu-google-photo-loading > .sl-addr-sec,
.sl-item.pu-has-google-photo > .sl-addr-sec {
    grid-area: text !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
}

.sl-item.pu-google-photo-loading > .pu-google-photo-col,
.sl-item.pu-has-google-photo > .pu-google-photo-col {
    grid-area: image !important;
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    align-self: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

.pu-google-photo-wrap,
.pu-google-photo {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 205px !important;
    box-sizing: border-box !important;
}

.pu-google-photo {
    overflow: hidden;
}

.pu-google-photo-img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 205px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.pu-google-photo-attribution {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 4px 6px;
    font-size: 8px;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-sizing: border-box;
}

.pu-google-photo-attribution a {
    color: inherit;
    text-decoration: underline;
}

/* Mobile: der Store-Grid wird für Foto-Stores untereinander gestapelt. */
@media (max-width: 767px) {
    .sl-item.pu-google-photo-loading {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "text"
            "image" !important;
        gap: 12px !important;
    }

    .sl-item.pu-has-google-photo {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "title"
            "text"
            "image" !important;
        gap: 12px !important;
    }

    .sl-item.pu-google-photo-loading > .pu-google-photo-col,
    .sl-item.pu-has-google-photo > .pu-google-photo-col {
        width: 100% !important;
        height: auto !important;
    }

    .pu-google-photo-wrap,
    .pu-google-photo {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 9 !important;
    }

    .pu-google-photo-img {
        position: absolute;
        inset: 0;
        height: 100% !important;
        min-height: 0 !important;
    }
}
