/* ===== PORTABLE ADS SYSTEM STYLES ===== */
/* Include this CSS file in any project using the AdsManager */

.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ad-overlay.active {
    display: flex;
    opacity: 1;
}

.ad-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

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

.ad-close-btn:active {
    transform: scale(0.95);
}

.ad-link {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.ad-image {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.ad-disclaimer {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .ad-close-btn {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .ad-image {
        max-height: calc(90vh - 60px);
    }

    .ad-disclaimer {
        bottom: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .ad-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .ad-close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .ad-content {
        max-height: 95vh;
    }

    .ad-image {
        max-height: calc(95vh - 40px);
    }

    .ad-close-btn {
        top: 5px;
        right: 5px;
    }

    .ad-disclaimer {
        bottom: 5px;
        font-size: 0.75rem;
    }
}

/* Animation for ad appearance */
@keyframes adFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ad-overlay.active .ad-content {
    animation: adFadeIn 0.4s ease-out;
}
