/**
 * PS Popup Styles
 */

/* ========================================
   OVERLAY - wspólne dla wszystkich stylów
   ======================================== */
.pspopup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none !important;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.pspopup-overlay.pspopup-active {
    display: flex !important;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* Styl 1 - overlay przezroczysty, popup na dole */
.pspopup-overlay:has(.pspopup-style1) {
    background: transparent;
    pointer-events: none;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
}

/* Styl 2, 3, 4 - overlay ciemny, popup na środku */
.pspopup-overlay:has(.pspopup-style2),
.pspopup-overlay:has(.pspopup-style3),
.pspopup-overlay:has(.pspopup-style4) {
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ========================================
   CONTAINER - wspólne style
   ======================== edycji ================ */
.pspopup-container {
    position: relative;
    pointer-events: auto;
    animation: pspopup-fade-in 0.3s ease-out;
}

@keyframes pspopup-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   STYL 1 - Ciemny pasek na dole (CTA bar)
   ======================================== */
.pspopup-style1 {
    background-color: var(--popup-bg, #000);
    color: var(--popup-text, #fff);
    border-radius: 12px;
    padding: 24px 32px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pspopup-style1 .pspopup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--popup-text, #fff);
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pspopup-style1 .pspopup-close:hover {
    opacity: 1;
}

.pspopup-style1 .pspopup-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pspopup-style1 .pspopup-avatar {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.pspopup-style1 .pspopup-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--popup-btn-bg, #E4FD71);
}

.pspopup-style1 .pspopup-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--popup-btn-bg, #E4FD71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--popup-bg, #000);
}

.pspopup-style1 .pspopup-text {
    flex: 1;
}

.pspopup-style1 .pspopup-title {
    color: var(--popup-btn-bg, #E4FD71);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    margin: 0 0 8px 0;
}

.pspopup-style1 .pspopup-description {
    color: var(--popup-text, #fff);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    opacity: 0.8;
}

.pspopup-style1 .pspopup-description p {
    margin: 0;
}

.pspopup-style1 .pspopup-description strong {
    color: var(--popup-text, #fff);
    font-weight: 600;
}

.pspopup-style1 .pspopup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.pspopup-style1 .pspopup-btn-primary {
    background: var(--popup-btn-bg, #E4FD71);
    color: var(--popup-btn-text, #000);
    border: 1px solid var(--popup-btn-bg, #E4FD71);
    border-radius: 4px;
    padding: 12px 24px;
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 32px rgba(228, 253, 113, 0.3);
}

.pspopup-style1 .pspopup-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pspopup-style1 .pspopup-btn-secondary {
    background: transparent;
    color: var(--popup-text, #fff);
    border: none;
    padding: 8px 16px;
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pspopup-style1 .pspopup-btn-secondary:hover {
    opacity: 1;
}

/* ========================================
   STYL 2 - Modal jasny z obrazkiem
   ======================================== */
.pspopup-style2 {
    background-color: var(--popup-bg, #ffffff);
    color: var(--popup-text, #000000);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.pspopup-style2 .pspopup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s;
}

.pspopup-style2 .pspopup-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.pspopup-style2 .pspopup-inner {
    display: flex;
    flex-direction: column;
}

.pspopup-style2 .pspopup-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.pspopup-style2 .pspopup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pspopup-style2 .pspopup-content {
    padding: 32px;
    text-align: center;
}

.pspopup-style2 .pspopup-subtitle {
    display: inline-block;
    background: var(--popup-btn-bg, #E4FD71);
    color: var(--popup-btn-text, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.pspopup-style2 .pspopup-title {
    color: var(--popup-text, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 36px;
    margin: 0 0 16px 0;
}

.pspopup-style2 .pspopup-description {
    color: var(--popup-text, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    opacity: 0.7;
    margin-bottom: 24px;
}

.pspopup-style2 .pspopup-description p {
    margin: 0;
}

.pspopup-style2 .pspopup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pspopup-style2 .pspopup-btn-primary {
    background: var(--popup-btn-bg, #E4FD71);
    color: var(--popup-btn-text, #000);
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pspopup-style2 .pspopup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pspopup-style2 .pspopup-btn-secondary {
    background: transparent;
    color: var(--popup-text, #000);
    border: none;
    padding: 12px 16px;
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pspopup-style2 .pspopup-btn-secondary:hover {
    opacity: 1;
}

/* ========================================
   STYL 3 - Modal z obrazkiem po prawej
   ======================================== */
.pspopup-style3 {
    border-radius: var(--radius-small, 8px);
    background: var(--background-color-base, #FFF);
    color: var(--popup-text, #000000);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row;
}

.pspopup-style3 .pspopup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border-radius: var(--radius-x-small, 4px);
    background: var(--color-neutral-12-base, #FAFAFA);
    display: flex;
    width: 32px;
    height: 32px;
    padding: 4px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    aspect-ratio: 1/1;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.pspopup-style3 .pspopup-close:hover {
    opacity: 0.8;
}

.pspopup-style3 .pspopup-inner {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 400px;
    align-items: stretch;
}

.pspopup-style3 .pspopup-content-left {
    flex: 1 1 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pspopup-style3 .pspopup-title {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 32px; /* 133.333% */
    margin: 0;
    letter-spacing: 0;
}

.pspopup-style3 .pspopup-description {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 165%; /* 29.7px */
    letter-spacing: -0.09px;
    margin: 0;
    margin-top: auto;
}

.pspopup-style3 .pspopup-description p,
.pspopup-style3 .pspopup-description ul {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 165%; /* 29.7px */
    letter-spacing: -0.09px;
    margin: 0;
}

.pspopup-style3 .pspopup-description p {
    margin: 0 0 16px 0;
}

.pspopup-style3 .pspopup-description p:last-child {
    margin-bottom: 0;
}

.pspopup-style3 .pspopup-description ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.pspopup-style3 .pspopup-description ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.pspopup-style3 .pspopup-description ul li {
    padding-left: 24px;
    position: relative;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pspopup-style3 .pspopup-description ul li:before {
    content: '';
    position: absolute;
    left: 0;
    border-radius: 2px;
    background: var(--color-brand-two-6-base, #D3C4B4);
    width: 9px;
    height: 9px;
    top: 50%;
    transform: translateY(-50%);
}

.pspopup-style3 .pspopup-description strong {
    font-weight: 600;
    color: var(--popup-text, #000);
}

.pspopup-style3 .pspopup-btn-primary {
    background: var(--popup-btn-bg, #E4FD71);
    color: var(--popup-btn-text, #000);
    border: 1px solid var(--popup-btn-bg, #E4FD71);
    border-radius: 4px;
    padding: 12px 24px;
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    align-self: flex-start;
    margin-top: auto;
}

.pspopup-style3 .pspopup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pspopup-style3 .pspopup-image-right {
    flex: 1 1 0;
    min-width: 0;
    background: #f5f5f5;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

.pspopup-style3 .pspopup-image-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ========================================
   STYL 4 - Modal z nagłówkiem i obrazkiem po prawej
   ======================================== */
.pspopup-style4 {
    border-radius: var(--radius-small, 8px);
    background: var(--background-color-base, #FFF);
    color: var(--popup-text, #000000);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pspopup-style4 .pspopup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary, #E5E5E5);
    gap: 8px;
}

.pspopup-style4 .pspopup-header-title {
    flex: 1 0 0;
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; /* 150% */
    margin: 0;
}

.pspopup-style4 .pspopup-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: #fff;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pspopup-style4 .pspopup-close:hover {
    opacity: 0.7;
}

.pspopup-style4 .pspopup-inner {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 400px;
    align-items: stretch;
    padding: 32px;
    gap: 48px;
}

.pspopup-style4 .pspopup-content-left {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.pspopup-style4 .pspopup-subtitle {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 32px; /* 133.333% */
    margin: 0;
    letter-spacing: 0;
}

.pspopup-style4 .pspopup-description {
    margin: 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pspopup-style4 .pspopup-description p,
.pspopup-style4 .pspopup-description ul {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 165%; /* 29.7px */
    letter-spacing: -0.09px;
    margin: 0;
}

.pspopup-style4 .pspopup-description p {
    margin: 0 0 16px 0;
}

.pspopup-style4 .pspopup-description p:last-child {
    margin-bottom: 0;
}

.pspopup-style4 .pspopup-description ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.pspopup-style4 .pspopup-description ul li {
    padding-left: 24px;
    position: relative;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pspopup-style4 .pspopup-description ul li:before {
    content: '';
    position: absolute;
    left: 0;
    border-radius: 2px;
    background: var(--color-brand-two-6-base, #D3C4B4);
    width: 9px;
    height: 9px;
    top: 50%;
    transform: translateY(-50%);
}

.pspopup-style4 .pspopup-description strong {
    font-weight: 600;
    color: var(--popup-text, #000);
}

.pspopup-style4 .pspopup-description p strong {
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 165%;
    letter-spacing: -0.09px;
}

.pspopup-style4 .pspopup-btn-primary {
    border-radius: var(--radius-x-small, 4px);
    border: 1px solid var(--color-brand-one-10, #F2FEBD);
    background: var(--color-brand-one-8-base, #E4FD71);
    box-shadow: 0 0 44px 0 rgba(228, 253, 113, 0.30);
    display: flex;
    padding: 16px 24px;
    justify-content: center;
    align-items: center;
    gap: 24px;
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; /* 150% */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
    margin-top: auto;
}

.pspopup-style4 .pspopup-btn-primary:hover {
    border-radius: var(--radius-x-small, 4px);
    border: 1px solid var(--color-brand-one-7, #C7E068);
    background: var(--color-brand-one-9, #EBFE97);
    color: var(--text-color-base-primary, #000);
    font-family: var(--font-family-family-primary, Sora), sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; /* 150% */
}

.pspopup-style4 .pspopup-image-right {
    flex: 1 1 0;
    min-width: 0;
    background: #f5f5f5;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.pspopup-style4 .pspopup-image-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ========================================
   RESPONSYWNOŚĆ
   ======================================== */
@media (max-width: 767px) {
    .pspopup-overlay {
        padding: 16px;
    }

    /* Styl 1 - mobile */
    .pspopup-style1 {
        padding: 20px;
        border-radius: 8px;
    }

    .pspopup-style1 .pspopup-content {
        flex-wrap: wrap;
    }

    .pspopup-style1 .pspopup-avatar {
        width: 60px;
        height: 60px;
    }

    .pspopup-style1 .pspopup-avatar img {
        width: 60px;
        height: 60px;
    }

    .pspopup-style1 .pspopup-text {
        flex: 1 0 calc(100% - 84px);
    }

    .pspopup-style1 .pspopup-title {
        font-size: 16px;
        line-height: 22px;
    }

    .pspopup-style1 .pspopup-description {
        font-size: 13px;
        line-height: 18px;
    }

    .pspopup-style1 .pspopup-actions {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        margin-top: 16px;
    }

    .pspopup-style1 .pspopup-btn-primary {
        flex: 1;
        padding: 12px 16px;
    }

    /* Styl 2 - mobile */
    .pspopup-style2 {
        max-width: 100%;
        border-radius: 12px;
    }

    .pspopup-style2 .pspopup-image {
        height: 180px;
    }

    .pspopup-style2 .pspopup-content {
        padding: 24px 20px;
    }

    .pspopup-style2 .pspopup-title {
        font-size: 22px;
        line-height: 28px;
    }

    .pspopup-style2 .pspopup-description {
        font-size: 14px;
        line-height: 20px;
    }

    .pspopup-style2 .pspopup-btn-primary {
        padding: 14px 24px;
        font-size: 14px;
    }

    /* Styl 3 - mobile */
    .pspopup-style3 {
        max-width: 100%;
    }

    .pspopup-style3 .pspopup-inner {
        flex-direction: column;
        min-height: auto;
        gap: 0;
    }

    .pspopup-style3 .pspopup-content-left {
        padding: 24px 20px;
    }

    .pspopup-style3 .pspopup-title {
        font-size: 20px;
        line-height: 28px;
    }

    .pspopup-style3 .pspopup-description {
        font-size: 16px;
        line-height: 1.5;
    }

    .pspopup-style3 .pspopup-image-right {
        flex: 0 0 250px;
        width: 100%;
        height: 250px;
    }

    .pspopup-style3 .pspopup-btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Styl 4 - mobile */
    .pspopup-style4 {
        max-width: 100%;
    }

    .pspopup-style4 .pspopup-inner {
        flex-direction: column;
        min-height: auto;
        gap: 24px;
        padding: 24px 20px;
    }

    .pspopup-style4 .pspopup-content-left {
        padding: 0;
    }

    .pspopup-style4 .pspopup-subtitle {
        font-size: 20px;
        line-height: 28px;
    }

    .pspopup-style4 .pspopup-description {
        font-size: 16px;
        line-height: 1.5;
    }

    .pspopup-style4 .pspopup-image-right {
        flex: 0 0 250px;
        width: 100%;
        height: 250px;
    }

    .pspopup-style4 .pspopup-btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ========================================
   ANIMACJE WYJŚCIA
   ======================================== */
.pspopup-overlay.pspopup-closing .pspopup-container {
    animation: pspopup-fade-out 0.2s ease-in forwards;
}

@keyframes pspopup-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ========================================
   UKRYCIE SCROLL PRZY STYLE2, 3, 4
   ======================================== */
body.pspopup-modal-open {
    overflow: hidden;
}

/* Hide Bootstrap modal backdrop that may interfere with popup */
.modal-backdrop.fade,
.modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}





