/* =================================
   MIOPUB POPUP - Puntaprosciutto.com
   ================================= */

/* Overlay */
.miopub-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    animation: fadeIn 0.3s ease-in-out;
}

.miopub-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Container */
.miopub-popup {
    background: #ffffff;
    border-radius: 16px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease-out;
}

/* Close Button */
.miopub-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.miopub-popup-close:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: scale(1.06);
}

/* Header Section */
.miopub-popup-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-radius: 16px 16px 0 0;
    color: white;
}

.miopub-popup-emoji {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.miopub-popup-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: white;
}

.miopub-popup-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.95;
    line-height: 1.5;
}

/* Logo Section */
.miopub-popup-logo {
    padding: 25px 30px 0;
    text-align: center;
}

.miopub-popup-logo img {
    height: 46px;
    width: auto;
}

/* Body Section */
.miopub-popup-body {
    padding: 20px 30px 30px;
}

.miopub-popup-description {
    font-size: 16px;
    color: #475569;
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.6;
}

/* Benefits List */
.miopub-popup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.miopub-popup-benefits li {
    padding: 12px 16px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.miopub-popup-benefits li:hover {
    background: #e0f2fe;
    transform: translateX(4px);
}

.miopub-popup-benefits li::before {
    content: "✅";
    margin-right: 12px;
    font-size: 18px;
}

/* CTA Buttons */
.miopub-popup-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.miopub-popup-btn {
    display: inline-block;
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.miopub-popup-btn-primary {
    background: linear-gradient(135deg, #f99c00 0%, #f59e0b 100%);
    color: #111827;
    box-shadow: 0 4px 14px rgba(249, 156, 0, 0.35);
}

.miopub-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 156, 0, 0.45);
    color: #111827;
}

.miopub-popup-btn-secondary {
    background: white;
    color: #f99c00;
    border-color: #f99c00;
}

.miopub-popup-btn-secondary:hover {
    background: #fff7e6;
    transform: translateY(-2px);
    color: #d97706;
}

/* Social Proof */
.miopub-popup-social-proof {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    padding: 16px 20px;
    background: #fef3c7;
    border-radius: 8px;
    margin: 0;
}

.miopub-popup-social-proof::before {
    content: "⭐";
    margin-right: 6px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .miopub-popup {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .miopub-popup-header {
        padding: 30px 20px 15px;
    }
    
    .miopub-popup-title {
        font-size: 22px;
    }
    
    .miopub-popup-subtitle {
        font-size: 15px;
    }
    
    .miopub-popup-body {
        padding: 15px 20px 25px;
    }
    
    .miopub-popup-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .miopub-popup-benefits li {
        font-size: 14px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .miopub-popup-title {
        font-size: 20px;
    }
    
    .miopub-popup-emoji {
        font-size: 40px;
    }
}

/* Prevent body scroll when popup is open */
body.miopub-popup-open {
    overflow: hidden;
}
