/*
Theme Name: sweepd
Theme URI: https://sweepd.com
Author: Stepfox
Author URI: https://stepfoxthemes.com
Description: Dark, modern sweepstakes casino block theme. Fully responsive with gradient accents, glow effects, and animated UI elements. Built for the WordPress Site Editor with stepfox-looks integration.
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sweepd
Domain Path: /languages
Tags: blog, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks, full-site-editing
*/

/* ── Reset ── */
.wp-block-post-template > .wp-block-post {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* ── Gradient Text ── */
.gradient-text,
.gradient-text * {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ── Card Glow Top Border ── */
.is-style-playsweeps-card-glow {
    position: relative;
    overflow: hidden;
}
.is-style-playsweeps-card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
    z-index: 2;
    pointer-events: none;
}

/* ── Casino Card Hover ── */
.is-style-playsweeps-casino-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}
.is-style-playsweeps-casino-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

/* ── Stats Grid: 2x2 on mobile ── */
@media (max-width: 781px) {
    .stats-grid-2x2.wp-block-columns {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 8px !important;
    }
    .stats-grid-2x2.wp-block-columns > .wp-block-column {
        flex-basis: calc(50% - 4px) !important;
        flex-grow: 0 !important;
    }
}

/* ── Casino Card columns: mobile stacking ── */
@media (max-width: 781px) {
    .casino-card-cols.wp-block-columns {
        gap: 20px !important;
    }
    .casino-card-cols.wp-block-columns > .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* ── Stat box inner spacing: match design's tight layout ── */
.stats-grid-2x2 .wp-block-group.is-layout-constrained > * {
    margin-block-start: 2px !important;
}
.stats-grid-2x2 .wp-block-group.is-layout-constrained > :first-child {
    margin-block-start: 0 !important;
}

/* ── Bonus Badge Pulse ── */
.bonus-badge-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.6); }
}

/* ── CTA Button Shine ── */
.is-style-playsweeps-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.is-style-playsweeps-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}
.is-style-playsweeps-cta:hover::before {
    left: 100%;
}
.is-style-playsweeps-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* ── Secondary Button ── */
.is-style-playsweeps-secondary {
    transition: all 0.3s ease;
}
.is-style-playsweeps-secondary:hover {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: #22c55e !important;
}

/* ── Rating Stars ── */
.rating-stars {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* ── Feature Icon Box ── */
.feature-icon-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ── Stat Card ── */
.stat-card-style {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ── Nav Link Underline Effect ── */
.nav-link-effect {
    position: relative;
    transition: color 0.3s ease;
}
.nav-link-effect::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.3s ease;
}
.nav-link-effect:hover::after {
    width: 100%;
}

/* ── Game Card Hover ── */
.game-card-hover {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}
.game-card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

/* ── Floating Decorative Animation ── */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ── Game Categories: 2 cols mobile, 3 cols tablet ── */
@media (max-width: 781px) {
    .game-grid-mobile.wp-block-columns {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 16px !important;
    }
    .game-grid-mobile.wp-block-columns > .wp-block-column {
        flex-basis: calc(50% - 8px) !important;
        flex-grow: 0 !important;
    }
}
@media (min-width: 782px) and (max-width: 1024px) {
    .game-grid-mobile.wp-block-columns {
        flex-wrap: wrap !important;
    }
    .game-grid-mobile.wp-block-columns > .wp-block-column {
        flex-basis: calc(33.333% - 11px) !important;
        flex-grow: 0 !important;
    }
}

/* ── Footer: 2 cols on mobile ── */
@media (max-width: 781px) {
    .footer-grid-mobile.wp-block-columns {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 32px !important;
    }
    .footer-grid-mobile.wp-block-columns > .wp-block-column {
        flex-basis: calc(50% - 16px) !important;
        flex-grow: 0 !important;
    }
}

/* ── Casino Query: Card refinements ── */
.ps-query-card {
    position: relative;
}

/* Kill ALL default WP spacing inside query cards */
.ps-query-card .wp-block-post-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.25 !important;
}
.ps-query-card .wp-block-group.is-layout-constrained > * + * {
    margin-block-start: 0 !important;
}
.ps-query-card .wp-block-group.is-layout-flex {
    gap: inherit;
}
/* Remove WP constrained layout max-width so children fill parent */
.ps-query-card .wp-block-group.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none;
}

/* ── Score orb: absolute centering ── */
.ps-score-orb.wp-block-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    text-align: center !important;
}
.ps-score-orb.wp-block-group > * {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    text-align: center !important;
    width: auto !important;
}
/* Let the paragraph keep its styles */
.ps-score-orb .has-text-align-center {
    width: auto !important;
}
/* Score number div */
.ps-score-orb [class*="metafield"] {
    text-align: center !important;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
}

/* ── Deal description box ── */
.ps-deal-box {
    transition: background-color 0.3s ease;
}
.ps-deal-box > * + * {
    margin-block-start: 4px !important;
}

/* ── Bottom row ── */
.ps-query-card .wp-block-read-more {
    white-space: nowrap;
    transition: color 0.2s ease;
    font-size: 11px;
}
.ps-query-card .wp-block-read-more:hover {
    color: #8b5cf6 !important;
}

/* ── Tighter post template spacing ── */
.wp-block-post-template .ps-query-card {
    margin-bottom: 0 !important;
}

/* ── Casino Query: Auto-numbered rank badges ── */
.wp-block-post-template {
    counter-reset: casino-rank;
}
.wp-block-post-template > .wp-block-post {
    counter-increment: casino-rank;
}
.casino-rank-badge::before {
    content: "#" counter(casino-rank);
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

/* ── Casino Query: card spacing in loop ── */
.wp-block-post-template .is-style-playsweeps-casino-card {
    margin-bottom: 0;
}

/* ── Casino Query: mobile layout ── */
@media (max-width: 781px) {
    .ps-query-card .casino-card-cols.wp-block-columns {
        gap: 16px !important;
    }
    .ps-query-card .casino-card-cols.wp-block-columns > .wp-block-column {
        flex-basis: 100% !important;
    }
    .ps-query-card .bonus-badge-glow {
        margin-bottom: 8px !important;
    }
}

/* ── Query cards: full-width buttons ── */
.ps-query-card .wp-block-buttons {
    width: 100%;
}
.ps-query-card .wp-block-button {
    width: 100%;
}
.ps-query-card .wp-block-button .wp-block-button__link {
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Query cards: consistent column alignment ── */
.ps-query-card .casino-card-cols.wp-block-columns {
    align-items: center;
    width: 100%;
}

/* ── Query cards: left column logo centering ── */
.ps-query-card .wp-block-group.is-layout-flex[style*="vertical"] {
    align-items: center;
}

/* ── Query cards: bonus badge centering ── */
.ps-query-card .bonus-badge-glow {
    text-align: center;
}
.ps-query-card .bonus-badge-glow > * {
    text-align: center !important;
}

/* ── Query cards: right column stretch children ── */
.ps-query-card .wp-block-group.is-layout-flex[class*="ps-q-right"] > * {
    width: 100%;
}

/* ── Query cards: deal box fill available space ── */
.ps-query-card .ps-deal-box {
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Query cards: tighter internal spacing ── */
.ps-query-card .wp-block-group.is-layout-constrained > * {
    margin-block-start: 0 !important;
}
.ps-query-card p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ── Scrollbar Hide ── */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
