/**
 * SlotsGamblers News Sidebar - Frontend Styles
 * 
 * @package SlotsGamblers_News_Sidebar
 * @version 1.0.1
 * 
 * IMPORTANT: All styles are scoped to .sgns-* classes to prevent conflicts
 * No global selectors are used - only widget-specific classes
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
.sgns-news-widget-wrapper {
    --sgns-color-purple: #9333EA;
    --sgns-color-purple-light: #F3E8FF;
    --sgns-color-orange: #FF8C42;
    --sgns-color-white: #FFFFFF;
    --sgns-color-gray: #6B7280;
    --sgns-color-black: #1F2937;
    --sgns-text-primary: #1F2937;
    --sgns-text-secondary: #4B5563;
    --sgns-text-muted: #9CA3AF;
    --sgns-bg-main: #F9FAFB;
    --sgns-spacing-sm: clamp(0.5rem, 0.6vw, 0.75rem);
    --sgns-spacing-md: clamp(0.75rem, 0.9vw, 1rem);
    --sgns-spacing-lg: clamp(1rem, 1.2vw, 1.5rem);
    --sgns-radius-md: clamp(0.5rem, 0.6vw, 0.75rem);
    --sgns-radius-lg: clamp(0.75rem, 0.9vw, 1rem);
    --sgns-radius-xl: clamp(1rem, 1.2vw, 1.5rem);
}

/* ============================================
   WRAPPER & CONTAINER
   ============================================ */
.sgns-news-widget-wrapper {
    width: 100%;
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--sgns-text-primary);
    box-sizing: border-box;
}

.sgns-news-widget-wrapper *,
.sgns-news-widget-wrapper *::before,
.sgns-news-widget-wrapper *::after {
    box-sizing: border-box;
}

/* ============================================
   NEWS WIDGET MAIN CONTAINER
   ============================================ */
.sgns-news-widget {
    background: var(--sgns-color-white);
    border: 0.0625rem solid #E0E0E0;
    border-radius: var(--sgns-radius-xl);
    padding: var(--sgns-spacing-lg);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.sgns-news-widget:hover {
    box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.12);
    border-color: #D0D0D0;
}

/* ============================================
   WIDGET HEADER
   ============================================ */
.sgns-widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--sgns-spacing-lg);
    padding-bottom: var(--sgns-spacing-md);
    border-bottom: 0.0625rem solid #E0E0E0;
}

.sgns-widget-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sgns-widget-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sgns-widget-title {
    font-size: clamp(1.125rem, 1.1vw + 0.4rem, 1.375rem);
    font-weight: 800;
    color: var(--sgns-text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

/* ============================================
   NEWS LIST
   ============================================ */
.sgns-news-list {
    display: grid;
    gap: var(--sgns-spacing-md);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ============================================
   NEWS ARTICLE
   ============================================ */
.sgns-news-article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sgns-spacing-sm);
    padding-bottom: var(--sgns-spacing-md);
    border-bottom: 0.0625rem solid var(--sgns-color-gray);
    transition: all 0.3s ease;
}

.sgns-news-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sgns-news-article:hover {
    transform: translateX(0.25rem);
}

/* ============================================
   ARTICLE THUMBNAIL
   ============================================ */
.sgns-news-thumb {
    width: clamp(3rem, 4vw, 4rem);
    height: clamp(3rem, 4vw, 4rem);
    background: var(--sgns-color-black);
    border-radius: var(--sgns-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    flex-shrink: 0;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
    color: var(--sgns-color-white);
}

.sgns-news-thumb svg {
    width: 60%;
    height: 60%;
    display: block;
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.sgns-news-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sgns-news-content h1,
.sgns-news-content h2,
.sgns-news-content h3,
.sgns-news-content h4,
.sgns-news-content h5,
.sgns-news-content h6,
.sgns-news-content p {
    font-size: clamp(0.875rem, 0.9vw + 0.2rem, 1rem);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.375rem 0;
    padding: 0;
    color: var(--sgns-text-primary);
}

/* ============================================
   ARTICLE TITLE LINK
   ============================================ */
.sgns-news-title-link {
    color: var(--sgns-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sgns-news-title-link:hover {
    color: var(--sgns-color-orange);
}

/* ============================================
   CATEGORY BADGE
   ============================================ */
.sgns-news-category {
    display: inline-block;
    background: var(--sgns-color-purple-light);
    color: var(--sgns-color-purple);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 0.0625rem solid var(--sgns-color-purple);
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    width: fit-content;
}

.sgns-news-category:hover {
    background: var(--sgns-color-purple);
    color: var(--sgns-color-white);
}

/* ============================================
   META (DATE & AUTHOR)
   ============================================ */
.sgns-news-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--sgns-text-muted);
    align-items: center;
    line-height: 1.4;
}

.sgns-news-author {
    color: var(--sgns-color-black);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.sgns-news-author:hover {
    color: var(--sgns-text-secondary);
    text-decoration: underline;
}

/* ============================================
   ALL NEWS BUTTON
   ============================================ */
.sgns-all-news-button {
    display: block;
    width: 100%;
    background: var(--sgns-color-orange);
    color: var(--sgns-color-white);
    padding: 0.75rem;
    border-radius: var(--sgns-radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    text-align: center;
    border: none;
    transition: all 0.3s ease;
    margin-top: var(--sgns-spacing-md);
    box-shadow: 0 0.25rem 0.75rem rgba(255, 140, 66, 0.3);
    cursor: pointer;
    line-height: 1.4;
}

.sgns-all-news-button:hover {
    background: #E67A31;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1rem rgba(255, 140, 66, 0.4);
}

/* ============================================
   RESPONSIVE - TABLET (768px - 1199px)
   ============================================ */
@media (min-width: 48rem) and (max-width: 74.9375rem) {
    .sgns-news-widget {
        max-width: 450px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 767px)
   FULL-WIDTH EDGE-TO-EDGE LAYOUT
   ============================================ */
@media (max-width: 47.9375rem) {
    /* Mobile Full-Width Technique using calc(-50vw + 50%) */
    .sgns-news-widget-wrapper {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        position: relative !important;
    }
    
    /* Override Elementor container restrictions */
    .elementor-widget-slotsgamblersnewssidebar .sgns-news-widget-wrapper {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
    }
    
    .elementor-element .sgns-news-widget-wrapper {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
    }
    
    .sgns-news-widget {
        padding: var(--sgns-spacing-sm);
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .sgns-news-thumb {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .sgns-news-content h1,
    .sgns-news-content h2,
    .sgns-news-content h3,
    .sgns-news-content h4,
    .sgns-news-content h5,
    .sgns-news-content h6,
    .sgns-news-content p {
        font-size: 0.95rem;
    }
    
    .sgns-news-category {
        font-size: 0.5625rem;
        padding: 0.0625rem 0.375rem;
    }
    
    .sgns-news-meta {
        font-size: 0.6875rem;
    }
    
    .sgns-all-news-button {
        padding: 0.625rem;
        font-size: 0.8125rem;
    }
}

/* ============================================
   RESPONSIVE - LARGE DESKTOP (1920px+)
   FULL CONTAINER WIDTH UTILIZATION
   ============================================ */
@media (min-width: 120rem) {
    .sgns-news-widget {
        max-width: 500px;
    }
    
    .sgns-widget-title {
        font-size: 1.5rem;
    }
    
    .sgns-news-content h1,
    .sgns-news-content h2,
    .sgns-news-content h3,
    .sgns-news-content h4,
    .sgns-news-content h5,
    .sgns-news-content h6,
    .sgns-news-content p {
        font-size: 1.125rem;
    }
}

/* ============================================
   RESPONSIVE - ULTRA WIDE (2560px+)
   32" DISPLAY OPTIMIZATION
   ============================================ */
@media (min-width: 160rem) {
    .sgns-news-widget {
        max-width: 600px;
    }
    
    .sgns-widget-title {
        font-size: 1.75rem;
    }
    
    .sgns-news-thumb {
        width: 5rem;
        height: 5rem;
        font-size: 2rem;
    }
    
    .sgns-news-content h1,
    .sgns-news-content h2,
    .sgns-news-content h3,
    .sgns-news-content h4,
    .sgns-news-content h5,
    .sgns-news-content h6,
    .sgns-news-content p {
        font-size: 1.25rem;
    }
    
    .sgns-news-category {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }
    
    .sgns-news-meta {
        font-size: 0.875rem;
    }
    
    .sgns-all-news-button {
        font-size: 1rem;
        padding: 1rem;
    }
}

/* ============================================
   ELEMENTOR EDITOR COMPATIBILITY
   ============================================ */
.elementor-editor-active .sgns-news-widget-wrapper {
    min-height: 400px;
}

.elementor-editor-active .sgns-news-widget {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sgns-news-widget-wrapper a:focus {
    outline: 0.125rem solid var(--sgns-color-purple);
    outline-offset: 0.125rem;
}

.sgns-news-widget-wrapper a:focus-visible {
    outline: 0.125rem solid var(--sgns-color-purple);
    outline-offset: 0.125rem;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sgns-news-widget {
        box-shadow: none;
        border: 0.0625rem solid #000;
    }
    
    .sgns-all-news-button {
        display: none;
    }
}

