/**
 * SlotsGamblers Responsible Gambling Widget Styles
 * Version: 1.0.0
 * 
 * All styles are namespaced with "sgrg-" prefix to prevent conflicts
 * Supports full-width mobile layout and responsive design
 */

/* ========================================
   CSS CUSTOM PROPERTIES
======================================== */
:root {
    --sgrg-text-primary: #1A1A1A;
    --sgrg-text-secondary: #6B7280;
    --sgrg-spacing-sm: 0.5rem;
    --sgrg-spacing-md: 1rem;
    --sgrg-spacing-lg: 1.5rem;
    --sgrg-spacing-xl: 2rem;
    --sgrg-radius-lg: 0.75rem;
    --sgrg-radius-xl: 1rem;
    --sgrg-gradient-start: #FEF3C7;
    --sgrg-gradient-end: #FDE68A;
    --sgrg-border-color: #F59E0B;
    --sgrg-link-color: #D97706;
    --sgrg-link-hover: #B45309;
}

/* ========================================
   WRAPPER & CONTAINER BASE STYLES
======================================== */
.sgrg-responsible-gambling-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: relative;
}

/* Force full width on Elementor widget wrapper */
.elementor-widget-slotsgamblersresponsiblegambling {
    width: 100% !important;
    max-width: 100% !important;
}

.elementor-widget-slotsgamblersresponsiblegambling .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sgrg-responsible-gambling {
    background: linear-gradient(135deg, var(--sgrg-gradient-start) 0%, var(--sgrg-gradient-end) 100%);
    border-top: 0.125rem solid var(--sgrg-border-color);
    border-bottom: 0.125rem solid var(--sgrg-border-color);
    border-left: none;
    border-right: none;
    border-radius: var(--sgrg-radius-xl);
    padding: var(--sgrg-spacing-xl);
    box-shadow: 0 0.125rem 0.5rem rgba(245, 158, 11, 0.2);
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* ========================================
   CONTENT LAYOUT
======================================== */
.sgrg-responsible-gambling-content {
    display: flex;
    align-items: flex-start;
    gap: var(--sgrg-spacing-lg);
}

/* ========================================
   ICON STYLES
======================================== */
.sgrg-responsible-gambling-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgrg-responsible-gambling-icon svg {
    width: 3rem;
    height: 3rem;
    fill: var(--sgrg-border-color);
    display: block;
}

/* ========================================
   TEXT CONTENT
======================================== */
.sgrg-responsible-gambling-text {
    flex: 1;
}

.sgrg-responsible-gambling-text .sgrg-heading,
.sgrg-responsible-gambling-text h1,
.sgrg-responsible-gambling-text h2,
.sgrg-responsible-gambling-text h3,
.sgrg-responsible-gambling-text h4,
.sgrg-responsible-gambling-text h5,
.sgrg-responsible-gambling-text h6 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sgrg-text-primary);
    margin: 0 0 var(--sgrg-spacing-sm) 0;
    line-height: 1.3;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sgrg-responsible-gambling-text .sgrg-description,
.sgrg-responsible-gambling-text p {
    font-size: 0.9375rem;
    color: var(--sgrg-text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--sgrg-spacing-md) 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   LINKS CONTAINER
======================================== */
.sgrg-responsible-gambling-links {
    display: flex;
    gap: var(--sgrg-spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.sgrg-responsible-gambling-link {
    color: var(--sgrg-link-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 0.25rem 0;
}

.sgrg-responsible-gambling-link svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    flex-shrink: 0;
}

.sgrg-responsible-gambling-link:hover {
    color: var(--sgrg-link-hover);
    text-decoration: underline;
    transform: translateY(-1px);
}

.sgrg-responsible-gambling-link:focus {
    outline: 2px solid var(--sgrg-border-color);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ========================================
   RESPONSIVE DESIGN - LAPTOP/DESKTOP
   (13" to 32" screens)
======================================== */
@media (min-width: 1024px) and (max-width: 1920px) {
    .sgrg-responsible-gambling {
        max-width: 100%;
        width: 100%;
        padding: var(--sgrg-spacing-xl);
    }

    .sgrg-responsible-gambling-icon svg {
        width: 3rem;
        height: 3rem;
    }

    .sgrg-responsible-gambling-text .sgrg-heading,
    .sgrg-responsible-gambling-text h1,
    .sgrg-responsible-gambling-text h2,
    .sgrg-responsible-gambling-text h3,
    .sgrg-responsible-gambling-text h4,
    .sgrg-responsible-gambling-text h5,
    .sgrg-responsible-gambling-text h6 {
        font-size: 1.25rem;
    }

    .sgrg-responsible-gambling-text .sgrg-description,
    .sgrg-responsible-gambling-text p {
        font-size: 0.9375rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - LARGE DESKTOP
   (32" displays and above)
======================================== */
@media (min-width: 1921px) {
    .sgrg-responsible-gambling {
        max-width: 100%;
        padding: var(--sgrg-spacing-xl) calc(var(--sgrg-spacing-xl) * 2);
    }

    .sgrg-responsible-gambling-icon svg {
        width: 3.5rem;
        height: 3.5rem;
    }

    .sgrg-responsible-gambling-text .sgrg-heading,
    .sgrg-responsible-gambling-text h1,
    .sgrg-responsible-gambling-text h2,
    .sgrg-responsible-gambling-text h3,
    .sgrg-responsible-gambling-text h4,
    .sgrg-responsible-gambling-text h5,
    .sgrg-responsible-gambling-text h6 {
        font-size: 1.5rem;
    }

    .sgrg-responsible-gambling-text .sgrg-description,
    .sgrg-responsible-gambling-text p {
        font-size: 1.0625rem;
    }

    .sgrg-responsible-gambling-link {
        font-size: 0.9375rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
======================================== */
@media (max-width: 1023px) and (min-width: 769px) {
    .sgrg-responsible-gambling {
        padding: var(--sgrg-spacing-lg);
    }

    .sgrg-responsible-gambling-icon svg {
        width: 2.5rem;
        height: 2.5rem;
    }

    .sgrg-responsible-gambling-text .sgrg-heading,
    .sgrg-responsible-gambling-text h1,
    .sgrg-responsible-gambling-text h2,
    .sgrg-responsible-gambling-text h3,
    .sgrg-responsible-gambling-text h4,
    .sgrg-responsible-gambling-text h5,
    .sgrg-responsible-gambling-text h6 {
        font-size: 1.125rem;
    }

    .sgrg-responsible-gambling-text .sgrg-description,
    .sgrg-responsible-gambling-text p {
        font-size: 0.875rem;
    }

    .sgrg-responsible-gambling-link {
        font-size: 0.8125rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   (Full-width edge-to-edge layout)
======================================== */
@media (max-width: 768px) {
    /* Full-width mobile technique using calc */
    .sgrg-responsible-gambling-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Override Elementor container constraints */
    .elementor-widget-slotsgamblersresponsiblegambling .sgrg-responsible-gambling-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }

    .sgrg-responsible-gambling {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.75rem 1rem;
        border-radius: 0;
        margin: 0;
    }

    /* BANNER STYLE - Compact horizontal layout */
    .sgrg-responsible-gambling-content {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        text-align: left;
    }

    .sgrg-responsible-gambling-icon svg {
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
    }

    .sgrg-responsible-gambling-text {
        flex: 1;
        min-width: 0;
    }

    .sgrg-responsible-gambling-text .sgrg-heading,
    .sgrg-responsible-gambling-text h1,
    .sgrg-responsible-gambling-text h2,
    .sgrg-responsible-gambling-text h3,
    .sgrg-responsible-gambling-text h4,
    .sgrg-responsible-gambling-text h5,
    .sgrg-responsible-gambling-text h6 {
        font-size: 0.9375rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }

    .sgrg-responsible-gambling-text .sgrg-description,
    .sgrg-responsible-gambling-text p {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .sgrg-responsible-gambling-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .sgrg-responsible-gambling-link {
        font-size: 0.6875rem;
        padding: 0.375rem 0.5rem;
        min-height: 32px;
        display: inline-flex;
        justify-content: center;
        white-space: nowrap;
    }
    
    .sgrg-responsible-gambling-link svg {
        width: 0.75rem;
        height: 0.75rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE
======================================== */
@media (max-width: 480px) {
    .sgrg-responsible-gambling {
        padding: 0.625rem 0.75rem;
    }

    .sgrg-responsible-gambling-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .sgrg-responsible-gambling-text .sgrg-heading,
    .sgrg-responsible-gambling-text h1,
    .sgrg-responsible-gambling-text h2,
    .sgrg-responsible-gambling-text h3,
    .sgrg-responsible-gambling-text h4,
    .sgrg-responsible-gambling-text h5,
    .sgrg-responsible-gambling-text h6 {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }

    .sgrg-responsible-gambling-text .sgrg-description,
    .sgrg-responsible-gambling-text p {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
    }

    .sgrg-responsible-gambling-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .sgrg-responsible-gambling-link {
        font-size: 0.625rem;
        padding: 0.25rem 0.375rem;
        min-height: 28px;
    }
    
    .sgrg-responsible-gambling-link svg {
        width: 0.625rem;
        height: 0.625rem;
    }
}

/* ========================================
   ELEMENTOR EDITOR COMPATIBILITY
======================================== */
.elementor-editor-active .sgrg-responsible-gambling-wrapper {
    overflow: visible;
}

.elementor-editor-active .sgrg-responsible-gambling {
    margin: 0 auto;
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .sgrg-responsible-gambling {
        background: white !important;
        border: 2px solid var(--sgrg-border-color) !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .sgrg-responsible-gambling-link {
        text-decoration: underline;
    }

    .sgrg-responsible-gambling-link::after {
        content: " (" attr(href) ")";
        font-size: 0.75rem;
        color: var(--sgrg-text-secondary);
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */
@media (prefers-reduced-motion: reduce) {
    .sgrg-responsible-gambling-link {
        transition: none;
    }

    .sgrg-responsible-gambling-link:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sgrg-responsible-gambling {
        border: 3px solid var(--sgrg-border-color);
    }

    .sgrg-responsible-gambling-link {
        text-decoration: underline;
    }
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    :root {
        --sgrg-text-primary: #F9FAFB;
        --sgrg-text-secondary: #D1D5DB;
    }
}

/* ========================================
   RTL SUPPORT
======================================== */
.rtl .sgrg-responsible-gambling-content {
    direction: rtl;
}

.rtl .sgrg-responsible-gambling-links {
    direction: rtl;
}

/* ========================================
   PERFORMANCE OPTIMIZATION
======================================== */
.sgrg-responsible-gambling-icon svg,
.sgrg-responsible-gambling-link svg {
    will-change: transform;
}

.sgrg-responsible-gambling {
    contain: layout style paint;
}

/* Force GPU acceleration for smooth animations */
.sgrg-responsible-gambling-link {
    backface-visibility: hidden;
    perspective: 1000px;
}

