/* GameMall footer: quiet, compact, Apple-style structure, but dressed like the
 * header: white surface, same #e8e8ec hairline, same logo size, same 1200px
 * shell and pill hover. Red only in the logo (see gamemall-brand ui-spec).
 * Tokens come from header.css (--gm-*), with fallbacks for pages without it. */
.fp-footer {
    --fp-ink: var(--gm-ink, #111318);
    --fp-slate: var(--gm-slate, #4a4d57);
    /* Readable secondary text: --gm-muted (#8a8d96, 3.3:1 on white) is only for
       disabled text, so the footer uses a grey that meets 4.5:1 (5.1:1). */
    --fp-muted: #6b6e78;
    --fp-line: #e8e8ec;
    --fp-chip: #f2f2f5;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0 24px;
    color: var(--fp-slate);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    background: #fff;
    border-top: 1px solid var(--fp-line);
}

.fp-footer * {
    box-sizing: border-box;
}

.fp-footer .fp-container {
    display: block;
    width: 100%;
    /* The header's 1200px container includes its 24px gutters; the footer
     * puts its gutters on .fp-footer, so the content box is 1152px. This keeps
     * both logos on the same left edge on wide screens. */
    max-width: 1152px;
    margin: 0 auto;
    padding: 0;
}

.fp-footer a:focus-visible,
.fp-footer summary:focus-visible {
    outline: 2px solid var(--fp-ink);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Intro: logo + one-line positioning ---------- */
.fp-footer .fp-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 40px 0 28px;
    border-bottom: 1px solid var(--fp-line);
}

.fp-footer .fp-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: auto;
    text-decoration: none;
}

.fp-footer .fp-logo-img {
    display: block;
    width: 30px;
    height: 30px;
}

.fp-footer .gm-logo-word {
    font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--fp-ink);
    white-space: nowrap;
}

.fp-footer .gm-logo-word span {
    color: var(--gm-red, #e60012);
}

.fp-footer .fp-intro-text {
    max-width: 720px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--fp-slate);
}

.fp-footer .fp-platform-title {
    margin-right: 0.35em;
    font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
    color: var(--fp-ink);
}

.fp-footer .fp-platform-highlight {
    margin-left: 0.3em;
    color: var(--gm-green, #087a38);
}

/* Community icons (hidden while channel URLs are empty). */
.fp-footer .fp-social {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.fp-footer .fp-social-icon {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fp-ink);
    transition: background-color 0.15s ease;
}

.fp-footer .fp-social-icon:hover {
    background: #2a2d35;
}

.fp-footer .fp-social-icon::before {
    content: '';
    position: absolute;
    inset: 7px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fp-footer .fp-facebook::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 21v-7.8h2.6l.4-3h-3V8.3c0-.9.2-1.5 1.5-1.5h1.6V4.1c-.8-.1-1.6-.2-2.4-.2-2.4 0-4.1 1.5-4.1 4.1v2.2H7.9v3h2.7V21h2.9Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-twitter::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.4 3h3.1l-6.8 7.8 8 10.2h-6.3l-4.9-6.2L4.9 21H1.8L9 12.8 1.3 3h6.4l4.4 5.7L17.4 3Zm-1.1 16.2H18L6.8 4.7H5l11.3 14.5Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-youtube::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.5 7.1a3 3 0 0 0-2.1-2.1C17.6 4.5 12 4.5 12 4.5s-5.6 0-7.4.5a3 3 0 0 0-2.1 2.1C2 9 2 12 2 12s0 3 .5 4.9a3 3 0 0 0 2.1 2.1c1.8.5 7.4.5 7.4.5s5.6 0 7.4-.5a3 3 0 0 0 2.1-2.1C22 15 22 12 22 12s0-3-.5-4.9ZM10 15.5v-7l6 3.5-6 3.5Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-linkedin::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 8.8H3.3V21h3.2V8.8ZM4.9 3A1.9 1.9 0 1 0 5 6.8 1.9 1.9 0 0 0 4.9 3Zm16 11c0-3.3-1.8-5.4-4.5-5.4-1.9 0-3.1 1-3.6 1.9V8.8H9.6V21h3.2v-6.2c0-1.9.9-3.1 2.5-3.1 1.5 0 2.3 1 2.3 3V21h3.3v-7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-whatsapp::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.2 11.8a8.2 8.2 0 0 1-12.1 7.2L4 20l1.1-4a8.2 8.2 0 1 1 15.1-4.2Z'/%3E%3Cpath fill='%23ffffff' stroke='none' d='M8.4 7.4c.3-.5.6-.5.9-.5h.4c.2 0 .4.1.5.5l.8 2c.1.3.1.5-.1.7l-.6.7c-.2.2-.2.4-.1.6.7 1.2 1.6 2.1 2.9 2.8.2.1.4.1.6-.1l.8-1c.2-.2.4-.3.7-.2l2 .9c.3.1.5.3.5.5 0 .3-.2 1.5-.8 2-.6.6-1.5.8-2.4.6-1.1-.2-2.5-.8-4.2-2.3-2.2-1.9-3.6-4.3-3.7-5.5 0-.7.2-1.3.6-1.7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-telegram::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23ffffff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.8 3.2 18.7 20c-.2 1.2-.9 1.5-1.9.9l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8 8.8-8c.4-.3-.1-.5-.6-.2L6.4 14 1.7 12.5c-1-.3-1-1 .2-1.5L20.3 3.9c.9-.3 1.7.2 1.5-.7Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-qq::before {
    content: 'QQ';
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ---------- Link columns ---------- */
.fp-footer .fp-footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding: 28px 0 32px;
    border-bottom: 1px solid var(--fp-line);
}

.fp-footer .fp-nav-section {
    min-width: 0;
}

.fp-footer .fp-nav-title {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--fp-ink);
}

.fp-footer .fp-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer .fp-nav-link {
    display: inline-block;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--fp-slate);
    text-decoration: none;
}

.fp-footer .fp-nav-link:hover,
.fp-footer .fp-legal-link:hover {
    color: var(--fp-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Support contact (inside the support column) */
.fp-footer .fp-support {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    font-style: normal;
}

.fp-footer .fp-support-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    font-size: 12px;
}

.fp-footer .fp-support-row::before {
    content: '';
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.fp-footer .fp-support-row-mail::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.fp-footer .fp-support-row-time::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}


.fp-footer .fp-support-link {
    color: var(--fp-ink);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fp-footer .fp-support-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fp-footer .fp-support-meta {
    color: var(--fp-slate);
}

/* ---------- Bottom: merchant info, copyright, legal links, language ---------- */
.fp-footer .fp-footer-bottom {
    padding: 20px 0 32px;
}

.fp-footer .fp-legal-disclosure {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--fp-muted);
}

.fp-footer .fp-legal-title {
    font-weight: 600;
    color: var(--fp-slate);
}

.fp-footer .fp-legal-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    min-width: 0;
}

.fp-footer .fp-legal-line {
    margin: 0;
}

.fp-footer .fp-legal-value {
    color: var(--fp-muted);
}

.fp-footer .fp-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
}

.fp-footer .fp-footer-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 32px;
    min-width: 0;
}

.fp-footer .fp-copyright {
    margin: 0;
    color: var(--fp-muted);
}

.fp-footer .fp-legal-links {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-footer .fp-legal-links li + li {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--fp-line);
}

.fp-footer .fp-legal-link {
    display: inline-block;
    padding: 4px 0;
    color: var(--fp-slate);
    text-decoration: none;
}

/* Language dropdown */
.fp-footer .fp-language-switcher {
    position: relative;
}

.fp-footer .fp-language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    list-style: none;
    border-radius: var(--gm-radius-control, 10px);
    font-size: 12px;
    font-weight: 500;
    color: var(--fp-slate);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fp-footer .fp-language-toggle::-webkit-details-marker {
    display: none;
}

.fp-footer .fp-language-toggle:hover,
.fp-footer .fp-language-switcher[open] .fp-language-toggle {
    background: var(--fp-chip);
    color: var(--fp-ink);
}

.fp-footer .fp-language-globe,
.fp-footer .fp-language-caret {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.fp-footer .fp-language-globe {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3E%3C/svg%3E");
}

.fp-footer .fp-language-caret {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234a4d57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    transition: transform 0.15s ease;
}

.fp-footer .fp-language-switcher[open] .fp-language-caret {
    transform: rotate(180deg);
}

.fp-footer .fp-language-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 10;
    min-width: 168px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--gm-line, #e6e6ea);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 19, 24, 0.12);
}

.fp-footer .fp-language-link {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--gm-radius-control, 10px);
    font-size: 13px;
    color: var(--fp-slate);
    text-decoration: none;
}

.fp-footer .fp-language-link:hover,
.fp-footer .fp-language-link.is-active {
    background: var(--gm-chip, #f2f2f5);
    color: var(--fp-ink);
}

.fp-footer .fp-language-link.is-active {
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .fp-footer {
        padding: 0 16px;
    }

    .fp-footer .fp-intro {
        padding: 32px 0 24px;
    }

    .fp-footer .fp-footer-nav {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0 24px;
    }

    .fp-footer .fp-legal-links {
        gap: 0 16px;
    }

    .fp-footer .fp-legal-links li + li {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .fp-footer .fp-footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fp-footer .fp-language-switcher {
        margin-left: -10px;
    }

    .fp-footer .fp-language-menu {
        left: 0;
        right: auto;
    }
}
