/* StageAds Frontend Styles - Anti-AdBlocker CSS */

/* Main container styles using anti-adblocker class names */
.stage-featured-content {
    display: block;
    position: relative;
    margin: 0 auto 40px auto !important;
    text-align: center;
    clear: both;
}

.stage-featured-content.align-left {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.stage-featured-content.align-right {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
}

.stage-featured-content.align-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Content link styling */
.stage-featured-content .stage-content-link {
    display: inline-block;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    line-height: 0;
    position: relative;
}

.stage-featured-content .stage-content-link:hover {
    text-decoration: none;
    border: none;
}

/* Image styling */
.stage-featured-content .featured-image {
    max-width: 100%;
    height: auto;
    border: none;
    box-shadow: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: block;
    margin: 0;
}

.stage-featured-content .featured-image:hover {
    opacity: 0.9;
}

/* Label styling - default left offset */
.stage-featured-content .content-label {
    position: absolute;
    top: 100%;
    left: 20px;
    background: #3d3c3c;
    color: #ffffff;
    padding: 3px 6px;
    font-size: 9px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 500;
    border-radius: 0 0 3px 3px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Label styling - centered alignment */
.stage-featured-content.label-center .content-label {
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 3px 3px;
}

/* Size variations */
.stage-featured-content.size-small {
    max-width: 300px;
}

.stage-featured-content.size-medium {
    max-width: 728px;
}

.stage-featured-content.size-large {
    max-width: 970px;
}

.stage-featured-content.size-auto {
    max-width: 100%;
}

/* Shortcode specific styling */
.stageads-shortcode {
    margin: 1.5em 0;
}

/* WordPress Block styling */
.wp-block-stageads-campaign {
    margin: 1.5em 0;
}

.wp-block-stageads-campaign.alignwide {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-stageads-campaign.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Animations */
.stage-featured-content.animate-fadeIn {
    opacity: 0;
    animation: stageadsFadeIn 0.6s ease forwards;
}

@keyframes stageadsFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.stage-featured-content.animate-slideIn {
    transform: translateY(20px);
    opacity: 0;
    animation: stageadsSlideIn 0.6s ease forwards;
}

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

/* Loading state */
.stage-featured-content.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: stageadsLoading 1.5s infinite;
    border-radius: 4px;
    min-height: 200px;
}

@keyframes stageadsLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stage-featured-content {
        margin: 1em 0;
    }

    .stage-featured-content .content-label {
        font-size: 8px;
        padding: 2px 5px;
    }

    .stage-featured-content.size-medium,
    .stage-featured-content.size-large {
        max-width: 100%;
    }

    .stage-featured-content .featured-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .stage-featured-content {
        margin: 0.5em 0;
    }

    .stage-featured-content .content-label {
        font-size: 7px;
        padding: 2px 4px;
        border-radius: 0 0 2px 2px;
    }
}

/* High contrast accessibility */
@media (prefers-contrast: high) {
    .stage-featured-content .content-label {
        background: #000000;
        color: #ffffff;
        border: 1px solid #ffffff;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .stage-featured-content .featured-image,
    .stage-featured-content.animate-fadeIn,
    .stage-featured-content.animate-slideIn {
        transition: none;
        animation: none;
    }
    
    .stage-featured-content.animate-fadeIn,
    .stage-featured-content.animate-slideIn {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    .stage-featured-content .content-label {
        background: transparent;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .stage-featured-content .featured-image {
        max-width: 200px;
        max-height: 200px;
    }
}