.iap-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 95, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 16px;
    box-sizing: border-box;
}

.iap-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.iap-popup-container {
    position: relative;
    background-color: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(30, 58, 95, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.iap-popup-overlay.active .iap-popup-container {
    transform: scale(1) translateY(0);
}

.iap-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background-color: #f1f5f9;
    border: none;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.iap-popup-close:hover {
    background-color: #e2e8f0;
    color: #1e3a5f;
}

.iap-popup-content {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    text-align: left;
}

.iap-phone-mockup {
    flex-shrink: 0;
}

.iap-phone-frame {
    position: relative;
    display: inline-block;
    background: #1e3a5f;
    border-radius: 32px;
    padding: 6px;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.3);
}

.iap-phone-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: #1e3a5f;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.iap-phone-slider {
    width: 140px;
    overflow: hidden;
    border-radius: 26px;
}

.iap-slider-track {
    display: flex;
    transition: transform 0.4s ease;
}

.iap-phone-screen {
    flex-shrink: 0;
    width: 140px;
    height: auto;
    display: block;
    background: #fff;
}

.iap-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.iap-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background-color: #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.iap-slider-dot:hover {
    background-color: #94a3b8;
}

.iap-slider-dot.active {
    background-color: #1e3a5f;
    transform: scale(1.3);
}

.iap-popup-text {
    flex: 1;
    min-width: 0;
}

.iap-popup-badge {
    display: inline-block;
    background-color: #1e3a5f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

#iap-popup-heading {
    font-size: 22px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 10px 0;
    line-height: 1.3;
    padding: 0;
}

.iap-popup-description {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
    padding: 0;
}

.iap-feature-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.iap-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    margin: 0;
}

.iap-feature-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #1e3a5f;
    margin-top: 1px;
}

.iap-store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.iap-store-badge {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
    border: none;
}

.iap-store-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.iap-store-badge img {
    height: 40px;
    width: auto;
    display: block;
}

.iap-store-badge.iap-google-play img {
    height: 60px;
    margin: -10px 0;
}

.iap-dismiss-permanent {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s ease;
    text-align: left;
}

.iap-dismiss-permanent:hover {
    color: #64748b;
    text-decoration: underline;
}

@media (max-width: 560px) {
    .iap-popup-container {
        padding: 24px;
        border-radius: 16px;
    }

    .iap-popup-content {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .iap-phone-mockup {
        margin-bottom: 8px;
    }

    .iap-phone-frame {
        border-radius: 28px;
        padding: 5px;
    }

    .iap-phone-notch {
        width: 50px;
        height: 16px;
        top: 5px;
    }

    .iap-phone-slider {
        width: 120px;
        border-radius: 23px;
    }

    .iap-phone-screen {
        width: 120px;
    }

    .iap-popup-text {
        width: 100%;
    }

    .iap-popup-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    #iap-popup-heading {
        font-size: 20px;
    }

    .iap-popup-description {
        font-size: 13px;
    }

    .iap-feature-list li {
        font-size: 12px;
        padding: 6px 0;
    }

    .iap-feature-icon {
        width: 16px;
        height: 16px;
    }

    .iap-store-badge img {
        height: 36px;
    }

    .iap-store-badge.iap-google-play img {
        height: 54px;
    }

    .iap-popup-close {
        width: 28px;
        height: 28px;
        top: 12px;
        right: 12px;
    }

    .iap-popup-close svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 380px) {
    .iap-popup-overlay {
        padding: 12px;
    }

    .iap-popup-container {
        padding: 20px 16px;
        max-height: 95vh;
    }

    .iap-phone-slider {
        width: 100px;
    }

    .iap-phone-screen {
        width: 100px;
    }

    .iap-phone-frame {
        border-radius: 24px;
        padding: 4px;
    }

    .iap-phone-notch {
        width: 40px;
        height: 14px;
        top: 4px;
        border-radius: 0 0 10px 10px;
    }

    #iap-popup-heading {
        font-size: 18px;
    }

    .iap-popup-description {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .iap-feature-list {
        margin-bottom: 16px;
    }

    .iap-feature-list li {
        font-size: 11px;
        gap: 8px;
        padding: 5px 0;
    }

    .iap-feature-icon {
        width: 14px;
        height: 14px;
    }

    .iap-store-buttons {
        gap: 6px;
    }

    .iap-store-badge img {
        height: 32px;
    }

    .iap-store-badge.iap-google-play img {
        height: 48px;
    }

    .iap-slider-dots {
        gap: 5px;
        margin-top: 10px;
    }

    .iap-slider-dot {
        width: 5px;
        height: 5px;
    }

    .iap-dismiss-permanent {
        font-size: 11px;
    }
}
