/*
 * Off-season footer bar.
 * Mirrors the 2027s city page Footer component: a centred stack on the
 * --brand-primary-dark0 field (#bb4a17 mixed with 7% black), closed off by the
 * language expander. Tokens are repeated here rather than shared with
 * header-bar.css so the two bars stay independent of each other's load order.
 */

#sy-footer-bar {
    --fb-bg: #ae4515;
    --fb-fg: #fff;
    --fb-fg-hover: #ffe4a7;
    --fb-gutter: 20px;

    display: block;
    padding-top: 20px;
    background-color: var(--fb-bg);
    color: var(--fb-fg);
    font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: center;
}

.sy-fb__inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 var(--fb-gutter);
}

/* ---------- top of page ---------- */

.sy-fb__top {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--fb-fg);
    font-family: inherit;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.sy-fb__top:hover,
.sy-fb__top:focus {
    color: var(--fb-fg-hover);
}

.sy-fb__top:focus {
    outline: none;
}

.sy-fb__top:focus-visible {
    outline: 2px solid var(--fb-fg);
    outline-offset: 2px;
}

/* ---------- copyright / links / company site ---------- */

.sy-fb__copyright {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.sy-fb__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* Scoped by id to outweigh the page stylesheet's own anchor sizing. */
#sy-footer-bar .sy-fb__links a,
#sy-footer-bar .sy-fb__company a {
    color: var(--fb-fg);
    font-size: 16px;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}

.sy-fb__links a:hover,
.sy-fb__links a:focus,
.sy-fb__company a:hover,
.sy-fb__company a:focus {
    color: var(--fb-fg-hover);
    text-decoration: underline;
}

/* Rules between the links, 14px clear on each side. Only wide enough to hold one
   row in the languages that carry the modifier. */
@media (min-width: 768px) {
    .sy-fb__links--divided {
        gap: 0;
    }

    .sy-fb__links--divided a {
        padding: 0 14px;
    }

    .sy-fb__links--divided a + a {
        border-left: 1px solid var(--fb-fg);
    }
}

/* The links wrap onto several rows on a phone, where underlines tell them apart. */
@media (max-width: 767px) {
    .sy-fb__links {
        gap: 12px 14px;
        padding: 8px 0;
    }

    #sy-footer-bar .sy-fb__links a {
        text-decoration: underline;
    }
}

/* ---------- language expander ---------- */

.sy-fb__lang {
    position: relative;
    margin-top: 6px;
    padding: 0.6rem 0;
}

.sy-fb__lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.5rem 1.5rem;
    border: 0;
    background: none;
    color: var(--fb-fg);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.sy-fb__lang-caret {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    transition: transform 0.2s ease;
}

/* The panel opens upward, so the caret turns to point at it. */
.sy-fb__lang.is-open .sy-fb__lang-caret {
    transform: rotate(-90deg);
}

/* A single column rising over the page, the way the city page app's popover sits
   once it flips to stay in view at the foot of the document. */
.sy-fb__lang-list {
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 1000;
    display: block;
    min-width: 162px;
    /* 23 languages are taller than most viewports, so the panel takes what room
       there is and scrolls the rest rather than rising off screen. */
    max-height: calc(100vh - 100px);
    margin: 0;
    padding: 0 0 16px;
    overflow-y: auto;
    border-radius: 4px;
    background-color: var(--fb-bg);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
    list-style: none;
    transform: translateX(-50%);
}

.sy-fb__lang-list[hidden] {
    display: none;
}

.sy-fb__lang-list li {
    list-style: none;
}

#sy-footer-bar .sy-fb__lang-list a {
    display: block;
    padding: 11px 16px;
    color: var(--fb-fg);
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

#sy-footer-bar .sy-fb__lang-list a:hover,
#sy-footer-bar .sy-fb__lang-list a:focus {
    color: var(--fb-fg-hover);
    text-decoration: underline;
}

/* Full bleed on a phone, as the app's w-screen panel is. */
@media (max-width: 767px) {
    .sy-fb__lang-list {
        left: 0;
        width: 100%;
        border-radius: 0;
        transform: none;
    }
}
