/**
 * HP Ad Manager — Frontend Styles
 * Ad containers, responsive sizing, labels
 * Version: 1.0.0
 */

/* ═══════════════════════════════════════════
   AD CONTAINER BASE
   ═══════════════════════════════════════════ */

.hp-ad-container {
    text-align: center;
    margin: 1.5rem auto;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hp-ad-wrapper {
    width: 100%;
    text-align: center;
}

/* "Advertisement" label */
.hp-ad-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
}

/* Ad content wrapper */
.hp-ad-content {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.hp-ad-content img {
    max-width: 100%;
    height: auto;
    border: 0;
    display: block;
    margin: 0 auto;
}

.hp-ad-content a {
    display: inline-block;
    text-decoration: none;
}

.hp-ad-text-link {
    display: inline-block !important;
    padding: 10px 24px;
    background: var(--accent, #ffc107);
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════
   SIZE-SPECIFIC STYLES
   ═══════════════════════════════════════════ */

.hp-ad-type-leaderboard .hp-ad-content {
    max-width: 728px;
}

.hp-ad-type-billboard .hp-ad-content {
    max-width: 970px;
}

.hp-ad-type-half_page .hp-ad-content {
    max-width: 300px;
    min-height: 600px;
}

.hp-ad-type-medium_rectangle .hp-ad-content {
    max-width: 300px;
    min-height: 250px;
}

/* ═══════════════════════════════════════════
   PLACEMENT-SPECIFIC
   ═══════════════════════════════════════════ */

.hp-ad-slot-header {
    margin: 0 auto 1rem;
    padding: 0 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.hp-ad-slot-below_hero {
    margin: 2rem auto;
}

.hp-ad-slot-footer {
    margin: 2rem auto 0;
    padding: 1rem 16px;
    border-top: 1px solid #eee;
}

.hp-ad-slot-sidebar_primary,
.hp-ad-slot-sidebar_secondary {
    margin: 1.5rem 0;
    text-align: center;
}

.hp-ad-slot-in_content {
    margin: 2rem auto;
    width: 100%;
}

.hp-ad-slot-category_header {
    margin: 1rem auto 2rem;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE ADJUSTMENTS
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Hide half-page on mobile */
    .hp-ad-type-half_page {
        display: none !important;
    }

    /* Leaderboards auto-resize */
    .hp-ad-type-leaderboard .hp-ad-content,
    .hp-ad-type-billboard .hp-ad-content {
        max-width: 100%;
    }

    .hp-ad-type-leaderboard .hp-ad-content img {
        max-width: 320px;
    }

    /* Reduce margins on mobile */
    .hp-ad-container {
        margin: 1rem auto;
    }

    .hp-ad-slot-header {
        padding: 0 8px 0.75rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hp-ad-container {
        margin: 0.75rem auto;
    }

    .hp-ad-type-medium_rectangle .hp-ad-content {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════
   STICKY MOBILE (placeholder for future)
   ═══════════════════════════════════════════ */

.hp-ad-mobile-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    padding: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════
   PRINT — hide ads
   ═══════════════════════════════════════════ */

@media print {
    .hp-ad-container,
    .hp-ad-wrapper {
        display: none !important;
    }
}
