/**
 * Gaming Society - Ad Slots Styles
 * 
 * Style dla slotów reklamowych i komponentów TradeDoubler
 */

/* ==========================================================================
   Base Ad Slot Styles
   ========================================================================== */

.gs-ad-slot {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.gs-ad-slot--sticky {
    position: sticky;
    top: 120px;
}

/* Placeholder style */
.gs-ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c62525 0%, #8b1a1a 100%);
    border-radius: 20px;
}

.gs-ad-placeholder span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==========================================================================
   Lazy Loading
   ========================================================================== */

.gs-ad-lazy-wrapper {
    position: relative;
}

.gs-ad-lazy-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f1 0%, #e0e0e0 100%);
    border-radius: 20px;
}

.gs-ad-lazy-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #d0d0d0;
    border-top-color: #0070a9;
    border-radius: 50%;
    animation: gs-ad-spin 0.8s linear infinite;
}

@keyframes gs-ad-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   TradeDoubler Banner
   ========================================================================== */

.gs-td-banner-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.gs-td-banner {
    display: block;
    width: 100%;
    height: 100%;
}

.gs-td-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.gs-td-banner:hover .gs-td-banner-img {
    transform: scale(1.02);
}

.gs-td-banner-fallback {
    display: block;
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */

.gs-ad-product-grid {
    display: grid;
    gap: 20px;
}

.gs-ad-product-card {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.gs-ad-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.dark .gs-ad-product-card {
    background: var(--dark-card, #001e2e);
}

.gs-ad-product-card .aspect-square {
    position: relative;
    padding-bottom: 100%;
}

.gs-ad-product-card .aspect-square img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gs-ad-product-card h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .gs-ad-product-card h4 {
    color: white;
}

/* ==========================================================================
   Product Slider
   ========================================================================== */

.gs-ad-product-slider {
    position: relative;
}

.gs-ad-product-slider .swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.gs-ad-product-slider .swiper-slide {
    flex-shrink: 0;
    width: calc(25% - 15px);
}

@media (max-width: 1024px) {
    .gs-ad-product-slider .swiper-slide {
        width: calc(33.333% - 12px);
    }
}

@media (max-width: 640px) {
    .gs-ad-product-slider .swiper-slide {
        width: calc(50% - 8px);
    }
}

.gs-ad-product-slider .swiper-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.gs-ad-product-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    cursor: pointer;
    transition: background 0.2s;
}

.gs-ad-product-slider .swiper-pagination-bullet-active {
    background: #0070a9;
}

/* ==========================================================================
   Text Links
   ========================================================================== */

.gs-td-text-link {
    color: #0070a9;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.gs-td-text-link:hover {
    color: #005580;
}

/* ==========================================================================
   Slot Type Specific Styles
   ========================================================================== */

/* Banner (horizontal) */
.gs-ad-slot--banner {
    width: 100%;
}

/* Skyscraper (vertical) */
.gs-ad-slot--skyscraper {
    /* Handled by width/height in inline styles */
}

/* Box (square-ish) */
.gs-ad-slot--box {
    /* Handled by width/height in inline styles */
}

/* Inline (within content) */
.gs-ad-slot--inline {
    margin: 24px 0;
}

/* Leaderboard */
.gs-ad-slot--leaderboard {
    margin: 16px auto;
}

/* Mobile inline */
.gs-ad-slot--mobile-inline {
    margin: 16px 0;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .gs-ad-slot {
        border-radius: 12px;
    }
    
    .gs-ad-placeholder,
    .gs-td-banner-wrapper,
    .gs-td-banner-img {
        border-radius: 12px;
    }
    
    .gs-ad-slot--inline {
        margin: 16px 0;
    }
}

/* ==========================================================================
   Sponsored Label (optional)
   ========================================================================== */

.gs-ad-sponsored-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.gs-ad-fade-in {
    animation: gs-ad-fadeIn 0.3s ease-out;
}

@keyframes gs-ad-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .gs-ad-slot,
    .gs-td-banner-wrapper,
    .gs-ad-product-grid,
    .gs-ad-product-slider {
        display: none !important;
    }
}
