/* Mobile Swipe Topbar Styles */
#mobile-swipe-topbar {
    background-color: var(--topbar-bg-color, #2C643D);
    color: var(--topbar-text-color, #ffffff);
    font-size: var(--topbar-font-size, 14px);
    text-align: center;
}

.topbar-arrow {
    font-size: 1.5em;
    color: var(--topbar-text-color, #ffffff);
    opacity: 0.6;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
    z-index: 2;
}
.topbar-arrow-left {
    left: 8px;
}
.topbar-arrow-right {
    right: 8px;
}
.topbar-container {
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 16px;
    text-align: center;
}

.topbar-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.topbar-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 0;
}

.topbar-slide.active {
    opacity: 1;
    z-index: 1;
    position: absolute;
}

.topbar-slide a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
}

.topbar-slide a:hover {
    text-decoration: underline;
}

.topbar-slide span {
    width: 100%;
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
}

/* Animation classes */
.topbar-slide.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

.topbar-slide.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

.topbar-slide.slide-out-right {
    animation: slideOutRight 0.3s ease-in-out;
}

.topbar-slide.slide-out-left {
    animation: slideOutLeft 0.3s ease-in-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .topbar-container {
        padding: 10px 16px;
        min-height: 36px;
    }
}

/* Ensure topbar doesn't interfere with admin bar */
body.admin-bar #mobile-swipe-topbar {
    top: 46px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #mobile-swipe-topbar {
        top: 46px;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    #mobile-swipe-topbar {
        display: none !important;
    }
}