/* Prevent the menu from flashing before styles are applied */
.fullscreen-menu-component:not(.is-open) .fullscreen-menu-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fullscreen-menu-component:not(.is-open) .fullscreen-menu-panel {
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
}

/* Custom Fullscreen Canvas Menu */

.fullscreen-menu-component {
    display: flex;
    position: relative;
    z-index: 99999;
}

.fullscreen-menu-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent !important;
}

.fullscreen-menu-trigger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #C1C1C1;
}

.fullscreen-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgb(0 0 0 / 50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.fullscreen-menu-panel * {
    font-family: 'Rubik', sans-serif;
}

.fullscreen-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    color: #222;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 300ms ease,
        opacity 300ms ease,
        visibility 0s linear 300ms;
}

.fullscreen-menu-component.is-open .fullscreen-menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fullscreen-menu-component.is-open .fullscreen-menu-panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;

    transition:
        transform 300ms ease,
        opacity 300ms ease,
        visibility 0s;
}

.fullscreen-menu-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.fullscreen-menu-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.fullscreen-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent !important;
    color: #D9000D !important;
    font-size: 2.25rem !important;
    line-height: 1 !important;
    font-weight: 400 !important;
}

.fullscreen-menu-navigation {
    width: 100%;
}

.fullscreen-menu-list,
.fullscreen-menu-list .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fullscreen-menu-list li {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.fullscreen-menu-list li.current-menu-item>a {
    position: relative;
}

.fullscreen-menu-list li.current-menu-item>a::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 3px;
    bottom: 5px;
    background-color: #D9000D;
}

.fullscreen-menu-list li>a {
    flex: 0 0 auto;
    min-width: 0;
    padding: 10px 0 10px 0;
    color: #3E3E3E;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fullscreen-menu-list li>a:hover,
.fullscreen-menu-list li>a:focus-visible {
    color: #555;
}

.fullscreen-menu-list .submenu-toggle {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: #d9000d;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.fullscreen-menu-list .submenu-toggle:focus-visible,
.fullscreen-menu-trigger:focus-visible,
.fullscreen-menu-close:focus-visible,
.fullscreen-menu-search button:focus-visible,
.fullscreen-action:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 3px;
}

.fullscreen-menu-list .sub-menu {
    flex: 0 0 100%;
    width: 100%;
    padding-left: 20px;
}

.fullscreen-menu-list .sub-menu[hidden] {
    display: none !important;
}

.fullscreen-menu-list .sub-menu li>a {
    font-size: 1.125rem;
    font-weight: 500;
}

.fullscreen-menu-search form {
    display: flex;
    width: 100%;
}

.fullscreen-menu-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font: inherit;
}

.fullscreen-menu-search button {
    flex: 0 0 auto;
    padding: 0 15px;
    border: 0;
    background: #d9000d;
    color: #fff;
    font: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    padding-top: 4px;
}

.fullscreen-action,
.fullscreen-action:hover,
.fullscreen-action:active,
.fullscreen-action:focus,
.fullscreen-action:focus-visible {
    display: block;
    padding: 10px;
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: #fff !important;
    background: #d9000d;
}

body.fullscreen-menu-locked {
    overflow: hidden;
}

.canvas-menu-notice {
    margin: 0;
    padding: 12px 0;
}

@media (min-width: 1025px) {
    .fullscreen-menu-component {
        display: none;
    }
}

@media (max-width: 480px) {
    .fullscreen-menu-panel {
        gap: 20px;
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .fullscreen-menu-overlay,
    .fullscreen-menu-panel {
        transition: none;
    }
}