/* ============================================================
   CLASSIC – ZULETZT ANGESEHEN / BYB-ARTIGE SEITENLEISTE
   ============================================================ */
.gallery-recent-panel {
    position: fixed;
    top: 110px;
    left: 0;
    width: 360px;
    max-width: calc(100vw - 20px);
    z-index: 1100;
    pointer-events: none;
}
.gallery-recent-tab {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    /*
     * Beim Einfahren bleibt die rechte Seite des Reiters sichtbar.
     * Deshalb steht das Uhrsymbol visuell ganz rechts.
     */
    flex-direction: row-reverse;
    align-items: center;
    gap: 11px;
    width: max-content;
    min-height: 46px;
    padding: 10px 14px;
    border: 0;
    border-radius: 0 9px 9px 0;
    background: #628494;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 3px 12px #0002;
    cursor: pointer;
    pointer-events: auto;

    /* Im Ruhezustand bleibt nur das Uhrsymbol am linken Rand sichtbar. */
    transform: translateX(calc(-100% + 36px));
    transition: transform 260ms ease, background-color 260ms ease;
}

.gallery-recent-tab:hover,
.gallery-recent-tab:focus-visible {
    /* Bei Mausberührung oder Tastaturfokus fährt der Reiter aus. */
    transform: translateX(0);
    background: #4d7385;
}

.gallery-recent-tab:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -3px;
}

.gallery-recent-tab-icon {
    display: inline-flex;
    width: 18px;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    line-height: 1;
}

.gallery-recent-tab-label {
    display: inline-block;
}
.gallery-recent-drawer {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dce5e8;
    border-radius: 0 12px 12px 0;
    overflow: hidden;
    box-shadow: 0 10px 30px #183c4629;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    pointer-events: auto;
}
.gallery-recent-panel.is-open .gallery-recent-drawer {
    transform: translateX(0);
}
.gallery-recent-panel.is-open .gallery-recent-tab {
    display: none;
}
.gallery-recent-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(105deg, #103d4b, #1c7468);
    color: #ffffff;
}
.gallery-recent-heading button {
    background: #ffffff22;
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    width: 27px;
    height: 27px;
    cursor: pointer;
}
.gallery-recent-items {
    padding: 8px 12px;
    max-height: min(65vh, 620px);
    overflow-y: auto;
}
.gallery-recent-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5ebed;
}
.gallery-recent-entry > a {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: #244653;
    font-size: 13px;
    text-decoration: none;
}
.gallery-recent-entry img {
    /* Größere Miniaturbilder ausschließlich in der Seitenleiste. */
    width: 96px;
    height: 72px;
    flex: 0 0 96px;
    object-fit: cover;
    border-radius: 7px;
}
.gallery-recent-entry span {
    overflow-wrap: anywhere;
}
.gallery-recent-actions {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gallery-recent-actions button,
.gallery-recent-actions a {
    border: 0;
    background: transparent;
    color: #416577;
    padding: 3px;
    cursor: pointer;
    text-decoration: none;
}
.gallery-recent-actions .is-favorite {
    color: #b63358;
}
.gallery-recent-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 12px;
    color: #607780;
}
.gallery-recent-bottom button {
    padding: 6px 8px;
    border: 1px solid #dce4e8;
    border-radius: 5px;
    background: #fff;
    color: #a33c45;
    cursor: pointer;
}
.gallery-recent-empty {
    padding: 18px 5px;
    color: #607780;
}
.gallery-recent-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}
.gallery-recent-account-grid a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.gallery-recent-account-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 9px;
    margin-bottom: 6px;
}
@media (max-width: 650px) {
    .gallery-recent-panel {
        top: 85px;
        width: min(360px, calc(100vw - 20px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-recent-drawer,
    .gallery-recent-tab {
        transition: none;
    }
}

/* ==============================================================
   BENUTZERBEREICH – ZULETZT ANGESEHEN: FOTOKARTEN WIE IM ALBUM
   --------------------------------------------------------------
   Nur die persönliche Verlaufsseite wird angepasst.
   Die ausklappbare Seitenleiste und Favoriten bleiben unverändert.
   ============================================================== */

.gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 17px;
    align-items: stretch;
}

.gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) > a {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e8ec;
    border-radius: 11px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) > a img {
    display: block;
    width: 100%;
    height: 175px;
    aspect-ratio: auto;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) > a span {
    display: block;
    padding: 11px 13px;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
        gap: 12px;
    }

    .gallery-user-overview .gallery-recent-account-grid:not(.gallery-favorites-grid) > a img {
        height: 155px;
    }
}
