/*
 * R4W Individuelles Popup
 * Copyright (c) 2026 Hubert Stegherr / Ready4Web
 */

.r4w-ip-overlay[hidden] {
    display: none !important;
}

.r4w-ip-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.r4w-ip-overlay.r4w-ip-is-visible {
    opacity: 1;
    visibility: visible;
}

.r4w-ip-popup {
    position: relative;
    width: calc(100% - 32px);
    box-sizing: border-box;
    max-height: calc(100vh - 36px);
    overflow: auto;
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.r4w-ip-overlay.r4w-ip-is-visible .r4w-ip-popup {
    transform: translateY(0) scale(1);
}

.r4w-ip-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.r4w-ip-meta {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    text-align: right;
    margin: 0 0 14px 48px;
    line-height: 1.25;
}

.r4w-ip-header-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 0 0 22px 0;
}

.r4w-ip-title {
    margin: 0 0 8px 0;
    line-height: 1.15;
    font-weight: 800;
}

.r4w-ip-subtitle {
    margin: 0 0 16px 0;
    line-height: 1.35;
    font-weight: 700;
}

.r4w-ip-text p {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.r4w-ip-text p:last-child {
    margin-bottom: 0;
}

.r4w-ip-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.r4w-ip-profile-image {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

.r4w-ip-profile-caption {
    font-size: 0.92em;
    line-height: 1.35;
    opacity: 0.82;
}

@media (max-width: 600px) {
    .r4w-ip-popup {
        width: calc(100% - 22px);
        max-height: calc(100vh - 22px);
    }

    .r4w-ip-meta {
        justify-content: flex-end;
        gap: 4px;
        flex-direction: column;
    }
}
