/**
 * SlotsGamblers Bonus Offers Sidebar Widget - Frontend Styles
 *
 * @package SlotsGamblersBonusOffersSidebar
 * @version 1.0.6
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* SlotsGamblers Brand Colors */
    --sgbos-color-purple: #9333EA;
    --sgbos-color-orange: #FF8C42;
    --sgbos-color-green: #10B981;
    --sgbos-color-white: #FFFFFF;
    --sgbos-color-gray-light: #F7F7F7;
    --sgbos-color-gray-medium: #E0E0E0;
    --sgbos-text-primary: #1A1A1A;
    --sgbos-text-secondary: #6B7280;
    --sgbos-border-color: #E0E0E0;
    
    /* Spacing */
    --sgbos-spacing-xs: 0.25rem;
    --sgbos-spacing-sm: 0.5rem;
    --sgbos-spacing-md: 1rem;
    --sgbos-spacing-lg: 1.5rem;
    --sgbos-spacing-xl: 2rem;
    
    /* Border Radius */
    --sgbos-radius-sm: 0.25rem;
    --sgbos-radius-md: 0.5rem;
    --sgbos-radius-lg: 0.75rem;
    --sgbos-radius-xl: 1rem;
}

/* ===== WIDGET WRAPPER ===== */
.sgbos-sidebar-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* ===== SIDEBAR CONTAINER ===== */
.sgbos-sidebar {
    background: var(--sgbos-color-white);
    border: 0.125rem solid var(--sgbos-border-color);
    border-radius: var(--sgbos-radius-xl);
    padding: var(--sgbos-spacing-lg);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    height: fit-content;
    width: 100%;
    max-width: 100%;
}

/* ===== HEADER ===== */
.sgbos-header {
    display: flex;
    align-items: center;
    gap: var(--sgbos-spacing-md);
    margin-bottom: var(--sgbos-spacing-lg);
    padding-bottom: var(--sgbos-spacing-md);
    border-bottom: 0.125rem solid var(--sgbos-border-color);
}

.sgbos-header-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    border-radius: var(--sgbos-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0.125rem 0.375rem rgba(255, 140, 66, 0.3);
}

.sgbos-header-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.sgbos-header-icon i {
    font-size: 1.5rem;
    line-height: 1;
}

.sgbos-header-icon img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.sgbos-header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sgbos-text-primary);
    line-height: 1.2;
    margin: 0;
}

/* ===== OFFERS LIST ===== */
.sgbos-offers-list {
    display: flex;
    flex-direction: column;
    gap: var(--sgbos-spacing-md);
}

/* ===== OFFER CARD ===== */
.sgbos-offer-card {
    background: var(--sgbos-color-white);
    border: 0.125rem solid var(--sgbos-border-color);
    border-radius: var(--sgbos-radius-lg);
    padding: var(--sgbos-spacing-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sgbos-offer-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0.25rem;
    height: 100%;
    background: linear-gradient(135deg, #FF8C42 0%, #10B981 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sgbos-offer-card:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1rem rgba(255, 140, 66, 0.15);
    border-color: var(--sgbos-color-orange);
}

.sgbos-offer-card:hover::before {
    opacity: 1;
}

/* ===== BADGE ===== */
.sgbos-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--sgbos-radius-sm);
    background: var(--sgbos-color-green);
    color: var(--sgbos-color-white);
    box-shadow: 0 0.125rem 0.25rem rgba(16, 185, 129, 0.3);
}

.sgbos-badge-hot {
    background: linear-gradient(135deg, #FF1744 0%, #F50057 100%);
}

.sgbos-badge-exclusif {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1A1A1A;
}

/* ===== CARD CONTENT ===== */
.sgbos-casino-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--sgbos-text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    text-align: center;
    margin-top: 0;
}

.sgbos-bonus-amount {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--sgbos-color-orange);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    text-align: center;
}

.sgbos-offer-details {
    font-size: 0.6875rem;
    color: var(--sgbos-text-secondary);
    margin-bottom: var(--sgbos-spacing-sm);
    line-height: 1.4;
    text-align: center;
    margin-top: 0;
}

/* ===== CTA BUTTON ===== */
.sgbos-cta-button {
    width: 100%;
    background: var(--sgbos-color-green);
    color: var(--sgbos-color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--sgbos-radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0.125rem 0.5rem rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
}

.sgbos-cta-button:hover {
    background: #0D9F6E;
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.25rem 0.75rem rgba(16, 185, 129, 0.4);
    color: var(--sgbos-color-white);
    text-decoration: none;
}

/* ===== FULL WIDTH SUPPORT FOR 32" DISPLAYS ===== */
@media (min-width: 1920px) {
    .sgbos-sidebar-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .sgbos-sidebar {
        max-width: 100%;
        width: 100%;
    }
}

/* ===== MOBILE FULL-WIDTH LAYOUT WITH CALC(-50VW + 50%) - OPTIONAL ===== */
@media (max-width: 768px) {
    /* Only apply when explicitly enabled */
    .sgbos-sidebar-wrapper.sgbos-mobile-full-width {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        padding: 0 !important;
    }
    
    .sgbos-mobile-full-width .sgbos-sidebar {
        width: 100vw !important;
        max-width: none !important;
        margin-left: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }
    
    .sgbos-mobile-full-width .sgbos-header {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
    }
    
    .sgbos-mobile-full-width .sgbos-offers-list {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
    }
    
    .sgbos-mobile-full-width .sgbos-offer-card {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    /* Default mobile layout - extra wide, centered, breaks out both sides symmetrically */
    .sgbos-sidebar-wrapper:not(.sgbos-mobile-full-width) {
        width: calc(100% + 2rem) !important;
        max-width: calc(100% + 2rem) !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        box-sizing: border-box;
    }
    
    .sgbos-sidebar-wrapper:not(.sgbos-mobile-full-width) .sgbos-sidebar {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== ELEMENTOR EDITOR COMPATIBILITY ===== */
.elementor-editor-active .sgbos-sidebar-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 200px !important;
}

.elementor-editor-active .sgbos-sidebar {
    display: block !important;
    visibility: visible !important;
}

/* ===== ELEMENTOR WIDGET CONTAINER OVERRIDES ===== */
.elementor-widget-slotsgamblersbonusofferssidebar {
    width: 100%;
}

.elementor-widget-slotsgamblersbonusofferssidebar .elementor-widget-container {
    width: 100%;
    max-width: 100%;
}

/* ===== PREVENT GLOBAL CONFLICTS ===== */
.sgbos-sidebar * {
    box-sizing: border-box;
}

.sgbos-sidebar a {
    text-decoration: none;
}

.sgbos-sidebar button {
    font-family: inherit;
}

/* ===== ACCESSIBILITY ===== */
.sgbos-cta-button:focus {
    outline: 2px solid var(--sgbos-color-green);
    outline-offset: 2px;
}

.sgbos-offer-card:focus-within {
    outline: 2px solid var(--sgbos-color-orange);
    outline-offset: 2px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 480px) {
    .sgbos-header-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .sgbos-header-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .sgbos-header-icon i {
        font-size: 1.25rem;
    }
    
    .sgbos-header-icon img {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .sgbos-header-title {
        font-size: 1rem;
    }
}

