/* 2cool2026 — the public site header and menu.
 *
 * Built from the header on the "404" / "Contact" frames in the 2Cool Traffic
 * School — Site Figma file: a white bar with the logo, the menu, an outlined
 * Login pill, the green "Find My Course" button and a round cart button.
 *
 * Deliberately uses its own .tc-nav classes instead of Bootstrap's .navbar, so
 * none of the legacy header rules inlined in base.html.twig apply to it.
 */

.tc-nav {
    --tc-nav-blue:   #0a18be;
    --tc-nav-orange: #ff6900;
    --tc-nav-green:  #3aad03;
    --tc-nav-green-hover: #339802;
    --tc-nav-ink:    #12233b;
    --tc-nav-muted:  #64748b;
    --tc-nav-border: #d9dee6;
    background: #fff;
    border-bottom: 1px solid #eef1f5;
    font-family: Nunito, "Helvetica Neue", Arial, sans-serif;
    color: var(--tc-nav-ink);
}

.tc-nav__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1320px;
    min-height: 88px;
    margin: 0 auto;
    padding: 0 24px;
}

.tc-nav__logo {
    flex-shrink: 0;
}

.tc-nav__logo img {
    display: block;
    height: 44px;
    width: auto;
}

.tc-nav__menu {
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
}

.tc-nav__links,
.tc-nav__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tc-nav__actions {
    gap: 12px;
}

/* Menu type matches the marketing site (dev.toocooltrafficschool.com): Nunito
   14px/600 in black, turning Tangerine on hover with no background. */
.tc-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22.5px;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}

.tc-nav__link:hover,
.tc-nav__link:focus-visible,
.tc-nav__link.show {
    color: var(--tc-nav-orange);
    outline: 0;
}

.tc-nav__link:focus-visible {
    box-shadow: 0 0 0 2px var(--tc-nav-orange);
}

/* Bootstrap draws a solid triangle; the design uses a thin chevron that flips
   when the menu is open. */
.tc-nav__link.dropdown-toggle::after {
    width: 6px;
    height: 6px;
    margin: -3px 2px 0 2px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.tc-nav__link.dropdown-toggle.show::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.tc-nav .dropdown-menu {
    min-width: 180px;
    margin-top: 8px;
    padding: 20px 24px;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(10, 25, 190, .12);
    font-family: inherit;
    font-size: 14px;
}

/* !important on size and padding: the legacy header rules inlined in
   base.html.twig set both per breakpoint with !important. */
.tc-nav .dropdown-menu .dropdown-item {
    padding: 8px 0 !important;
    background: transparent;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 20px;
    color: #33373d;
    white-space: nowrap;
    transition: color .15s;
}

/* Admin Menu: the collapsible groups indent their children. */
.tc-nav .dropdown-menu .submenu-items .dropdown-item {
    padding-left: 24px !important;
}

.tc-nav .dropdown-menu .submenu-items {
    margin: 0;
    border-left: 0;
    background: transparent;
}

.tc-nav .accordion-submenu > .submenu-toggle {
    padding-right: 24px !important;
}

.tc-nav .accordion-submenu > .submenu-toggle::after {
    right: 0;
    font-size: 10px;
}

.tc-nav .dropdown-menu .dropdown-item:hover,
.tc-nav .dropdown-menu .dropdown-item:focus,
.tc-nav .dropdown-menu .dropdown-item[aria-current="true"] {
    background: transparent;
    color: var(--tc-nav-orange);
}

.tc-nav .dropdown-menu .dropdown-item i {
    width: 18px;
    margin-right: 6px;
    text-align: center;
    color: var(--tc-nav-muted);
}

/* Language switcher: the outlined "EN" pill from the marketing site. */
.tc-nav__lang > .tc-nav__link {
    padding: 8px 14px;
    border: 1px solid #c7cbd1;
    border-radius: 999px;
    line-height: 20px;
}

.tc-nav__lang > .tc-nav__link:hover,
.tc-nav__lang > .tc-nav__link:focus-visible,
.tc-nav__lang > .tc-nav__link.show {
    border-color: var(--tc-nav-orange);
}

.tc-nav__lang .dropdown-menu {
    min-width: 96px;
}

.tc-nav__search {
    position: relative;
    margin: 0;
}

.tc-nav__search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--tc-nav-muted);
    font-size: 13px;
    pointer-events: none;
}

.tc-nav__search input {
    width: 190px;
    height: 40px;
    padding: 0 14px 0 36px;
    border: 1px solid var(--tc-nav-border);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: var(--tc-nav-ink);
    outline: 0;
}

.tc-nav__search input:focus {
    border-color: var(--tc-nav-blue);
    box-shadow: 0 0 0 3px rgba(10, 24, 190, .12);
}

.tc-nav__pill,
.tc-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.tc-nav__pill {
    border: 1.5px solid var(--tc-nav-ink);
    background: #fff;
    color: var(--tc-nav-ink);
}

.tc-nav__pill:hover,
.tc-nav__pill:focus-visible {
    background: var(--tc-nav-ink);
    color: #fff;
    outline: 0;
}

.tc-nav__cta {
    border: 0;
    background: var(--tc-nav-green);
    color: #fff;
}

.tc-nav__cta:hover,
.tc-nav__cta:focus-visible {
    background: var(--tc-nav-green-hover);
    color: #fff;
    outline: 0;
}

.tc-nav__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tc-nav-green);
    color: #fff;
    font-size: 17px;
    text-decoration: none;
}

.tc-nav__cart:hover,
.tc-nav__cart:focus-visible {
    background: var(--tc-nav-green-hover);
    color: #fff;
    outline: 0;
}

.tc-nav__cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--tc-nav-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
}

.tc-nav__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--tc-nav-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tc-nav-ink);
    font-size: 20px;
}

.tc-nav-offset {
    height: 89px;
}

@media (min-width: 992px) {
    /* Always open on desktop; Bootstrap's .collapse only governs the phone menu. */
    .tc-nav__menu.collapse {
        display: flex !important;
    }
}

/* The marketing site's drop-down roll: the panel fades in and grows from 96% height with a
   slight spring, then its items slide down 6px and fade in one after another. Same timings
   as toocooltrafficschool.com's header. It runs however the menu opens - hover, click or
   the phone menu - since .show (Bootstrap) and :hover (below) are both "open". */
.tc-nav .dropdown-menu {
    --submenu-speed: .12s;
    --submenu-roll: .22s;
    --submenu-step: .035s;
    opacity: 0;
    transform: scaleY(.96);
    transform-origin: center top;
    transition: opacity var(--submenu-speed) ease,
                transform var(--submenu-roll) cubic-bezier(.34, 1.56, .64, 1),
                display var(--submenu-roll) allow-discrete;
}
.tc-nav .dropdown-menu > li {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--submenu-roll) ease,
                transform var(--submenu-roll) cubic-bezier(.34, 1.56, .64, 1);
}
.tc-nav .dropdown-menu.show {
    opacity: 1;
    transform: scaleY(1);
}
.tc-nav .dropdown-menu.show > li {
    opacity: 1;
    transform: translateY(0);
}
@starting-style {
    .tc-nav .dropdown-menu.show { opacity: 0; transform: scaleY(.96); }
    .tc-nav .dropdown-menu.show > li { opacity: 0; transform: translateY(-6px); }
}
.tc-nav .dropdown-menu > li:nth-child(1) { transition-delay: calc(var(--submenu-step) * 1); }
.tc-nav .dropdown-menu > li:nth-child(2) { transition-delay: calc(var(--submenu-step) * 2); }
.tc-nav .dropdown-menu > li:nth-child(3) { transition-delay: calc(var(--submenu-step) * 3); }
.tc-nav .dropdown-menu > li:nth-child(4) { transition-delay: calc(var(--submenu-step) * 4); }
.tc-nav .dropdown-menu > li:nth-child(5) { transition-delay: calc(var(--submenu-step) * 5); }
.tc-nav .dropdown-menu > li:nth-child(6) { transition-delay: calc(var(--submenu-step) * 6); }
.tc-nav .dropdown-menu > li:nth-child(7) { transition-delay: calc(var(--submenu-step) * 7); }
.tc-nav .dropdown-menu > li:nth-child(n+8) { transition-delay: calc(var(--submenu-step) * 8); }
@media (prefers-reduced-motion: reduce) {
    .tc-nav .dropdown-menu,
    .tc-nav .dropdown-menu > li { transition: none; }
}

/* Menus open on hover, as on the marketing site - on a desktop with a mouse only. Touch
   screens and the phone menu keep Bootstrap's tap to open, which still works here too. */
@media (min-width: 992px) and (hover: hover) {
    .tc-nav .dropdown { position: relative; }
    .tc-nav .dropdown:hover > .dropdown-menu {
        display: block;
        top: 100%;
        left: 0;
        opacity: 1;
        transform: scaleY(1);
    }
    .tc-nav .dropdown:hover > .dropdown-menu > li {
        opacity: 1;
        transform: translateY(0);
    }
    @starting-style {
        .tc-nav .dropdown:hover > .dropdown-menu { opacity: 0; transform: scaleY(.96); }
        .tc-nav .dropdown:hover > .dropdown-menu > li { opacity: 0; transform: translateY(-6px); }
    }
    .tc-nav .tc-nav__actions .dropdown:hover > .dropdown-menu {
        left: auto;
        right: 0;
    }
    /* Bridges the 8px gap above the menu so it stays open on the way down to it. */
    .tc-nav .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -12px;
        left: 0;
        right: 0;
        height: 12px;
    }
    .tc-nav .dropdown:hover > .tc-nav__link {
        color: var(--tc-nav-orange);
    }
    .tc-nav .dropdown:hover > .tc-nav__link.dropdown-toggle::after {
        margin-top: 3px;
        transform: rotate(-135deg);
    }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
    .tc-nav__inner {
        gap: 12px;
        padding: 0 16px;
    }
    .tc-nav__link {
        padding: 8px;
        font-size: 13px;
    }
    .tc-nav__search input {
        width: 140px;
    }
    .tc-nav__pill,
    .tc-nav__cta {
        padding: 0 14px;
    }
}

@media (max-width: 991.98px) {
    .tc-nav {
        max-height: 100vh;
        overflow-y: auto;
    }
    .tc-nav__inner {
        flex-wrap: wrap;
        gap: 12px;
        min-height: 72px;
        padding: 0 16px;
    }
    .tc-nav__logo {
        margin-right: auto;
    }
    .tc-nav__logo img {
        height: 36px;
    }
    .tc-nav__burger {
        display: inline-flex;
    }
    .tc-nav__menu {
        order: 10;
        flex: 0 0 100%;
        padding: 8px 0 16px;
        border-top: 1px solid #eef1f5;
    }
    .tc-nav__menu.show,
    .tc-nav__menu.collapsing {
        display: block;
    }
    .tc-nav__links,
    .tc-nav__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .tc-nav__actions {
        margin-top: 12px;
        gap: 10px;
    }
    .tc-nav__link {
        justify-content: space-between;
        padding: 12px;
        font-size: 15px;
    }
    .tc-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        max-width: none;
        margin: 0 0 8px;
        padding: 4px 24px 8px;
        box-shadow: none;
    }
    .tc-nav__lang > .tc-nav__link {
        display: flex;
    }
    .tc-nav__search input {
        width: 100%;
    }
    .tc-nav-offset {
        height: 73px;
    }
}

/* ---------- SSL badge (Partials/_ssl_badge.html.twig) ----------
 * Lives here because this is the one 2026 stylesheet base.html.twig loads on
 * every public page; the badge sits in the footer and on the cart summary. */

.tc-ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    border: 1px solid #d9dee6;
    border-radius: 12px;
    background: #fff;
    font-family: Nunito, "Helvetica Neue", Arial, sans-serif;
    color: #12233b;
    text-align: left;
    text-decoration: none;
}

.tc-ssl-badge:hover,
.tc-ssl-badge:focus-visible {
    border-color: #3aad03;
    color: #12233b;
    text-decoration: none;
    outline: 0;
}

.tc-ssl-badge i {
    color: #3aad03;
    font-size: 24px;
    line-height: 1;
}

.tc-ssl-badge span {
    display: flex;
    flex-direction: column;
}

.tc-ssl-badge strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 16px;
}

.tc-ssl-badge small {
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    color: #64748b;
}

/* ---------- Site footer (Partials/_site_footer.html.twig) ----------
 * Matches the footer on the marketing site: Tangerine ground, white type,
 * 18px/800 uppercase column headings, 14px links. */

.tc-footer {
    padding: 56px 24px 32px;
    background: #ff6900;
    font-family: Nunito, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
}

.tc-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
}

.tc-footer__cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 0 20px 40px;
}

.tc-footer__brand img {
    display: block;
    height: 48px;
    width: auto;
    /* The mark only ships in blue/orange; knock it out to white on the orange ground. */
    filter: brightness(0) invert(1);
}

.tc-footer__brand p {
    max-width: 230px;
    margin: 20px 0 0;
    /* 11px, as the marketing site's footer sets it. */
    font-size: 11px;
    line-height: 1.5;
    color: #fff;
}

.tc-footer__heading {
    margin: 0 0 16px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 21.6px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
}

.tc-footer__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tc-footer__list li + li {
    margin-top: 12px;
}

.tc-footer a {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 19.6px;
    text-decoration: none;
}

.tc-footer a:hover,
.tc-footer a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.tc-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 32px 28px 0;
    border-top: 2px solid rgba(255, 255, 255, .55);
    font-size: 16px;
}

/* 11px, as the marketing site's footer sets it; the badge and icons beside it keep their size. */
.tc-footer__copyright {
    font-size: 11px;
}

.tc-footer__social {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

.tc-footer__social a {
    font-size: 26px;
    line-height: 1;
}

.tc-footer__social a:hover,
.tc-footer__social a:focus-visible {
    text-decoration: none;
    opacity: .8;
}

/* The badge is a link inside the footer; keep its own dark type. */
.tc-footer .tc-ssl-badge,
.tc-footer .tc-ssl-badge:hover {
    color: #12233b;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .tc-footer {
        padding: 40px 20px 24px;
    }
    .tc-footer__cols {
        grid-template-columns: 1fr 1fr;
        padding: 0 0 32px;
    }
    .tc-footer__brand {
        grid-column: 1 / -1;
    }
    .tc-footer__bottom {
        padding: 24px 0 0;
        font-size: 14px;
    }
}
