/* Scrolling Bar Block Styles */
.scrolling-bar-wrapper {
    background-color: var(--wp--preset--color--accent-primary, #99c3b9);
    color: var(--wp--preset--color--text, #394a78) !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    position: relative;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    padding: 0;
    font-weight: normal !important;
    z-index: 10;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Webkit browsers */
.scrolling-bar-wrapper::-webkit-scrollbar {
    display: none;
}

/* Additional breakout styles */
.wp-block-cakeclub-scrolling-bar {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
    border: none !important;
}

.wp-block-cakeclub-scrolling-bar.alignfull {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.scrolling-bar-content {
    height: 100%;
    position: relative;
    width: 100%;
    max-width: var(--wp--style--global--content-size, 1200px);
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 15px; /* Space between arrows and content */
}

.scrolling-bar-track-container {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Webkit browsers */
.scrolling-bar-track-container::-webkit-scrollbar {
    display: none;
}

/* Arrow buttons */
.scroll-arrow {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Don't shrink */
}

.scroll-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.scroll-arrow:active {
    transform: scale(0.95);
}

.scroll-arrow.visible {
    display: flex;
}

.scroll-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.scrolling-bar-track {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    height: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.scrolling-bar-item {
    display: inline-block;
    white-space: nowrap;
    padding: 0 0.25rem;
    position: relative;
    color: var(--wp--preset--color--text, #394a78) !important;
    font-weight: normal !important;
}

.scrolling-bar-item:not(:last-child)::after {
    content: " • ";
    position: absolute;
    right: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.scrolling-bar-link {
    color: var(--wp--preset--color--text, #394a78) !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-weight: normal !important;
}

.scrolling-bar-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.scrolling-bar-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Uppercase text styling */
.scrolling-bar-wrapper.is-uppercase {
    text-transform: uppercase;
}

.scrolling-bar-wrapper.is-uppercase .scrolling-bar-item,
.scrolling-bar-wrapper.is-uppercase .scrolling-bar-link {
    text-transform: uppercase;
}

/* Bold text styling */
.scrolling-bar-wrapper.is-bold {
    font-weight: 700;
}

.scrolling-bar-wrapper.is-bold .scrolling-bar-item,
.scrolling-bar-wrapper.is-bold .scrolling-bar-link {
    font-weight: 700 !important;
}

/* Static notification bar - no animation needed */

/* Responsive adjustments */
@media (max-width: 768px) {
    .scrolling-bar-content {
        gap: 10px; /* Smaller gap on mobile */
        padding: 0 5px;
    }
    
    .scroll-arrow {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .scrolling-bar-track {
        gap: 0.75rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .scrolling-bar-item {
        padding: 0 0.2rem;
    }
    
    .scrolling-bar-item:not(:last-child)::after {
        right: -0.6rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scrolling-bar-wrapper {
        border-top: 1px solid;
        border-bottom: 1px solid;
    }
}

/* No animation support needed - notification bar is now static */

/* Visibility controls */
@media (max-width: 767px) {
    .scrolling-bar-wrapper.hide-on-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .scrolling-bar-wrapper.hide-on-desktop {
        display: none !important;
    }
}

/* Color variations */
.scrolling-bar-wrapper.has-text-color {
    color: var(--wp--preset--color--text, currentColor);
}

.scrolling-bar-wrapper.has-background {
    background-color: var(--wp--preset--color--background, currentColor);
}

/* Editor specific styles */
.wp-block-editor .scrolling-bar-wrapper {
    position: relative;
}

.wp-block-editor .scrolling-bar-wrapper::before {
    content: "Scrolling Bar (Preview - will animate on frontend)";
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 11px;
    color: #666;
    font-style: italic;
}