
/* ---------------------------------------------------------
   Footer shell
   --------------------------------------------------------- */

#footer.c28-site-footer {
    --footer-accent: rgb(var(--accent-rgb, var(--thelics-rgb)));

    position: relative;
    margin-top: 64px;
    border-top: 1px solid var(--hairline-strong);
    background:
        linear-gradient(
            120deg,
            color-mix(in srgb, var(--footer-accent) 8%, transparent),
            transparent 34%
        ),
        var(--tbl-main);
}

.c28-footer-shell {
    padding-top: 1px;
    padding-bottom: 26px;
}


/* ---------------------------------------------------------
   Main grid
   --------------------------------------------------------- */

.c28-footer-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    background: var(--hairline-strong);
}

.c28-footer-card {
    min-width: 0;
    background: var(--tbl-main);
}

.c28-footer-card--identity {
    grid-column: span 5;
}

.c28-footer-card--navigation {
    grid-column: span 7;
}

.c28-footer-card--language,
.c28-footer-card--theme {
    grid-column: span 6;
}


/* ---------------------------------------------------------
   Shared card heading
   --------------------------------------------------------- */

.c28-footer-card__header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 68px;
    border-bottom: 1px solid var(--hairline);
}

.c28-footer-card__number {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--hairline);
    color: var(--paper-muted);
    font-family: var(--akzenttext);
    font-size: 24px;
    font-weight: 300;
}

.c28-footer-card__heading {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 13px var(--space-m);
}

.c28-footer-card__heading > span {
    margin-bottom: 3px;
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.c28-footer-card__heading h2 {
    overflow: hidden;
    margin: 0;
    color: var(--paper);
    font-family: var(--akzenttext);
    font-size: 21px;
    font-weight: 300;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c28-footer-card__status {
    align-self: center;
    margin-right: var(--space-m);
    padding: 6px var(--space-xs);
    border: 1px solid var(--hairline-strong);
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   Identity card
   --------------------------------------------------------- */

.c28-footer-card--identity {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    min-height: 230px;
}

.c28-footer-card--identity > .c28-footer-card__number {
    font-size: 32px;
}

.c28-footer-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 30px 26px;
}

.c28-footer-identity__label {
    margin-bottom: 9px;
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.c28-footer-identity__title {
    color: var(--paper);
    font-family: var(--akzenttext);
    font-size: clamp(29px, 3vw, 46px);
    font-weight: 300;
    line-height: 0.95;
}

.c28-footer-identity__claim {
    margin: 15px 0 0;
    color: var(--txtcol-soft);
    font-size: var(--txtsmall);
    line-height: 1.6;
}

.c28-footer-identity__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 25px;
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.c28-footer-identity__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.c28-footer-identity__meta span:not(:last-child)::after {
    width: 3px;
    height: 3px;
    margin-left: 9px;
    background: currentColor;
    content: "";
}

.c28-footer-top {
    display: flex;
    width: 70px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--hairline);
    color: var(--paper-muted);
    text-decoration: none;
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

.c28-footer-top span {
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.c28-footer-top strong {
    margin-top: 14px;
    color: var(--paper);
    font-family: var(--akzenttext);
    font-size: 24px;
    font-weight: 300;
}

.c28-footer-top:hover {
    background: color-mix(in srgb, var(--paper) 2%, transparent);
    color: var(--paper);
}


/* ---------------------------------------------------------
   Footer navigation grid
   --------------------------------------------------------- */

.c28-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 1px;
    list-style: none;
    counter-reset: footer-link;
    background: var(--hairline);
}

.c28-footer-links li {
    min-width: 0;
    margin: 0;
    padding: 0;
    counter-increment: footer-link;
    background: var(--tbl-main);
}

.c28-footer-links li a {
    display: grid;
    min-height: 66px;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    padding: 0 17px 0 0;
    box-sizing: border-box;
    color: var(--paper);
    font-size: var(--txtxsmall);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

.c28-footer-links li a::before {
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.1em;
    content: counter(footer-link, decimal-leading-zero);
}

.c28-footer-links li a:hover {
    background: color-mix(in srgb, var(--paper) 2.5%, transparent);
    color: var(--paper-muted);
}


/* ---------------------------------------------------------
   Language and theme selectors
   --------------------------------------------------------- */

.c28-footer-select {
    display: flex;
    min-height: 96px;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.c28-footer-select .language,
.c28-footer-select .theme {
    width: 100%;
    margin: 0;
    float: none;
}

.c28-footer-select form {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-xs);
    margin: 0;
}

.c28-footer-select select {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 38px 0 13px;
    box-sizing: border-box;
    border: 1px solid var(--hairline-strong);
    border-radius: 0;
    outline: 0;
    appearance: none;
    background:
        linear-gradient(
            45deg,
            transparent 50%,
            var(--paper-muted) 50%
        ) calc(100% - 16px) 18px / 5px 5px no-repeat,
        linear-gradient(
            135deg,
            var(--paper-muted) 50%,
            transparent 50%
        ) calc(100% - 11px) 18px / 5px 5px no-repeat,
        var(--tbl-second, color-mix(in srgb, var(--bg-deep) 18%, transparent));
    color: var(--paper);
    font-family: inherit;
    font-size: var(--txtxsmall);
    letter-spacing: 0.06em;
}

.c28-footer-select select:hover,
.c28-footer-select select:focus {
    border-color: var(--paper-muted);
}

.c28-footer-select input.button {
    min-width: 52px;
    height: 42px;
    margin: 0;
    padding: 0 var(--space-s);
    border: 1px solid var(--hairline-strong);
    border-radius: 0;
    background: transparent;
    color: var(--paper-muted);
    font-family: inherit;
    font-size: var(--txtxxsmall);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}

.c28-footer-select input.button:hover {
    border-color: var(--paper-muted);
    color: var(--paper);
}

.c28-footer-select optgroup,
.c28-footer-select option {
    background: var(--tbl-main);
    color: var(--paper);
}


/* ---------------------------------------------------------
   Bottom system record
   --------------------------------------------------------- */

.c28-footer-record {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(180px, 1fr) minmax(280px, auto);
    align-items: center;
    gap: 20px;
    padding: 17px var(--space-xxs) 0;
}

.c28-footer-record__time,
.c28-footer-record__code,
.c28-footer-record__copyright {
    color: var(--paper-muted);
    font-size: var(--txtxxsmall);
    line-height: 1.6;
    letter-spacing: 0.06em;
}

.c28-footer-record__time {
    text-transform: uppercase;
}

.c28-footer-record__code {
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.c28-footer-record__copyright {
    text-align: right;
}

.c28-footer-record__copyright a {
    color: var(--paper);
    text-decoration: none;
}

.c28-footer-record__copyright a:hover {
    color: var(--paper-muted);
}


/* ---------------------------------------------------------
   Remove old MyBB footer styling
   --------------------------------------------------------- */

#footer.c28-site-footer .upper,
#footer.c28-site-footer .lower {
    display: contents;
}

#footer.c28-site-footer ul.menu {
    border: 0;
}

#footer.c28-site-footer .wrapper {
    border: 0;
}


/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 980px) {

    .c28-footer-card--identity,
    .c28-footer-card--navigation {
        grid-column: 1 / -1;
    }

    .c28-footer-card--language,
    .c28-footer-card--theme {
        grid-column: span 6;
    }

    .c28-footer-card--identity {
        min-height: 200px;
    }

    .c28-footer-record {
        grid-template-columns: 1fr 1fr;
    }

    .c28-footer-record__code {
        text-align: right;
    }

    .c28-footer-record__copyright {
        grid-column: 1 / -1;
        text-align: left;
    }
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 700px) {

    #footer.c28-site-footer {
        margin-top: var(--space-xl);
    }

    .c28-footer-grid {
        grid-template-columns: 1fr;
    }

    .c28-footer-card--identity,
    .c28-footer-card--navigation,
    .c28-footer-card--language,
    .c28-footer-card--theme {
        grid-column: 1;
    }

    .c28-footer-card--identity {
        grid-template-columns: 54px minmax(0, 1fr);
        min-height: 0;
    }

    .c28-footer-identity {
        padding: 24px var(--space-m);
    }

    .c28-footer-identity__title {
        font-size: 31px;
    }

    .c28-footer-identity__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .c28-footer-identity__meta span::after {
        display: none;
    }

    .c28-footer-top {
        display: none;
    }

    .c28-footer-card__header {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .c28-footer-card__status {
        display: none;
    }

    .c28-footer-card__heading {
        padding: 13px;
    }

    .c28-footer-links {
        grid-template-columns: 1fr;
    }

    .c28-footer-select {
        min-height: 0;
        padding: 16px;
    }

    .c28-footer-record {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
        padding: 17px var(--space-xxs) 0;
    }

    .c28-footer-record__code,
    .c28-footer-record__copyright {
        text-align: left;
    }
}


/* ---------------------------------------------------------
   Very small screens
   --------------------------------------------------------- */

@media (max-width: 430px) {

    .c28-footer-select form {
        grid-template-columns: 1fr;
    }

    .c28-footer-select input.button {
        width: 100%;
    }
}


/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .c28-site-footer *,
    .c28-site-footer *::before,
    .c28-site-footer *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}