/**
 * iHowz Advertising Widget Styles
 *
 * @package iHowz
 * @since 2.0.0
 */

/* Rotating Carousel Styles */
.ihowz-ad-rotation {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 120px;
}

.ihowz-ad-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ihowz-ad-slide.active {
    position: relative;
    opacity: 1;
}

.ihowz-ad-slide img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
}

.ihowz-ad-description {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Grid Layout Styles */
.ihowz-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.ihowz-ad-grid-item {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ihowz-ad-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ihowz-ad-grid-item img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
}

/* Single Ad Styles */
.ihowz-ad-single {
    text-align: center;
    padding: 10px 0;
}

.ihowz-ad-single img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
}

/* Common Styles */
.ihowz-advertising-widget {
    margin: 20px 0;
}

.ihowz-advertising-widget a {
    display: inline-block;
    text-decoration: none;
}

.ihowz-ad-image {
    display: block;
    margin: 0 auto;
}

/* No Ads Notice */
.ihowz-no-ads-notice {
    padding: 20px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    text-align: center;
    color: #666;
    border-radius: 4px;
}

/* Advertising Bar Specific Styles */
.advertising-bar .ihowz-advertising-widget {
    margin: 0;
}

.advertising-bar .ihowz-ad-rotation {
    min-height: 100px;
}

.advertising-bar .ihowz-ad-slide img {
    max-height: 100px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .ihowz-ad-grid {
        grid-template-columns: 1fr;
    }

    .ihowz-ad-slide img,
    .ihowz-ad-single img {
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .ihowz-ad-rotation {
        min-height: 80px;
    }

    .ihowz-ad-description {
        font-size: 12px;
    }
}