/* NOTE: SITE FOOTER (inc/new/sections/footer.php). Short footer, same look as the Black Friday page. */

.kmd-footer {
    padding-block: 26px;
    background: var(--kmd-black);
    color: #C2C2C8;
    font-size: 13px;
}

/* logo | links | company line: the links stay centred on the page whatever the widths of the two sides */
.kmd-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px 20px;
}

.kmd-footer__logo {
    justify-self: start;
}

.kmd-footer__logo img {
    display: block;
    width: auto;
    height: 20px;
}

.kmd-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
}

.kmd-footer__nav a {
    color: #C2C2C8;
    text-decoration: none;
}

.kmd-footer__nav a:hover {
    color: var(--kmd-white);
}

.kmd-footer__legal {
    justify-self: end;
    white-space: nowrap;
}

@media screen and (max-width: 991px) {
    .kmd-footer__inner {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .kmd-footer__logo,
    .kmd-footer__legal {
        justify-self: center;
    }

    .kmd-footer__legal {
        white-space: normal;
    }
}

/* NOTE: PRE-FOOTER (full variant). The link categories as closed accordions (<details>), in 4 columns on large
   screens, 2 on tablets and 1 on phones. */

.kmd-prefooter {
    padding-block: 28px 36px;
    border-top: 1px solid #2A2A2A;
    background: var(--kmd-ink);
    color: var(--kmd-white);
}

.kmd-prefooter__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 32px;
}

/* columns 1+3 / 2+4 wrappers (see footer.php): only a box of their own on tablets */
.kmd-prefooter__side {
    display: contents;
}

.kmd-prefooter__category {
    border-bottom: 1px solid #2E2E2E;
}

.kmd-prefooter__category summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding-block: 10px;
    color: var(--kmd-white);
    font-size: 15px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.kmd-prefooter__category summary::-webkit-details-marker {
    display: none;
}

.kmd-prefooter__category summary:hover {
    color: #E8E8E8;
}

.kmd-prefooter__category .kmd-chevron {
    color: #9C9CA3;
}

.kmd-prefooter__links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 14px;
}

.kmd-prefooter__links a {
    display: inline-block;
    padding-block: 4px;
    color: #C2C2C8;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.kmd-prefooter__links a:hover {
    color: var(--kmd-white);
    text-decoration: underline;
}

/* NOTE: FULL VARIANT. Logo row, then the company line, the company details and the ANPC link under it. */

.kmd-footer__company {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 22px;
    padding-top: 22px;
}

/* divider as wide as the content (a border would also run under the container padding) */
.kmd-footer__company::before {
    position: absolute;
    top: 0;
    right: var(--kmd-gutter);
    left: var(--kmd-gutter);
    border-top: 1px solid #2A2A2A;
    content: "";
}

.kmd-footer__company-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 860px;
}

.kmd-footer__company-text p {
    color: #9C9CA3;
    font-size: 12px;
    line-height: 1.6;
}

.kmd-footer__anpc {
    flex: 0 0 auto;
}

.kmd-footer__anpc img {
    width: 200px;
}

@media screen and (min-width: 600px) and (max-width: 991px) {
    .kmd-prefooter__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kmd-prefooter__side {
        display: block;
    }
}

@media screen and (max-width: 767px) {
    .kmd-footer__company {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media screen and (max-width: 599px) {
    .kmd-prefooter__columns {
        grid-template-columns: minmax(0, 1fr);
    }
}
