/* WiseTopicHub Affiliate Popup Styles */

/* ——— AFFILIATE POPUP ——— */
.affiliate-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.affiliate-popup {
    position: relative;
    max-width: 420px;
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    padding: 40px 36px 32px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.affiliate-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    color: var(--gray-500);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.affiliate-popup-close:hover {
    background: var(--gray-200);
    color: var(--dark);
}

.affiliate-popup-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #0d9488, #2dd4bf);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.affiliate-popup-heading {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.affiliate-popup-desc {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.65;
    margin-bottom: 24px;
}

.affiliate-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #e91e63;
    color: #fff;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s;
    letter-spacing: 0.01em;
}

.affiliate-popup-btn:hover {
    background: #c2185b;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
    color: #fff;
}

.affiliate-popup-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.affiliate-popup-btn:hover i {
    transform: translateX(3px);
}

.affiliate-popup-disclaimer {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 16px;
    font-style: italic;
}

/* Dark mode affiliate popup */
[data-theme="dark"] .affiliate-popup {
    background: #1a1a1a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .affiliate-popup-close {
    background: #252525;
    color: #888;
}

[data-theme="dark"] .affiliate-popup-close:hover {
    background: #333;
    color: #f5f5f5;
}

[data-theme="dark"] .affiliate-popup-heading {
    color: #f5f5f5;
}

[data-theme="dark"] .affiliate-popup-desc {
    color: #888;
}

[data-theme="dark"] .affiliate-popup-disclaimer {
    color: #555;
}

/* Responsive affiliate popup */
@media (max-width: 480px) {
    .affiliate-popup {
        padding: 32px 24px 24px;
        border-radius: 12px;
    }

    .affiliate-popup-heading {
        font-size: 1.2rem;
    }

    .affiliate-popup-btn {
        padding: 12px 24px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
}
