/**
 * SlotsGamblers Similar Games Widget Styles
 * Version: 1.0.0
 * 
 * CSS Architecture: BEM Methodology with SGSG prefix
 * Responsive: Mobile-first approach
 * Performance: Optimized for Core Web Vitals
 */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --sgsg-color-orange: #FF8C42;
    --sgsg-color-green: #10B981;
    --sgsg-color-green-hover: #0D9F6E;
    --sgsg-color-white: #FFFFFF;
    --sgsg-text-primary: #1A1A1A;
    --sgsg-text-secondary: #6B7280;
    --sgsg-border-color: #E0E0E0;
    --sgsg-star-filled: #FFD700;
    --sgsg-star-empty: #D1D5DB;
    --sgsg-spacing-sm: 0.5rem;
    --sgsg-spacing-md: 1rem;
    --sgsg-spacing-lg: 1.5rem;
    --sgsg-spacing-xl: 2rem;
    --sgsg-radius-md: 0.5rem;
    --sgsg-radius-lg: 0.75rem;
    --sgsg-radius-xl: 1rem;
    --sgsg-transition-base: all 0.3s ease;
    --sgsg-shadow-card: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    --sgsg-shadow-card-hover: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

/* ============================================
   WIDGET CONTAINER
   ============================================ */
.sgsg-similar-games-widget {
    width: 100%;
    overflow: hidden;
}

/* ============================================
   MAIN SECTION
   ============================================ */
.sgsg-similar-games__section {
    background: var(--sgsg-color-white);
    border: 0.0625rem solid var(--sgsg-border-color);
    border-radius: var(--sgsg-radius-xl);
    padding: var(--sgsg-spacing-xl);
    box-shadow: var(--sgsg-shadow-card);
    max-width: 75rem;
    margin: 0 auto;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.sgsg-similar-games__title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sgsg-text-primary);
    margin-bottom: var(--sgsg-spacing-lg);
    line-height: 1.2;
}

/* ============================================
   GAME CARDS CAROUSEL
   ============================================ */
.sgsg-similar-games__carousel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sgsg-spacing-lg);
    margin-top: var(--sgsg-spacing-lg);
}

/* ============================================
   GAME CARD
   ============================================ */
.sgsg-game-card {
    background: var(--sgsg-color-white);
    border: 0.0625rem solid var(--sgsg-border-color);
    border-radius: var(--sgsg-radius-lg);
    overflow: hidden;
    transition: var(--sgsg-transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.sgsg-game-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--sgsg-shadow-card-hover);
    border-color: var(--sgsg-color-orange);
}

/* ============================================
   GAME CARD IMAGE AREA
   ============================================ */
.sgsg-game-card__image {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--sgsg-color-white);
}

/* SVG Icons in Card Image */
.sgsg-game-card__image .sgsg-icon {
    width: 3rem;
    height: 3rem;
    color: var(--sgsg-color-white);
}

/* ============================================
   GAME CARD BADGE
   ============================================ */
.sgsg-game-card__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--sgsg-color-orange);
    color: var(--sgsg-color-white);
    padding: 0.25rem 0.625rem;
    border-radius: var(--sgsg-radius-md);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* ============================================
   GAME CARD CONTENT
   ============================================ */
.sgsg-game-card__content {
    padding: var(--sgsg-spacing-md);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

/* ============================================
   GAME CARD TITLE
   ============================================ */
.sgsg-game-card__title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--sgsg-text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

/* ============================================
   GAME CARD PROVIDER
   ============================================ */
.sgsg-game-card__provider {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    color: var(--sgsg-text-secondary);
    margin: 0 0 var(--sgsg-spacing-sm) 0;
    line-height: 1.4;
}

/* ============================================
   GAME CARD RATING
   ============================================ */
.sgsg-game-card__rating {
    display: flex;
    gap: 0.1875rem;
    font-size: 0.875rem;
    margin-bottom: var(--sgsg-spacing-sm);
}

.sgsg-game-card__rating-star {
    width: 0.875rem;
    height: 0.875rem;
}

.sgsg-game-card__rating-star--filled {
    fill: var(--sgsg-star-filled);
}

.sgsg-game-card__rating-star--empty {
    fill: var(--sgsg-star-empty);
}

/* ============================================
   GAME CARD CTA BUTTON
   ============================================ */
.sgsg-game-card__cta {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--sgsg-color-green);
    color: var(--sgsg-color-white);
    border: none;
    border-radius: var(--sgsg-radius-md);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--sgsg-transition-base);
    text-decoration: none;
    text-align: center;
    display: inline-block;
    margin-top: auto;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgsg-game-card__cta:hover {
    background: var(--sgsg-color-green-hover);
    transform: translateY(-0.0625rem);
}

.sgsg-game-card__cta:focus {
    outline: 2px solid var(--sgsg-color-green);
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Screens (1920px and up) - 32" displays */
@media (min-width: 120rem) {
    .sgsg-similar-games__section {
        max-width: 90rem;
    }
    
    .sgsg-similar-games__title {
        font-size: 1.75rem;
    }
}

/* Desktop (1366px to 1919px) */
@media (max-width: 119.9375rem) and (min-width: 85.375rem) {
    .sgsg-similar-games__section {
        max-width: 80rem;
    }
}

/* Laptop/Notebook (1024px to 1365px) */
@media (max-width: 85.3125rem) and (min-width: 64rem) {
    .sgsg-similar-games__section {
        max-width: 72rem;
    }
}

/* Tablet Landscape (768px to 1023px) */
@media (max-width: 63.9375rem) and (min-width: 48rem) {
    .sgsg-similar-games__carousel {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sgsg-spacing-md);
    }
    
    .sgsg-similar-games__section {
        padding: var(--sgsg-spacing-lg);
    }
}

/* Tablet Portrait & Mobile Landscape (481px to 767px) */
@media (max-width: 47.9375rem) and (min-width: 30.0625rem) {
    .sgsg-similar-games__carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sgsg-spacing-md);
    }
    
    .sgsg-similar-games__section {
        padding: var(--sgsg-spacing-lg) var(--sgsg-spacing-md);
    }
    
    .sgsg-similar-games__title {
        font-size: 1.375rem;
    }
}

/* Mobile (320px to 480px) - FULL WIDTH EDGE-TO-EDGE */
@media (max-width: 48rem) {
    /* Force full-width breaking out of Elementor containers */
    .sgsg-similar-games-widget {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        position: relative;
    }
    
    .sgsg-similar-games__section {
        width: 100% !important;
        max-width: none !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: var(--sgsg-spacing-lg) var(--sgsg-spacing-md);
        margin: 0;
    }
    
    .sgsg-similar-games__title {
        font-size: 1.25rem;
        margin-bottom: var(--sgsg-spacing-md);
    }
    
    .sgsg-similar-games__carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sgsg-spacing-sm);
        margin-top: var(--sgsg-spacing-md);
    }
    
    .sgsg-game-card__image .sgsg-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sgsg-game-card__content {
        padding: var(--sgsg-spacing-sm) var(--sgsg-spacing-md);
    }
    
    .sgsg-game-card__title {
        font-size: 0.9375rem;
    }
    
    .sgsg-game-card__provider {
        font-size: 0.75rem;
    }
    
    .sgsg-game-card__rating {
        font-size: 0.8125rem;
    }
    
    .sgsg-game-card__rating-star {
        width: 0.8125rem;
        height: 0.8125rem;
    }
    
    .sgsg-game-card__cta {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        min-height: 2.5rem;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 20rem) {
    .sgsg-similar-games__carousel {
        grid-template-columns: 1fr;
    }
    
    .sgsg-similar-games__title {
        font-size: 1.125rem;
    }
}

/* ============================================
   ELEMENTOR EDITOR COMPATIBILITY
   ============================================ */
.elementor-editor-active .sgsg-similar-games-widget {
    /* Prevent full-width in editor for better editing experience */
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sgsg-game-card:focus-within {
    outline: 2px solid var(--sgsg-color-orange);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .sgsg-game-card,
    .sgsg-game-card__cta {
        transition: none;
    }
    
    .sgsg-game-card:hover {
        transform: none;
    }
    
    .sgsg-game-card__cta:hover {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sgsg-similar-games__section {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .sgsg-game-card {
        break-inside: avoid;
    }
    
    .sgsg-game-card__cta {
        display: none;
    }
}

/* ============================================
   HIGH DPI DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sgsg-game-card__badge {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* You can add dark mode styles here if needed */
    /* Currently using light theme only as per original design */
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] .sgsg-game-card__badge {
    right: auto;
    left: 0.5rem;
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */
.sgsg-game-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Force GPU acceleration for smooth animations */
.sgsg-game-card:hover {
    transform: translateY(-0.25rem) translateZ(0);
}

