/**
 * Zhex Site Footer Styles
 * All selectors scoped under #zhex-footer
 * Dark theme, no border-radius on large elements
 */

/* Hide Flatsome default footer bar */
.absolute-footer {
    display: none !important;
}

/* ========================================
   VARIABLES & WRAPPER
   ======================================== */

#zhex-footer {
    --ft-bg: #0d0d0d;
    --ft-surface: #141414;
    --ft-border: #1e1e1e;
    --ft-text: #a0a0a0;
    --ft-text-dim: #666;
    --ft-text-bright: #e0e0e0;
    --ft-accent: #6aa9ff;
    --ft-link-hover: #ffffff;
    --ft-bottom-bg: #080808;

    background: var(--ft-bg);
    color: var(--ft-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--ft-border);
    width: 100%;
}

/* Reset */
#zhex-footer *,
#zhex-footer *::before,
#zhex-footer *::after {
    box-sizing: border-box;
}

#zhex-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#zhex-footer a {
    text-decoration: none;
    color: inherit;
}

#zhex-footer p {
    margin: 0;
}

#zhex-footer button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* ========================================
   INNER & CONTAINER
   ======================================== */

#zhex-footer .zhex-ft-inner {
    padding: 48px 0 40px;
}

#zhex-footer .zhex-ft-container {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   GRID LAYOUT — 75% / 25%
   ======================================== */

#zhex-footer .zhex-ft-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 769px) {
    #zhex-footer .zhex-ft-grid {
        grid-template-columns: 3fr 1fr;
        gap: 48px;
    }
}

/* ========================================
   SECTION HEADINGS
   ======================================== */

#zhex-footer .zhex-ft-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ft-text-bright);
    padding: 12px 0;
    border-bottom: 1px solid var(--ft-border);
    margin-bottom: 16px;
}

#zhex-footer .zhex-ft-heading span {
    display: block;
}

/* Chevron — hidden on desktop */
#zhex-footer .zhex-ft-chevron {
    display: none;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

/* ========================================
   COLLAPSIBLE BODY — mobile accordion
   ======================================== */

#zhex-footer .zhex-ft-collapsible {
    overflow: hidden;
}

#zhex-footer .zhex-ft-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: -16px;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

#zhex-footer .zhex-ft-body {
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
    max-height: 2000px;
    opacity: 1;
    margin-top: 0;
}

#zhex-footer .zhex-ft-toggle[aria-expanded="false"] .zhex-ft-chevron {
    transform: rotate(-90deg);
}

#zhex-footer .zhex-ft-toggle[aria-expanded="true"] .zhex-ft-chevron {
    transform: rotate(0deg);
}

/* ========================================
   GAMES GRID — 5 columns max
   ======================================== */

#zhex-footer .zhex-ft-game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

@media (min-width: 480px) {
    #zhex-footer .zhex-ft-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) {
    #zhex-footer .zhex-ft-game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    #zhex-footer .zhex-ft-game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

#zhex-footer .zhex-ft-game-grid li {
    padding: 0;
}

/* Game link — accent bar ALWAYS visible, slides on hover */
#zhex-footer .zhex-ft-game-grid a {
    display: block;
    padding: 7px 0 7px 12px;
    font-size: 13px;
    color: var(--ft-text);
    position: relative;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

/* Accent bar — always visible */
#zhex-footer .zhex-ft-game-grid a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40%;
    background: var(--ft-border);
    transition: height 0.2s ease, background 0.2s ease;
}

/* Hover — slide right + bar grows + color changes */
#zhex-footer .zhex-ft-game-grid a:hover {
    color: var(--ft-link-hover);
    padding-left: 18px;
}

#zhex-footer .zhex-ft-game-grid a:hover::before {
    height: 70%;
    background: var(--ft-accent);
}

/* ========================================
   INFO COLUMN — About + Quick Links
   ======================================== */

#zhex-footer .zhex-ft-col--info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#zhex-footer .zhex-ft-about-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ft-text-dim);
}

/* ========================================
   QUICK LINKS — 2x2 grid
   ======================================== */

#zhex-footer .zhex-ft-link-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

#zhex-footer .zhex-ft-link-grid li {
    padding: 0;
}

#zhex-footer .zhex-ft-link-grid a {
    display: block;
    padding: 7px 0 7px 12px;
    font-size: 13px;
    color: var(--ft-text);
    position: relative;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

/* Accent bar — always visible */
#zhex-footer .zhex-ft-link-grid a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40%;
    background: var(--ft-border);
    transition: height 0.2s ease, background 0.2s ease;
}

#zhex-footer .zhex-ft-link-grid a:hover {
    color: var(--ft-link-hover);
    padding-left: 18px;
}

#zhex-footer .zhex-ft-link-grid a:hover::before {
    height: 70%;
    background: var(--ft-accent);
}

/* ========================================
   BOTTOM BAR — 3 columns: copyright | discord | payments
   ======================================== */

#zhex-footer .zhex-ft-bottom {
    background: var(--ft-bottom-bg);
    border-top: 1px solid var(--ft-border);
    padding: 16px 0;
}

#zhex-footer .zhex-ft-bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 769px) {
    #zhex-footer .zhex-ft-bottom-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 20px;
    }
}

#zhex-footer .zhex-ft-copyright {
    font-size: 12px;
    color: var(--ft-text-dim);
    text-align: center;
}

@media (min-width: 769px) {
    #zhex-footer .zhex-ft-copyright {
        text-align: left;
    }
}

/* ========================================
   SOCIAL — centered in bottom bar
   ======================================== */

#zhex-footer .zhex-ft-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#zhex-footer .zhex-ft-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--ft-text-dim);
    transition: color 0.2s ease, transform 0.2s ease;
}

#zhex-footer .zhex-ft-social-link:hover {
    color: var(--ft-link-hover);
    transform: scale(1.15);
}

#zhex-footer .zhex-ft-social-link svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   PAYMENT ICONS — bordered cards, right side
   ======================================== */

#zhex-footer .zhex-ft-payments {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 769px) {
    #zhex-footer .zhex-ft-payments {
        justify-content: flex-end;
    }
}

#zhex-footer .zhex-ft-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 30px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--ft-text-dim);
    opacity: 0.6;
    transition: opacity 0.25s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

#zhex-footer .zhex-ft-pay-icon svg {
    width: 100%;
    height: 100%;
}

#zhex-footer .zhex-ft-pay-icon:hover {
    opacity: 1;
    color: var(--ft-text-bright);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* ========================================
   MOBILE — max-width: 768px
   ======================================== */

@media (max-width: 768px) {

    #zhex-footer .zhex-ft-inner {
        padding: 32px 0 24px;
    }

    #zhex-footer .zhex-ft-chevron {
        display: block;
    }

    #zhex-footer .zhex-ft-heading {
        padding: 14px 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    #zhex-footer .zhex-ft-game-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #zhex-footer .zhex-ft-game-grid a {
        padding: 8px 4px 8px 12px;
    }

    #zhex-footer .zhex-ft-link-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    #zhex-footer .zhex-ft-game-grid {
        grid-template-columns: 1fr;
    }
}
