/* =========================================================================
   Pincolor Popup – pcp- prefix
   ========================================================================= */

/* Overlay */
.pcp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.pcp-overlay.pcp-active {
    display: flex;
}

/* Modal – default (vertical stack: image top) */
.pcp-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pcpSlideIn 0.3s ease-out;
}

@keyframes pcpSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button */
.pcp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pcp-close:hover {
    background: #f0f0f0;
    color: #000;
}

/* =========================================================================
   Image
   ========================================================================= */

.pcp-image-wrap {
    line-height: 0;
}

.pcp-image-link {
    display: block;
    line-height: 0;
    height: 100%;
}

.pcp-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Image at top with content below: round top corners */
.pcp-image-wrap:first-of-type .pcp-image {
    border-radius: 12px 12px 0 0;
}

/* Image-only popup (no .pcp-body sibling): round all corners */
.pcp-modal > .pcp-close + .pcp-image-wrap:last-child .pcp-image {
    border-radius: 12px;
}

/* =========================================================================
   Body (text + CTA wrapper)
   ========================================================================= */

.pcp-body {
    display: flex;
    flex-direction: column;
}

/* =========================================================================
   HTML content
   ========================================================================= */

.pcp-html {
    padding: 24px 28px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.pcp-html h1,
.pcp-html h2,
.pcp-html h3,
.pcp-html h4 {
    margin-top: 0;
    color: #111;
}

.pcp-html p:last-child {
    margin-bottom: 0;
}

.pcp-html img {
    max-width: 100%;
    height: auto;
}

/* =========================================================================
   CTA button
   ========================================================================= */

.pcp-cta-wrap {
    padding: 16px 28px 28px;
    text-align: center;
}

.pcp-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: #6ac9bb;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    letter-spacing: 0.02em;
}

.pcp-cta-btn:hover {
    background-color: #45bdab;
    color: #fff;
    text-decoration: none;
}

.pcp-cta-btn:active {
    background-color: #26a18f;
}


/* =========================================================================
   Layout: image bottom
   ========================================================================= */

.pcp-layout-bottom {
    display: flex;
    flex-direction: column;
}

.pcp-layout-bottom .pcp-image-wrap {
    order: 2;
}

.pcp-layout-bottom .pcp-image-wrap .pcp-image {
    border-radius: 0 0 12px 12px;
}

.pcp-layout-bottom .pcp-body {
    order: 1;
}

.pcp-layout-bottom .pcp-body .pcp-html {
    padding-top: 32px;
}

/* =========================================================================
   Layout: image left / right (true two-column)
   ========================================================================= */

.pcp-layout-left,
.pcp-layout-right {
    display: flex;
    flex-direction: row;
    max-width: 700px;
    overflow: hidden;
}

/* Image side: fixed width, fixed height */
.pcp-layout-left .pcp-image-wrap,
.pcp-layout-right .pcp-image-wrap {
    width: 45%;
    min-width: 45%;
    height: 380px;
    overflow: hidden;
    flex-shrink: 0;
}

.pcp-layout-left .pcp-image-wrap .pcp-image,
.pcp-layout-right .pcp-image-wrap .pcp-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Body side: text + CTA stacked, vertically centered */
.pcp-layout-left .pcp-body,
.pcp-layout-right .pcp-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow-y: auto;
}

.pcp-layout-left .pcp-body .pcp-html,
.pcp-layout-right .pcp-body .pcp-html {
    padding: 20px 24px 12px;
}

.pcp-layout-left .pcp-body .pcp-cta-wrap,
.pcp-layout-right .pcp-body .pcp-cta-wrap {
    padding: 8px 24px 20px;
    text-align: left;
}

/* Image LEFT ordering + rounding */
.pcp-layout-left .pcp-image-wrap {
    order: 1;
}

.pcp-layout-left .pcp-image-wrap .pcp-image {
    border-radius: 12px 0 0 12px;
}

.pcp-layout-left .pcp-body {
    order: 2;
}

/* Image RIGHT ordering + rounding */
.pcp-layout-right .pcp-image-wrap {
    order: 2;
}

.pcp-layout-right .pcp-image-wrap .pcp-image {
    border-radius: 0 12px 12px 0;
}

.pcp-layout-right .pcp-body {
    order: 1;
}

/* =========================================================================
   CTA alignment – must come after layout rules to override defaults
   ========================================================================= */

.pcp-modal .pcp-body .pcp-cta-wrap.pcp-cta-left {
    text-align: left;
}

.pcp-modal .pcp-body .pcp-cta-wrap.pcp-cta-center {
    text-align: center;
}

.pcp-modal .pcp-body .pcp-cta-wrap.pcp-cta-right {
    text-align: right;
}

/* =========================================================================
   Responsive – Mobile (< 640px)
   ========================================================================= */

@media (max-width: 640px) {
    .pcp-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .pcp-modal {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        animation: pcpSlideUp 0.3s ease-out;
    }

    @keyframes pcpSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Stack left/right layouts on mobile */
    .pcp-layout-left,
    .pcp-layout-right {
        flex-direction: column;
        max-width: 100%;
    }

    .pcp-layout-left .pcp-image-wrap,
    .pcp-layout-right .pcp-image-wrap {
        width: 100%;
        min-width: 100%;
        height: 200px;
        order: 1;
    }

    .pcp-layout-left .pcp-body,
    .pcp-layout-right .pcp-body {
        order: 2;
    }

    .pcp-layout-left .pcp-body .pcp-html,
    .pcp-layout-right .pcp-body .pcp-html {
        padding: 20px 20px 12px;
    }

    .pcp-layout-left .pcp-body .pcp-cta-wrap,
    .pcp-layout-right .pcp-body .pcp-cta-wrap {
        padding: 8px 20px 20px;
        text-align: center;
    }

    .pcp-image-wrap .pcp-image,
    .pcp-layout-left .pcp-image-wrap .pcp-image,
    .pcp-layout-right .pcp-image-wrap .pcp-image {
        border-radius: 16px 16px 0 0;
    }

    .pcp-html {
        padding: 24px 20px 16px;
        font-size: 14px;
    }

    .pcp-cta-wrap {
        padding: 12px 20px 24px;
    }

    .pcp-cta-btn {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
    }

    .pcp-close {
        top: 8px;
        right: 8px;
    }
}
