/**
 * SW Premium Rich Footer Styles
 * Exclusive to SW Gaming Store
 */

.sw-footer {
    background: var(--color-surface, #ffffff);
    border-top: 1px solid var(--color-border, #e5e7eb);
    margin-top: 4rem;
    position: relative;
    color: var(--color-gray-700, #374151);
    font-size: 0.92rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
}

/* 1. Features Highlight Bar (Above Footer Columns) */
.sw-footer-features {
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding: 2rem 0;
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb, 8, 145, 178), 0.04) 0%, transparent 100%);
}

.sw-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.sw-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e5e7eb);
    transition: all 0.25s ease;
}

.sw-feature-item:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--color-primary-rgb, 8, 145, 178), 0.4);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb, 8, 145, 178), 0.08);
}

.sw-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--color-primary-rgb, 8, 145, 178), 0.12);
    color: var(--color-primary-600, #0891b2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sw-feature-icon svg {
    display: block;
}

.sw-feature-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-gray-900, #111827);
    margin: 0 0 0.2rem;
}

.sw-feature-text p {
    font-size: 0.8rem;
    color: var(--color-gray-500, #6b7280);
    margin: 0;
    line-height: 1.4;
}

/* 2. Main Footer Body */
.sw-footer-main {
    padding: 3.5rem 0 2rem;
}

.sw-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
}

/* On Desktop, sw-footer-links-wrap produces no extra wrapper box */
.sw-footer-links-wrap {
    display: contents;
}

/* Column 1: Brand */
.sw-footer-brand .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.sw-footer-brand .brand-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.sw-footer-brand .brand-logo span {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary-600, #0891b2);
    letter-spacing: -0.5px;
}

.sw-footer-bio {
    color: var(--color-gray-500, #6b7280);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    max-width: 320px;
}

.sw-footer-social {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.sw-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(var(--color-primary-rgb, 8, 145, 178), 0.08);
    color: var(--color-primary-600, #0891b2);
    border: 1px solid rgba(var(--color-primary-rgb, 8, 145, 178), 0.15);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sw-social-btn:hover {
    background: var(--color-primary-600, #0891b2);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 8, 145, 178), 0.25);
}

.sw-social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.sw-social-btn.telegram:hover {
    background: #229ED9;
    border-color: #229ED9;
    box-shadow: 0 4px 12px rgba(34, 158, 217, 0.3);
}

/* Columns 2 & 3: Links */
.sw-footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gray-900, #111827);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.6rem;
}

.sw-footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--color-primary-500, #06b6d4);
}

.sw-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sw-footer-links li {
    margin-bottom: 0.65rem;
}

.sw-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-gray-600, #4b5563);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}

.sw-footer-links a svg {
    color: var(--color-gray-400, #9ca3af);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.sw-footer-links a:hover {
    color: var(--color-primary-600, #0891b2);
    transform: translateX(-4px);
}

.sw-footer-links a:hover svg {
    color: var(--color-primary-600, #0891b2);
    transform: translateX(-2px);
}

/* Column 4: Payments & Security */
.sw-payment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.sw-pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: rgba(var(--color-primary-rgb, 8, 145, 178), 0.07);
    border: 1px solid rgba(var(--color-primary-rgb, 8, 145, 178), 0.12);
    color: var(--color-gray-700, #374151);
    font-size: 0.76rem;
    font-weight: 600;
}

.sw-support-cta-mini {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb, 8, 145, 178), 0.08) 0%, transparent 100%);
    border: 1px solid rgba(var(--color-primary-rgb, 8, 145, 178), 0.2);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sw-support-cta-mini p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-gray-600, #4b5563);
    line-height: 1.35;
}

.sw-support-cta-mini a {
    flex-shrink: 0;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: var(--color-primary-600, #0891b2);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sw-support-cta-mini a:hover {
    background: var(--color-primary-700, #0e7490);
    color: #ffffff;
    transform: translateY(-1px);
}

/* 3. Bottom Bar */
.sw-footer-bottom {
    border-top: 1px solid var(--color-border, #e5e7eb);
    padding: 1.25rem 0;
    background: rgba(var(--color-primary-rgb, 8, 145, 178), 0.02);
}

.sw-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--color-gray-500, #6b7280);
}

.sw-bottom-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(var(--color-primary-rgb, 8, 145, 178), 0.08);
    color: var(--color-primary-700, #0e7490);
    font-weight: 600;
}

/* ==========================================================================
   Dark Mode Overrides
   ========================================================================== */
html.dark .sw-footer {
    background: #111827;
    border-top-color: #1f2937;
    color: #9ca3af;
}

html.dark .sw-footer-features {
    border-bottom-color: #1f2937;
    background: linear-gradient(180deg, rgba(8, 145, 178, 0.1) 0%, transparent 100%);
}

html.dark .sw-feature-item {
    background: #1f2937;
    border-color: #374151;
}

html.dark .sw-feature-item:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 6px 16px rgba(8, 145, 178, 0.2);
}

html.dark .sw-feature-text h4 {
    color: #f3f4f6;
}

html.dark .sw-feature-text p {
    color: #9ca3af;
}

html.dark .sw-footer-col h3 {
    color: #f9fafb;
}

html.dark .sw-footer-links a {
    color: #9ca3af;
}

html.dark .sw-footer-links a:hover {
    color: #38bdf8;
}

html.dark .sw-social-btn {
    background: #1f2937;
    border-color: #374151;
    color: #38bdf8;
}

html.dark .sw-pay-badge {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

html.dark .sw-support-cta-mini {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15) 0%, #1f2937 100%);
    border-color: rgba(8, 145, 178, 0.3);
}

html.dark .sw-support-cta-mini p {
    color: #d1d5db;
}

html.dark .sw-footer-bottom {
    border-top-color: #1f2937;
    background: #0b1120;
    color: #6b7280;
}

html.dark .sw-bottom-badge {
    background: rgba(8, 145, 178, 0.15);
    color: #38bdf8;
}

/* ==========================================================================
   Desktop Sidebar Offset (Matches .content-wrapper on screens > 992px)
   ========================================================================== */
@media (min-width: 993px) {
    body:not(.topbar-only-layout) .sw-footer {
        margin-right: 70px;
        transition: margin-right var(--transition-smooth, 0.3s ease);
    }

    body:not(.topbar-only-layout).sidenav-toggled .sw-footer {
        margin-right: 265px;
    }
}

/* ==========================================================================
   Responsive / Mobile Rules
   ========================================================================== */
@media (max-width: 992px) {
    .sw-footer {
        margin-top: 3rem;
    }

    .sw-footer-features {
        padding: 1.5rem 0;
    }

    .sw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .sw-footer-main {
        padding: 2.5rem 0 1.5rem;
    }

    .sw-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .sw-footer-links-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sw-footer {
        margin-top: 2.5rem;
        margin-bottom: 0;
    }

    /* Compact 2x2 Feature Highlights Bar */
    .sw-footer-features {
        padding: 1.25rem 0;
    }

    .sw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .sw-feature-item {
        padding: 0.75rem 0.85rem;
        border-radius: 12px;
        gap: 0.65rem;
    }

    .sw-feature-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .sw-feature-icon svg {
        width: 18px;
        height: 18px;
    }

    .sw-feature-text h4 {
        font-size: 0.82rem;
        margin-bottom: 0.15rem;
    }

    .sw-feature-text p {
        font-size: 0.7rem;
        line-height: 1.35;
    }

    /* Main Footer Container */
    .sw-footer-main {
        padding: 2rem 0 1.25rem;
    }

    .sw-footer-grid {
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
    }

    /* Brand Section centered on mobile */
    .sw-footer-brand {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .sw-footer-brand .brand-logo {
        justify-content: center;
        margin-bottom: 0.65rem;
    }

    .sw-footer-brand .brand-logo img {
        height: 36px;
    }

    .sw-footer-brand .brand-logo span {
        font-size: 1.25rem;
    }

    .sw-footer-bio {
        text-align: center;
        margin: 0 auto 1.15rem;
        font-size: 0.82rem;
        line-height: 1.6;
        max-width: 340px;
    }

    .sw-footer-social {
        justify-content: center;
        gap: 0.65rem;
    }

    .sw-social-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    /* 2 Columns Side-by-Side for Quick Links and Policies */
    .sw-footer-links-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        padding: 0.5rem 0;
        border-top: 1px solid var(--color-border, #e5e7eb);
        border-bottom: 1px solid var(--color-border, #e5e7eb);
    }

    html.dark .sw-footer-links-wrap {
        border-color: #1f2937;
    }

    .sw-footer-col h3 {
        font-size: 0.92rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.45rem;
    }

    .sw-footer-col h3::after {
        width: 22px;
        height: 2px;
    }

    .sw-footer-links li {
        margin-bottom: 0.45rem;
    }

    .sw-footer-links a {
        font-size: 0.82rem;
        padding: 0.2rem 0;
        gap: 0.35rem;
    }

    .sw-footer-links a svg {
        width: 12px;
        height: 12px;
    }

    /* Payments & Support */
    .sw-footer-col-payment h3 {
        margin-bottom: 0.75rem;
    }

    .sw-payment-badges {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .sw-pay-badge {
        font-size: 0.72rem;
        padding: 0.3rem 0.55rem;
        border-radius: 7px;
    }

    .sw-support-cta-mini {
        padding: 0.75rem 0.9rem;
        border-radius: 12px;
        gap: 0.65rem;
    }

    .sw-support-cta-mini p {
        font-size: 0.78rem;
    }

    .sw-support-cta-mini a {
        padding: 0.4rem 0.85rem;
        font-size: 0.75rem;
    }

    /* Seamless Bottom Bar with Safe Space for Bottom Navigation */
    .sw-footer-bottom {
        padding: 1.25rem 0 calc(85px + env(safe-area-inset-bottom, 0px));
        margin-bottom: 0;
    }

    .sw-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.65rem;
        font-size: 0.78rem;
    }

    .sw-bottom-badge {
        font-size: 0.74rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .sw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .sw-feature-item {
        padding: 0.65rem 0.6rem;
        border-radius: 10px;
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .sw-feature-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .sw-feature-icon svg {
        width: 16px;
        height: 16px;
    }

    .sw-feature-text h4 {
        font-size: 0.78rem;
        margin-bottom: 0.1rem;
    }

    .sw-feature-text p {
        font-size: 0.68rem;
        line-height: 1.3;
    }

    .sw-footer-links-wrap {
        gap: 0.85rem;
    }

    .sw-footer-links a {
        font-size: 0.8rem;
    }
}

