/**
 * Project: Main-Website
 * Module: public/CSS/site-footer.css
 * Author: J. Apps (JohnV2002 / Sodakiller1)
 * Version: 1.0.0
 * Description: Shared footer styles (neutral colours for light, dark and themed pages) and the plain BMC link.
 * New in v1.0.0: First version.
 * Copyright: MIT (c) 2026 J. Apps
 */

.japps-footer {
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.9rem 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: inherit;
    background: rgba(127, 127, 127, 0.08);
    border-top: 1px solid rgba(127, 127, 127, 0.28);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.japps-footer *,
.japps-footer *::before,
.japps-footer *::after {
    box-sizing: border-box;
}

.japps-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.japps-footer a {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
}

.japps-footer a:hover,
.japps-footer a:focus-visible {
    opacity: 1;
    text-decoration: underline;
}

.japps-footer a:focus-visible,
.japps-footer input:focus-visible + .japps-switch__slider {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.japps-footer__brand {
    font-weight: 700;
    opacity: 1 !important;
}

.japps-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.9rem;
}

.japps-footer__copy,
.japps-footer #session-uuid {
    opacity: 0.7;
    font-size: 0.82rem;
}

.japps-footer #session-uuid:empty {
    display: none;
}

/* Dark mode switch (darkmode.js finds #dark-mode-toggle and .dark-mode-lable) */
.japps-footer .japps-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    width: auto;
    height: auto;
    margin: 0;
}

.japps-footer .japps-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.japps-footer .japps-switch__slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.45);
    transition: background 0.2s ease;
}

.japps-footer .japps-switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.japps-footer .japps-switch input:checked + .japps-switch__slider {
    background: #4ea1ff;
}

.japps-footer .japps-switch input:checked + .japps-switch__slider::before {
    transform: translateX(18px);
}

.japps-footer .dark-mode-lable {
    position: static;
    transform: none;
    right: auto;
    top: auto;
    font-size: 0.82rem;
    opacity: 0.8;
    pointer-events: none;
}

@media (max-width: 600px) {
    .japps-footer__inner {
        flex-direction: column;
        gap: 0.6rem;
    }
}

/* Small shared bits used on several pages ------------------------------------------- */

/* Plain "Buy me a coffee" link instead of the third-party widget script (no request before a click) */
.bmc-link {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    background: #5f7fff;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
}

.bmc-link:hover,
.bmc-link:focus-visible {
    filter: brightness(1.1);
    text-decoration: none;
}
