/*!
 * SlotsJuice Hero Widget CSS
 * Optimized for speed and responsiveness
 * Version: 1.0.0
 */

/* 1. CSS Variables - SlotsJuice Brand Identity */
.slotsjuicehero-widget {
    --juice-orange: #FF6B35;
    --juice-orange-dark: #E55A2B;
    --juice-orange-light: #FF8A65;
    --juice-cream: #FFF8E1;
    --juice-green: #2E7D32;
    --juice-white: #FFFFFF;
    --juice-dark: #1A1A1A;
    --juice-gradient: linear-gradient(135deg, #FF6B35, #E55A2B);
    --juice-gradient-hero: linear-gradient(135deg, #FF6B35 0%, #E55A2B 50%, #FF8A65 100%);
    --juice-radius: 12px;
    --juice-radius-large: 20px;
    --juice-radius-drop: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

/* 2. Widget Container */
.slotsjuicehero-widget {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFFFFF 50%, #F5F5F5 100%);
    border: 3px solid var(--juice-orange);
    border-radius: var(--juice-radius-large);
    padding: 0;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(255, 107, 53, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
}

.slotsjuicehero-widget * {
    box-sizing: border-box;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 3. Layout Components */
.slotsjuicehero-widget .container {
    max-width: 1326px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Floating Background Elements */
.slotsjuicehero-widget .floating-drops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.slotsjuicehero-widget .drop {
    position: absolute;
    font-size: 2rem;
    color: var(--juice-orange-light);
    opacity: 0.15;
    animation: dropFloat 6s ease-in-out infinite;
    z-index: 1;
}

.slotsjuicehero-widget .drop:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.slotsjuicehero-widget .drop:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.slotsjuicehero-widget .drop:nth-child(3) {
    top: 40%;
    left: 85%;
    animation-delay: 4s;
}

.slotsjuicehero-widget .drop:nth-child(4) {
    top: 80%;
    left: 15%;
    animation-delay: 1s;
}

.slotsjuicehero-widget .drop:nth-child(5) {
    top: 25%;
    left: 50%;
    animation-delay: 3s;
}

@keyframes dropFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1) rotate(0deg);
        filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.3));
    }
    50% { 
        transform: translateY(-25px) scale(1.1) rotate(10deg);
        filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
    }
}

/* 4. Hero Section */
.slotsjuicehero-widget .hero {
    padding: 15px 0 40px;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    width: 100%;
}

.slotsjuicehero-widget .hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    z-index: 2;
}

/* Hero Text Section */
.slotsjuicehero-widget .hero-text {
    max-width: 100%;
    text-align: left;
    width: 100%;
    overflow: hidden;
}

.slotsjuicehero-widget .hero-title {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 15px;
    line-height: 1.2;
    /* Fallback color */
    color: #FF6B35;
    /* Gradient background */
    background: -webkit-linear-gradient(135deg, #FF6B35 0%, #E55A2B 50%, #FF8A65 100%);
    background: -moz-linear-gradient(135deg, #FF6B35 0%, #E55A2B 50%, #FF8A65 100%);
    background: linear-gradient(135deg, #FF6B35 0%, #E55A2B 50%, #FF8A65 100%);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .slotsjuicehero-widget .hero-title {
        color: #FF6B35;
        background: none;
    }
}

.slotsjuicehero-widget .hero-subtitle {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #555;
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.slotsjuicehero-widget .hero-highlight {
    color: var(--juice-orange);
    font-weight: 700;
}

.slotsjuicehero-widget .hero-subtitle .hero-highlight {
    color: var(--juice-orange);
    font-weight: 700;
}

/* Search Section */
.slotsjuicehero-widget .search-section {
    margin: 25px 0;
    width: 100%;
}

.slotsjuicehero-widget .search-container {
    display: flex;
    align-items: center;
    background: var(--juice-white);
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 50px;
    padding: 8px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.slotsjuicehero-widget .search-container:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.15);
}

.slotsjuicehero-widget .search-container i {
    padding: 0 15px;
    color: var(--juice-orange);
    font-size: 1.1rem;
}

.slotsjuicehero-widget .search-container input {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    color: var(--juice-dark);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
}

.slotsjuicehero-widget .search-container input::placeholder {
    color: #999;
}

.slotsjuicehero-widget .search-btn {
    background: var(--juice-gradient);
    color: var(--juice-white);
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slotsjuicehero-widget .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

/* Top Casinos Section */
.slotsjuicehero-widget .top-casinos-section {
    margin: 30px 0 0 0;
}

.slotsjuicehero-widget .section-badge {
    display: inline-block;
    background: var(--juice-gradient-hero);
    color: var(--juice-white);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
    width: auto;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slotsjuicehero-widget .section-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Casino Carousel */
.slotsjuicehero-widget .casino-carousel {
    position: relative;
    width: 100%;
    max-width: calc(7 * 182px + 6 * 15px + 40px);
}

.slotsjuicehero-widget .carousel-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 15px 0;
    cursor: grab;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: calc(7 * 182px + 6 * 15px);
    max-width: calc(7 * 182px + 6 * 15px);
}

.slotsjuicehero-widget .carousel-container::-webkit-scrollbar {
    display: none;
}

.slotsjuicehero-widget .carousel-container.active {
    cursor: grabbing;
}

/* Casino Cards */
.slotsjuicehero-widget .casino-card {
    background: var(--juice-white);
    border: 2px solid rgba(255, 107, 53, 0.15);
    border-radius: var(--juice-radius-large);
    padding: 14px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 182px;
    min-width: 182px;
    cursor: inherit;
}

.slotsjuicehero-widget .casino-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--juice-gradient);
    border-radius: var(--juice-radius-large) var(--juice-radius-large) 0 0;
}

.slotsjuicehero-widget .casino-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.3);
}

.slotsjuicehero-widget .casino-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: rgba(255, 248, 225, 0.5);
    border-radius: var(--juice-radius);
    padding: 8px;
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.slotsjuicehero-widget .casino-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.slotsjuicehero-widget .casino-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--juice-dark);
    text-align: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slotsjuicehero-widget .casino-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.slotsjuicehero-widget .rating-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--juice-orange);
    background: rgba(255, 107, 53, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slotsjuicehero-widget .rating-stars {
    display: flex;
    gap: 2px;
}

.slotsjuicehero-widget .rating-stars i {
    font-size: 0.75rem;
    color: var(--juice-orange);
}

.slotsjuicehero-widget .casino-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    margin-bottom: 12px;
}

.slotsjuicehero-widget .stat-item {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slotsjuicehero-widget .casino-actions {
    display: flex;
    gap: 6px;
}

/* Fallback for narrow cards - stack buttons vertically if needed */
@media (max-width: 767px) {
    .slotsjuicehero-widget .casino-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .slotsjuicehero-widget .play-btn,
    .slotsjuicehero-widget .review-btn {
        width: 100%;
        flex: none;
        padding: 6px 8px;
        font-size: 0.65rem;
    }
}

.slotsjuicehero-widget .play-btn {
    flex: 1;
    background: var(--juice-gradient);
    color: var(--juice-white);
    border: none;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slotsjuicehero-widget .play-btn:hover {
    background: linear-gradient(135deg, var(--juice-orange-dark), #c0392b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    text-decoration: none;
    color: var(--juice-white);
}

.slotsjuicehero-widget .review-btn {
    flex: 1;
    background: transparent;
    color: var(--juice-green);
    border: 1px solid var(--juice-green);
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slotsjuicehero-widget .review-btn:hover {
    background: var(--juice-green);
    color: var(--juice-white);
    transform: translateY(-1px);
    text-decoration: none;
}

.slotsjuicehero-widget .casino-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--juice-gradient);
    color: var(--juice-white);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.65rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Carousel Navigation */
.slotsjuicehero-widget .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--juice-gradient);
    border: none;
    border-radius: 50%;
    color: var(--juice-white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.slotsjuicehero-widget .carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.slotsjuicehero-widget .carousel-prev {
    left: -10px;
}

.slotsjuicehero-widget .carousel-next {
    right: 0px;
}

/* Page entrance animation - removed for instant display */
.slotsjuicehero-widget {
    opacity: 1;
    transform: translateY(0);
}

.slotsjuicehero-widget.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Responsive Design (Mobile First) - Optimized for compact mobile layout */
@media (max-width: 479px) {
    .slotsjuicehero-widget {
        margin: 10px 0;
        border-left: none;
        border-right: none;
        border-radius: var(--juice-radius-large);
        padding: 0;
    }
    
    .slotsjuicehero-widget .container { 
        padding: 0 10px;
        width: 100%;
    }
    
    .slotsjuicehero-widget .hero { 
        padding: 15px 10px 25px; 
        margin: 0;
    }
    
    .slotsjuicehero-widget .hero-content { 
        grid-template-columns: 1fr; 
        gap: 20px; 
    }
    
    .slotsjuicehero-widget .hero-title { 
        font-size: 1.3rem; 
        letter-spacing: -0.2px;
        text-align: center;
        word-break: break-word;
        line-height: 1.3;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .slotsjuicehero-widget .hero-subtitle { 
        text-align: center; 
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .slotsjuicehero-widget .search-container { 
        max-width: 100%;
        width: 100%;
        padding: 6px;
        flex-wrap: wrap;
    }
    
    .slotsjuicehero-widget .search-container input { 
        padding: 10px 0; 
        font-size: 0.85rem;
        min-width: 0;
        flex: 1;
    }
    
    .slotsjuicehero-widget .search-container input::placeholder {
        font-size: 0.8rem;
    }
    
    .slotsjuicehero-widget .search-btn { 
        padding: 10px 14px; 
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .slotsjuicehero-widget .section-badge { 
        font-size: 0.85rem; 
        padding: 8px 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
        line-height: 1.3;
        width: 100%;
        max-width: 100%;
    }
    
    .slotsjuicehero-widget .casino-carousel { 
        max-width: calc(100vw - 60px);
        width: 100%;
    }
    
    .slotsjuicehero-widget .carousel-container { 
        gap: 12px;
        width: auto;
        max-width: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .slotsjuicehero-widget .casino-card { 
        flex: 0 0 187px; 
        min-width: 187px; 
        padding: 14px;
        scroll-snap-align: center;
    }
    
    .slotsjuicehero-widget .casino-actions {
        flex-direction: column;
        gap: 3px;
    }
    
    .slotsjuicehero-widget .play-btn,
    .slotsjuicehero-widget .review-btn {
        width: 100%;
        flex: none;
        padding: 5px 6px;
        font-size: 0.6rem;
        letter-spacing: 0.2px;
    }
    
    .slotsjuicehero-widget .carousel-btn { 
        width: 38px; 
        height: 38px; 
        font-size: 0.9rem; 
    }
    
    .slotsjuicehero-widget .carousel-prev { left: 0px; }
    .slotsjuicehero-widget .carousel-next { right: 0px; }
}

@media (max-width: 767px) {
    .slotsjuicehero-widget {
        margin: 15px 0;
        border-left: none;
        border-right: none;
        border-radius: var(--juice-radius-large);
    }
    
    .slotsjuicehero-widget .container { 
        padding: 0 12px;
        width: 100%;
    }
    
    .slotsjuicehero-widget .hero { 
        padding: 20px 15px 35px; 
        margin: 0;
    }
    
    .slotsjuicehero-widget .hero-content { 
        grid-template-columns: 1fr; 
        gap: 25px; 
    }
    
    .slotsjuicehero-widget .hero-title { 
        font-size: 1.5rem; 
        text-align: center;
        word-break: break-word;
        line-height: 1.3;
        width: 100%;
    }
    
    .slotsjuicehero-widget .hero-subtitle { 
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
    }
    
    .slotsjuicehero-widget .casino-carousel { 
        max-width: calc(100vw - 40px);
        width: 100%;
    }
    
    .slotsjuicehero-widget .carousel-container {
        width: auto;
        max-width: none;
        gap: 15px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .slotsjuicehero-widget .casino-card { 
        flex: 0 0 198px; 
        min-width: 198px;
        scroll-snap-align: center;
    }
    
    .slotsjuicehero-widget .casino-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .slotsjuicehero-widget .play-btn,
    .slotsjuicehero-widget .review-btn {
        width: 100%;
        flex: none;
        padding: 6px 8px;
        font-size: 0.65rem;
        letter-spacing: 0.2px;
    }
    
    .slotsjuicehero-widget .carousel-btn { 
        width: 40px; 
        height: 40px; 
    }
    
    .slotsjuicehero-widget .carousel-prev { left: -2px; }
    .slotsjuicehero-widget .carousel-next { right: 0px; }
}

@media (max-width: 1023px) {
    .slotsjuicehero-widget .hero-content { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }
    
    .slotsjuicehero-widget .hero-title { 
        font-size: 1.7rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .slotsjuicehero-widget .casino-carousel { 
        max-width: calc(5 * 182px + 4 * 15px + 40px); 
    }
    
    .slotsjuicehero-widget .carousel-container {
        width: calc(5 * 182px + 4 * 15px);
        max-width: calc(5 * 182px + 4 * 15px);
        gap: 15px;
    }
}

@media (max-width: 1199px) {
    .slotsjuicehero-widget .hero-title { 
        font-size: 1.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .slotsjuicehero-widget .hero-content { gap: 35px; }
    
    .slotsjuicehero-widget .casino-carousel { 
        max-width: calc(6 * 182px + 5 * 15px + 40px); 
    }
    
    .slotsjuicehero-widget .carousel-container {
        width: calc(6 * 182px + 5 * 15px);
        max-width: calc(6 * 182px + 5 * 15px);
        gap: 15px;
    }
}

/* 6. Performance Optimizations */
.slotsjuicehero-widget .casino-card,
.slotsjuicehero-widget .carousel-btn,
.slotsjuicehero-widget .search-btn,
.slotsjuicehero-widget .play-btn,
.slotsjuicehero-widget .review-btn {
    will-change: transform;
}

.slotsjuicehero-widget .carousel-container {
    contain: layout style paint;
}

.slotsjuicehero-widget .hero {
    contain: layout;
}

/* 7. Accessibility Improvements */
.slotsjuicehero-widget .carousel-btn:focus,
.slotsjuicehero-widget .search-btn:focus,
.slotsjuicehero-widget .play-btn:focus,
.slotsjuicehero-widget .review-btn:focus {
    outline: 2px solid var(--juice-orange);
    outline-offset: 2px;
}

.slotsjuicehero-widget .search-container input:focus {
    outline: none;
}

/* 8. Print Styles */
@media print {
    .slotsjuicehero-widget .floating-drops,
    .slotsjuicehero-widget .carousel-btn {
        display: none;
    }
    
    .slotsjuicehero-widget .hero {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* 9. Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .slotsjuicehero-widget .hero-subtitle {
        color: #ccc;
    }
    
    .slotsjuicehero-widget .stat-item {
        color: #aaa;
    }
}