/* Ad System Styles */

/* Base Slot */
[data-ad-slot] {
    min-height: 50px; /* Prevent layout shift */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    transition: opacity 0.3s ease;
}

[data-ad-slot]:empty {
    display: none;
}

/* Image Banner */
.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Native Ad */
.ad-native {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.ad-native-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.ad-native-content {
    flex: 1;
}

.ad-native-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.ad-native-content p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.ad-cta {
    display: inline-block;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.ad-cta:hover {
    background: #2563eb;
    color: white;
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Sticky Ad */
.ad-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.5s ease-out;
}

.ad-sticky img {
    max-width: 300px;
    height: auto;
    display: block;
}

.ad-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .ad-native {
        flex-direction: column;
    }
    .ad-native-image img {
        width: 100%;
        height: 180px;
    }
    .ad-sticky {
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        padding: 5px;
        text-align: center;
    }
    .ad-sticky img {
        max-width: 100%;
        max-height: 60px;
        margin: 0 auto;
    }
}
