/* === ALGA POPUP === */

.alga-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.alga-popup-overlay.is-active {
    opacity: 1;
    pointer-events: all;
}

.alga-popup {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.alga-popup-image {
    flex: 1;
}

.alga-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.alga-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px;
    overflow-y: auto;
    background-color: white;
}

.alga-popup-info h2 {
    font-family: "Roboto Serif";
    color: var(--brandDarkColor);
    margin-bottom: 20px;
}

.alga-popup-intro {
    margin-bottom: 30px;
    color: var(--defaultTextColor);
}

.alga-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    color: var(--brandDarkColor);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.alga-popup-close:hover {
    background: rgba(0, 0, 0, 0.16);
}

@media screen and (max-width: 768px) {
    .alga-popup {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }

    .alga-popup-image {
        max-height: 45vh;
    }

    .alga-popup-info {
        padding: 30px;
        overflow-y: visible;
    }
}

/* === EVENT PAYMENT POPUP (ok / ko) === */

.alga-event-popup {
    flex-direction: column;
    max-width: 720px;
    overflow-y: auto;
    border: 10px solid #ffffff;
    background: #F1EDE0 var(--backgroundImage01) center;
}

.alga-event-popup .alga-popup-close {
    background: rgba(255, 255, 255, 0.85);
}

.alga-event-popup-image {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 1440 / 612;
}

.alga-event-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Darken the lower part so the event type stays readable */
.alga-event-popup-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.alga-event-popup-type {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 1;
    text-align: center;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.alga-event-popup-content {
    padding: 35px 50px 45px;
    text-align: center;
    color: var(--brandDarkColor);
}

.alga-event-popup-content h2 {
    font-family: "Roboto Serif", serif;
    font-weight: 500;
    font-size: 2.6rem;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--brandDarkColor);
    /* Override the global h2 width: 80% so the title spans and centers in the popup */
    width: 100%;
    max-width: 100%;
    margin: 0 0 15px;
}

.alga-event-popup-content p {
    font-family: "Inter", sans-serif;
    font-size: 1.05rem;
    margin: 0 0 15px;
}

.alga-event-popup-content .alga-event-popup-event {
    font-family: "Roboto Serif", serif;
    font-size: 1.5rem;
    line-height: 1.3;
}

.alga-event-popup-btn {
    margin-top: 15px;
    padding: 14px 45px;
    border: none;
    border-radius: 30px;
    background: var(--brandDarkColor);
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
}

.alga-event-popup-btn:hover {
    opacity: 0.85;
}

/* Activity popup: the button is a link to the activity page */
a.alga-event-popup-btn {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}

a.alga-event-popup-btn:hover {
    color: #ffffff;
}

/* Error variant: red content block, white text */
.alga-event-popup--error {
    background: #b3261e;
}

.alga-event-popup--error .alga-event-popup-content,
.alga-event-popup--error .alga-event-popup-content h2 {
    color: #ffffff;
}

.alga-event-popup--error .alga-event-popup-btn {
    background: #ffffff;
    color: #b3261e;
}

@media screen and (max-width: 768px) {
    .alga-event-popup-content {
        padding: 25px 25px 35px;
    }

    .alga-event-popup-content h2 {
        font-size: 1.8rem;
    }

    .alga-event-popup-type {
        font-size: 1.4rem;
        bottom: 10px;
    }
}
