/* Sticky Footer Navigation */
.sticky-footer-nav {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    width: 100%;
    /* Full width wrapper */
    height: 0;
    /* Minimize height impact, though content will expand it? Better to let it be auto height but pointer events none */
    height: auto;
    margin: 0;
    background-color: transparent;
    /* Move BG to content */
    padding: 0;
    /* Move padding to content */
    box-shadow: none;
    /* Move shadow to content */
    border-radius: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    /* Robust centering */
    align-items: center;
    /* Center vertically if needed, though bottom set */
    align-items: flex-end;
    /* Or align bottom? bottom: 30px set on wrapper. */
    pointer-events: none;
    /* Let clicks pass through empty sides */
    box-sizing: border-box;
}

/* Button visibility logic removed */

.sticky-footer-nav .nav-content {
    display: flex;
    align-items: center;
    gap: 0;
    /* Moved box styles here */
    background-color: #ffffff;
    padding: 12px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(255, 192, 203, 0.3);
    pointer-events: auto;
    /* Re-enable clicks */
    max-width: 90%;
    /* Constraint width */
}

/* Wrapper for Submenu positioning */
.nav-item-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 24px;
    /* Slightly wider for better balance */
}

.nav-item-wrapper:first-child {
    padding-left: 0;
}

.nav-item-wrapper:last-child {
    padding-right: 0;
    /* No separator here anyway, removes extra space */
}

/* Vertical Divider for Items */
.nav-item-wrapper:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    /* Slightly shorter for elegance */
    background-color: #e0e0e0;
}

.sticky-footer-nav a.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Increased from 8px */
    text-decoration: none;
    color: #444;
    font-size: var(--wp--preset--font-size--small, 14px);
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.sticky-footer-nav a.nav-item:hover {
    color: #e5007e;
}

/* Submenu Dropdown (Tooltip style) */
.sticky-submenu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #fff;
    padding: 8px 0;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    z-index: 10000;
}

/* Bridge to maintain hover state over the gap */
.sticky-submenu::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

/* Triangle for tooltip */
.sticky-submenu::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.nav-item-wrapper:hover .sticky-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sticky-submenu .submenu-link {
    display: block;
    padding: 8px 24px;
    color: #444;
    text-decoration: none;
    font-size: calc(var(--wp--preset--font-size--small, 14px) * 0.95);
    transition: background-color 0.2s;
}

.sticky-submenu .submenu-link:hover {
    background-color: #f5f5f5;
    color: #e5007e;
}

/* .sticky-footer-nav .separator {
    color: #ddd;
    font-weight: 300;
    font-size: 18px;
    margin: 0 5px;
} */

.sticky-footer-nav .nav-button {
    background-color: #fff200;
    /* Yellow */
    color: #333;
    text-decoration: none;
    padding: 12px 32px;
    /* Wider button */
    border-radius: 50px;
    font-size: var(--wp--preset--font-size--small, 14px);
    font-weight: bold;
    margin-left: 48px;
    /* 24px + 24px to match gap */
    box-shadow: 0 2px 10px rgba(255, 242, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sticky-footer-nav .nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 242, 0, 0.5);
}

.sticky-footer-nav img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* Burger Button */
.sticky-burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    z-index: 10002;
}

.sticky-burger-btn .bar {
    width: 100%;
    height: 2px;
    background-color: #444;
    border-radius: 2px;
    transition: 0.3s;
}

.sticky-burger-btn:hover .bar {
    background-color: #e5007e;
}

/* PC Burger Animation to X */
body.sticky-menu-open .sticky-burger-btn .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.sticky-menu-open .sticky-burger-btn .bar:nth-child(2) {
    opacity: 0;
}

body.sticky-menu-open .sticky-burger-btn .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media screen and (min-width: 769px) {
    /* PC specific tweaks if needed */
}

/* Full Screen Overlay */
.sticky-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(5px);
    pointer-events: auto;
    /* Enable clicks on overlay */
}

body.sticky-menu-open .sticky-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.sticky-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    color: #444;
}

@media screen and (max-width: 1200px) {
    .sticky-menu-close {
        display: none;
    }
}

.sticky-menu-content {
    text-align: center;
    max-width: 500px;
    width: 85%;
    margin: 0 auto;
}

.overlay-sticky-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.overlay-sticky-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    /* Add space between icon and text */
    padding: 12px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--small, 14px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.overlay-sticky-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 0, 126, 0.15);
    border-color: #e5007e;
    color: #e5007e;
}

.overlay-divider {
    border: none;
    border-top: 1px dashed #ddd;
    margin: 30px 0;
}

.overlay-main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.overlay-main-menu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.overlay-main-menu li:last-child {
    border-bottom: none;
}

.overlay-main-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    text-decoration: none;
    color: #333;
    font-size: var(--wp--preset--font-size--medium, 16px);
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s;
}

.overlay-main-menu li a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #ccc;
    border-right: 2px solid #ccc;
    transform: rotate(45deg);
    transition: border-color 0.2s;
}

.overlay-main-menu li a:hover {
    color: #e5007e;
    padding-left: 10px;
    background-color: rgba(229, 0, 126, 0.02);
}

.overlay-main-menu li a:hover::after {
    border-color: #e5007e;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 1200px) {
    .sticky-footer-nav {
        left: auto;
        right: 20px;
        bottom: 20px;
        transform: none;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        width: auto;
        max-width: none;
        pointer-events: none;
        /* Wrapper still none */
        display: block;
        /* FAB positioning relies on flow or absolute? */
        /* Original: left auto, right 20px... implying fixed pos. */
        /* If display flex justify center was set on PC, reset here? */
        /* But right: 20px overrides PC logic if we are careful. */
    }

    .sticky-footer-nav .nav-content {
        display: block;
        background-color: transparent;
        /* Reset PC styles */
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        pointer-events: none;
        /* Wrapper for burger should pass clicks? */
        /* But burger needs clicks. */
        /* Burger is child. */
    }

    /* Hide desktop items */
    .sticky-footer-nav .nav-item-wrapper,
    .sticky-footer-nav .separator,
    .sticky-footer-nav .nav-button {
        display: none !important;
    }

    /* Style Burger as Floating Action Button */
    .sticky-burger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 56px;
        height: 56px;
        background-color: #fff200;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        margin: 0;
        padding: 16px;
        box-sizing: border-box;
        align-items: center;
        z-index: 99999 !important;
        /* Force top z-index */
        transition: background-color 0.3s;
        position: relative;
        pointer-events: auto;
        /* Enable clicks on FAB */
    }

    /* Active state for FAB */
    body.sticky-menu-open .sticky-burger-btn {
        background-color: #fff;
    }

    .sticky-burger-btn .bar {
        width: 24px;
        height: 2px;
        background-color: #333;
        transition: all 0.3s ease-in-out;
        position: relative;
        transform-origin: center;
    }

    /* Transform to X when open */
    body.sticky-menu-open .sticky-burger-btn .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    body.sticky-menu-open .sticky-burger-btn .bar:nth-child(2) {
        opacity: 0;
    }

    body.sticky-menu-open .sticky-burger-btn .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}