/**
 * SlotsGamblers Game Header Widget Styles
 * Version: 1.0.5
 * Namespace: sggheader (Slots Gamblers Game Header)
 * 
 * All styles are prefixed with 'sggheader-' to prevent conflicts
 * with other Elementor widgets and WordPress themes
 */

/* ==========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ========================================== */
.sggheader-widget-wrapper {
    /* Brand Colors */
    --sggheader-color-purple: #9333EA;
    --sggheader-color-purple-light: #F3E8FF;
    --sggheader-color-orange: #FF8C42;
    --sggheader-color-orange-light: #FFF4E6;
    --sggheader-color-green: #10B981;
    --sggheader-color-red: #EF4444;
    --sggheader-color-white: #FFFFFF;
    --sggheader-color-gray-light: #F7F7F7;
    --sggheader-color-gray-medium: #E0E0E0;
    --sggheader-color-gray-dark: #6B7280;
    --sggheader-text-primary: #1A1A1A;
    --sggheader-text-secondary: #6B7280;
    --sggheader-text-muted: #9CA3AF;
    --sggheader-brand-gradient: linear-gradient(135deg, #9333EA 0%, #FF8C42 100%);
    
    /* Spacing */
    --sggheader-spacing-xs: 0.25rem;
    --sggheader-spacing-sm: 0.5rem;
    --sggheader-spacing-md: 1rem;
    --sggheader-spacing-lg: 1.5rem;
    --sggheader-spacing-xl: 2rem;
    --sggheader-spacing-2xl: 3rem;
    
    /* Border Radius */
    --sggheader-radius-sm: 0.25rem;
    --sggheader-radius-md: 0.5rem;
    --sggheader-radius-lg: 0.75rem;
    --sggheader-radius-xl: 1rem;
    --sggheader-radius-2xl: 1.5rem;
}

/* ==========================================
   WIDGET WRAPPER
   ========================================== */
.sggheader-widget-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sggheader-widget-wrapper * {
    box-sizing: border-box;
}

/* ==========================================
   GAME BANNER HEADER
   ========================================== */
.sggheader-game-banner-header {
    background: var(--sggheader-brand-gradient);
    border-radius: var(--sggheader-radius-xl);
    padding: var(--sggheader-spacing-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.25rem 1.5rem rgba(0, 0, 0, 0.15);
}

.sggheader-game-banner-content {
    position: relative;
    z-index: 1;
}

/* ==========================================
   HEADER MAIN CONTENT
   ========================================== */
.sggheader-game-header-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--sggheader-spacing-lg);
    align-items: center;
}

/* ==========================================
   GAME IMAGE
   ========================================== */
.sggheader-game-image-box {
    width: 7rem;
    flex-shrink: 0;
}

.sggheader-game-image-box img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--sggheader-radius-lg);
    border: 0.1875rem solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    display: block;
}

.sggheader-game-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: var(--sggheader-radius-lg);
    border: 0.1875rem solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   GAME HEADER LEFT SECTION
   ========================================== */
.sggheader-game-header-left {
    display: flex;
    flex-direction: column;
    gap: var(--sggheader-spacing-sm);
}

/* ==========================================
   CATEGORY BADGE
   ========================================== */
.sggheader-game-category-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    color: var(--sggheader-color-white);
    padding: 0.375rem 0.875rem;
    border-radius: 6.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 0.0625rem solid rgba(255, 255, 255, 0.3);
    width: fit-content;
}

/* ==========================================
   GAME TITLE
   ========================================== */
.sggheader-game-title {
    font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
    font-weight: 900;
    color: var(--sggheader-color-white);
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

/* ==========================================
   GAME META INFORMATION
   ========================================== */
.sggheader-game-meta {
    display: flex;
    align-items: center;
    gap: var(--sggheader-spacing-md);
    flex-wrap: wrap;
}

/* Provider */
.sggheader-game-provider {
    display: flex;
    align-items: center;
    gap: var(--sggheader-spacing-sm);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 500;
}

.sggheader-game-provider-label {
    color: rgba(255, 255, 255, 0.8);
}

.sggheader-game-provider-name {
    font-weight: 700;
    color: var(--sggheader-color-white);
}

/* Rating */
.sggheader-game-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sggheader-star {
    font-size: 1.25rem;
    color: #FFD700;
    text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
}

.sggheader-star svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Publish Date */
.sggheader-game-publish-date {
    display: flex;
    align-items: center;
    gap: var(--sggheader-spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
}

.sggheader-game-publish-date svg {
    flex-shrink: 0;
}

/* ==========================================
   CTA BUTTONS
   ========================================== */
.sggheader-game-header-cta {
    display: flex;
    flex-direction: column;
    gap: var(--sggheader-spacing-sm);
}

.sggheader-game-btn {
    padding: 0.625rem 1.5rem;
    border-radius: var(--sggheader-radius-md);
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.025em;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.sggheader-game-btn-primary {
    background: var(--sggheader-color-green);
    color: var(--sggheader-color-white);
}

.sggheader-game-btn-primary:hover {
    background: #0EA572;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 0.75rem rgba(16, 185, 129, 0.4);
}

.sggheader-game-btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--sggheader-color-purple);
}

.sggheader-game-btn-secondary:hover {
    background: var(--sggheader-color-white);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 0.75rem rgba(255, 255, 255, 0.4);
}

/* ==========================================
   QUICK STATS BAR
   ========================================== */
.sggheader-game-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: var(--sggheader-spacing-sm);
    margin-top: var(--sggheader-spacing-lg);
    padding-top: var(--sggheader-spacing-lg);
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.2);
}

.sggheader-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    padding: var(--sggheader-spacing-sm) var(--sggheader-spacing-md);
    border-radius: var(--sggheader-radius-lg);
    border: 0.0625rem solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sggheader-stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-0.125rem);
}

.sggheader-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: var(--sggheader-spacing-xs);
    margin: 0 0 var(--sggheader-spacing-xs) 0;
}

.sggheader-stat-value {
    font-size: 1rem;
    font-weight: 900;
    color: var(--sggheader-color-white);
    margin: 0;
}

.sggheader-stat-value.sggheader-highlight {
    color: #FFD700;
}

/* ==========================================
   RESPONSIVE - TABLET (1024px and below)
   ========================================== */
@media (max-width: 64rem) {
    .sggheader-game-header-main {
        grid-template-columns: auto 1fr;
        gap: var(--sggheader-spacing-lg);
    }

    .sggheader-game-image-box {
        width: 6rem;
    }

    .sggheader-game-header-left {
        grid-column: span 2;
    }

    .sggheader-game-header-cta {
        grid-column: span 2;
        flex-direction: row;
        width: 100%;
    }

    .sggheader-game-btn {
        flex: 1;
    }

    .sggheader-game-stats-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (768px and below)
   Edge-to-Edge Full-Width Layout
   ========================================== */
@media (max-width: 48rem) {
    /* Edge-to-Edge Full-Width Mobile Layout */
    .sggheader-game-banner-header {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        border-radius: var(--sggheader-radius-xl) var(--sggheader-radius-xl) 0 0 !important;
        padding: var(--sggheader-spacing-md);
    }

    /* Grid Layout - Image Left, Content Right */
    .sggheader-game-header-main {
        grid-template-columns: auto 1fr;
        gap: var(--sggheader-spacing-md);
        text-align: left;
    }

    /* Image Left Side */
    .sggheader-game-image-box {
        width: 8rem;
        margin: 0;
    }

    /* Content Right Side */
    .sggheader-game-header-left {
        align-items: flex-start;
        text-align: left;
        grid-column: 2;
    }

    .sggheader-game-header-cta {
        grid-column: span 2;
    }

    .sggheader-game-category-badge {
        font-size: 0.6875rem;
        padding: 0.25rem 0.625rem;
    }

    .sggheader-game-title {
        font-size: 1.5rem;
    }

    /* Meta Info Left-Aligned */
    .sggheader-game-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sggheader-spacing-xs);
    }

    .sggheader-game-provider {
        font-size: 0.8125rem;
    }

    .sggheader-game-rating {
        justify-content: flex-start;
    }

    .sggheader-star {
        font-size: 1.125rem;
    }

    .sggheader-star svg {
        width: 1.125rem;
        height: 1.125rem;
    }

    .sggheader-game-publish-date {
        font-size: 0.6875rem;
    }

    /* Full-Width CTA Buttons */
    .sggheader-game-header-cta {
        flex-direction: column;
        width: 100%;
        gap: var(--sggheader-spacing-xs);
    }

    .sggheader-game-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 2.75rem;
    }

    /* Compact Stats - 3 Columns */
    .sggheader-game-stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sggheader-spacing-xs);
        margin-top: var(--sggheader-spacing-md);
        padding-top: var(--sggheader-spacing-md);
    }

    .sggheader-stat-item {
        padding: var(--sggheader-spacing-xs) var(--sggheader-spacing-sm);
    }

    .sggheader-stat-label {
        font-size: 0.625rem;
    }

    .sggheader-stat-value {
        font-size: 0.875rem;
    }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE (480px and below)
   Ultra Compact Layout
   ========================================== */
@media (max-width: 30rem) {
    .sggheader-game-banner-header {
        padding: var(--sggheader-spacing-sm);
    }

    .sggheader-game-image-box {
        width: 7rem;
    }

    .sggheader-game-title {
        font-size: 1.25rem;
    }

    .sggheader-game-category-badge {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
    }

    .sggheader-game-provider {
        font-size: 0.75rem;
    }

    .sggheader-star {
        font-size: 1rem;
    }

    .sggheader-star svg {
        width: 1rem;
        height: 1rem;
    }

    .sggheader-game-publish-date {
        font-size: 0.625rem;
    }

    .sggheader-game-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
        min-height: 2.5rem;
    }

    .sggheader-game-stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sggheader-spacing-xs);
    }

    .sggheader-stat-item {
        padding: var(--sggheader-spacing-xs);
    }

    .sggheader-stat-label {
        font-size: 0.5625rem;
    }

    .sggheader-stat-value {
        font-size: 0.8125rem;
    }
}

/* ==========================================
   LARGE DESKTOP OPTIMIZATIONS (32" displays)
   Maximum 1920px container width
   ========================================== */
@media (min-width: 120rem) {
    .sggheader-game-header-main {
        max-width: 120rem;
        margin: 0 auto;
    }
}

/* ==========================================
   ELEMENTOR EDITOR SPECIFIC STYLES
   ========================================== */
.elementor-editor-active .sggheader-widget-wrapper {
    /* Ensure proper preview in Elementor editor */
    min-height: auto;
}

.elementor-editor-active .sggheader-game-banner-header {
    /* Disable mobile full-width in editor for better editing experience */
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */
.sggheader-game-btn:focus,
.sggheader-stat-item:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .sggheader-game-btn,
    .sggheader-stat-item {
        transition: none;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .sggheader-game-banner-header {
        box-shadow: none;
        background: #9333EA !important;
    }

    .sggheader-game-btn {
        border: 1px solid #333;
    }
}

