/* photoswipe_UI_with_caption.css                    */
/* Bijgewerkt: 31 mei 2026                            */
/* INTERACTIEVE UI, DESIGN TOKENS & CAPTIONS          */

.pswp {
    /* Interface variabelen */
    --pswp-bg: #000;
    --pswp-placeholder-bg: #222;
    --pswp-root-z-index: 999999; /* Direct verhoogd voor index-compatibiliteit */
    --pswp-preloader-color: rgba(79, 79, 79, 0.4);
    --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9);
    --pswp-icon-color: #fff;
    --pswp-icon-color-secondary: #4f4f4f;
    --pswp-icon-stroke-color: #4f4f4f;
    --pswp-icon-stroke-width: 2px;
    --pswp-error-text-color: var(--pswp-icon-color);
}

/* ── DRAG & FIGURE (Polaroid / Interactieve Layout) ─── */

.drag {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    pointer-events: auto;
    z-index: 10;
}

.drag figure {
    margin: 0;
    padding: 15px 15px 20px 15px; /* Typische Polaroid randen (onderkant iets breeder voor caption) */
    background: var(--fotogrijs, #fff);
    width: 300px;           /* Vaste basisbreedte voor een stabiele Polaroid-vorm */
    max-width: 60vw;        /* Voorkomt dat hij op hele kleine mobieltjes van het scherm loopt */
    border-radius: 4px;
    box-shadow: var(--shadow-photo);
    transition: box-shadow 0.2s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

figure img {
    width: 100%;             /* Afbeelding vult de breedte van het Polaroid-kader */
    height: 220px;           /* Vaste hoogte voor de foto binnen het kader */
    object-fit: cover;       /* Zorgt dat foto's niet vervormen/uitrekken */
    border-radius: 2px;
    display: block;
}

figure figcaption {
    margin-top: 5px;
    font-family: sans-serif;
    font-size: 1em;
    color: var(--zwart);
    text-align: center;
    pointer-events: none;
}

@media (hover: hover) {
    figure:hover {
        transform: translateY(-0.5vmin);
    }
}

/* ── PHOTOSWIPE LINK INTEGRATIE ────── */

.pswp-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.pswp-link img,
.pswp-link figcaption {
    pointer-events: none !important;
}

/* ── 🌟 TOEGEVOEGD: INTERFACE & BUTTON STYLING (Kruisje, Pijlen, Vergrootglas) ── */

.pswp__button {
    position: relative;
    display: block;
    width: 50px;
    height: 60px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    cursor: pointer;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 0.85;
    z-index: 1000002 !important; /* Altijd boven de foto's */
}

.pswp__button:hover, .pswp__button:active {
    opacity: 1;
    background: none;
    border: 0;
}

.pswp__icn {
    position: absolute;
    top: 14px;
    left: 9px;
    width: 32px;
    height: 32px;
    fill: var(--pswp-icon-color);
    color: var(--pswp-icon-color-secondary);
    pointer-events: none;
}

.pswp__icn-shadow {
    stroke: var(--pswp-icon-stroke-color);
    stroke-width: var(--pswp-icon-stroke-width);
    fill: none;
}

.pswp__top-bar {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    z-index: 1000001 !important;
    pointer-events: none !important;
}

.pswp__top-bar > * {
    pointer-events: auto;
}

.pswp__button--close { margin-right: 6px; }

/* Pijlen links en rechts */
.pswp__button--arrow {
    position: absolute;
    top: 50%;
    width: 75px;
    height: 100px;
    margin-top: -50px;
    z-index: 1000002 !important;
}

.pswp__button--arrow .pswp__icn {
    top: 50%;
    margin-top: -30px;
    width: 60px;
    height: 60px;
}

.pswp__button--arrow--prev { left: 0; right: auto; }
.pswp__button--arrow--next { right: 0; }
.pswp__button--arrow--next .pswp__icn {
    left: auto;
    right: 14px;
    transform: scale(-1, 1);
}

/* Zoom opties */
.pswp__button--zoom { display: none; }
.pswp--zoom-allowed .pswp__button--zoom { display: block; }
.pswp--zoomed-in .pswp__zoom-icn-bar-v { display: none; }

/* Tellers */
.pswp__counter {
    height: 30px;
    margin: 15px 0 0 20px;
    font-size: 14px;
    line-height: 30px;
    color: var(--pswp-icon-color);
    text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
    opacity: 0.85;
}

/* ── PHOTOSWIPE CAPTION FIXES ────── */

.pswp__caption {
    position: relative !important;
    z-index: 1000001 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 50px;
    height: auto;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.8) !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

.pswp__caption a.pswp-caption-link {
    color: #FFD700 !important; /* Goud */
    text-decoration: none;
    pointer-events: auto !important;
    position: relative;
    z-index: 9999;
    display: inline-block;
    padding: 10px;
    font-weight: normal !important;
    transition: color 0.2s;
}

.pswp__caption a.pswp-caption-link:hover {
    color: #FFFFFF !important;
}

/* Album-knop in PhotoSwipe */
.pswp__album-button {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 10;
    max-width: 90%;
    background-color: var(--zwart);
    color: var(--lichtgrijs);
    border: 2px solid var(--lichtgrijs);
    padding: 0.7em 1.2em;
    border-radius: 1em;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    margin-top: 10px;
    display: inline-block;
    pointer-events: auto !important;
    transform: translateX(-50%) scale(1);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.pswp__album-button:hover {
    background-color: var(--lichtgrijs) !important;
    border-color: var(--zwart) !important;
    color: var(--zwart) !important;
    transition: background-color 0.3s ease !important;
}

/* ── ALGEMENE KNOPPEN (INTERFACE) ──────── */

.top-buttons {
    position: fixed;
    bottom: 2vmin;
    right: 2vmin;
    z-index: 100;
    display: flex;
    gap: 1vmin;
}

.top-buttons button {
    background: var(--zwart);
    color: var(--lichtgrijs);
    border: 2px solid white;
    padding: 0.7em 1.2em;
    border-radius: 1em;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 0 1vmin rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.top-buttons button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ccc;
    color: #ccc;
    transform: scale(1.05);
}

.button {
    background-color: var(--zwart);
    border: 2px solid var(--lichtgrijs);
    color: var(--lichtgrijs);
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}



/* ── MOBILE MEDIA QUERY (max-width: 768px) ─────── */

@media (max-width: 768px) {
    .top-buttons {
        flex-direction: column;
        right: 1vmin;
        bottom: 1vmin;
    }

    .top-buttons button {
        font-size: 1em;
        padding: 0.6em 1em;
    }

    .photos {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .photos figure.spin {
        width: 22vh;
        margin: 0;
    }

    .photos figure.spin img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 6px;
    }

    .photos .drag {
        flex: 0 1 220px;
    }

    figure figcaption {
        font-size: 0.8em;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: break-word;
        text-align: center;
    }

    .button {
        font-size: 0.8rem;
        font-weight: bold;
        color: var(--lichtgrijs);
        margin: 1em 0;
        border: 2px solid #fff;
        border-radius: 6px;
        padding: 4px 8px;
        display: inline-block;
    }
}
/* ── 🛑 VERBERG DE VERNIEUW-KNOP ── */
/* Mocht PhotoSwipe of een andere plugin een refresh-knop genereren, hiermee verdwijnt hij direct */
.pswp__button--refresh,
.pswp__button[class*="refresh"] {
    display: none !important;
}

/* ── 🌟 INTERFACE KNOPPEN VERGROTEN ── */
/* We vergroten de basis-containers van de knoppen bovenin */
.pswp__button {
    width: 65px !important;  /* Was 50px */
    height: 70px !important; /* Was 60px */
}

/* We schalen de iconen (SVG's) binnen de knoppen mooi mee op */
.pswp__icn {
    top: 19px !important;    /* Centreren in de nieuwe hoogte */
    left: 16px !important;   /* Centreren in de nieuwe breedte */
    width: 38px !important;  /* Was 32px */
    height: 38px !important; /* Was 32px */
}

/* ── 🏹 PIJLEN (NEXT / PREV) VERGROTEN ── */
.pswp__button--arrow {
    width: 90px !important;   /* Was 75px */
    height: 120px !important; /* Was 100px */
    margin-top: -60px !important; /* Perfect hercentreren op de y-as */
}

/* De iconen binnen de pijlen groter maken */
.pswp__button--arrow .pswp__icn {
    width: 75px !important;  /* Was 60px */
    height: 75px !important; /* Was 60px */
    margin-top: -37px !important;
}

/* Zorg dat de rechterpijl goed uitgelijnd blijft aan de rand */
.pswp__button--arrow--next .pswp__icn {
    right: 20px !important;  /* Was 14px */
}
