/*
 * 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: auto;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 0 auto 22px auto;
}

.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;
    }
}

.r4w-ip-profile-info {
    min-width: 0;
}

.r4w-ip-profile-name {
    display: block;
    font-weight: 800;
    line-height: 1.25;
}

.r4w-ip-profile-title {
    display: block;
    margin-top: 2px;
    font-size: 0.92em;
    line-height: 1.35;
    opacity: 0.78;
}

.r4w-ip-profile-name p,
.r4w-ip-profile-title p {
    margin: 0;
}

.r4w-ip-ticker {
    position: relative;
    overflow: hidden;
    margin: -4px 0 20px;
    border-radius: 12px;
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.r4w-ip-ticker-track {
    display: inline-flex;
    width: max-content;
    min-width: 200%;
    animation-name: r4w-ip-ticker-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.r4w-ip-ticker-track span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50%;
    padding: 10px 28px;
    font-weight: 800;
    letter-spacing: .02em;
}

@keyframes r4w-ip-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.r4w-ip-cta-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.r4w-ip-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 22px;
    border: 0;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.r4w-ip-cta-button:hover,
.r4w-ip-cta-button:focus {
    transform: translateY(-1px);
    text-decoration: none;
}

@media (max-width: 600px) {
    .r4w-ip-ticker {
        margin-bottom: 16px;
    }

    .r4w-ip-ticker-track span {
        padding: 9px 22px;
    }

    .r4w-ip-cta-wrap {
        justify-content: stretch;
    }

    .r4w-ip-cta-button {
        width: 100%;
    }
}
