:root {
    --cc-height: 40px;
}

.chuchay-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--cc-bg, #f0f0f1);
    color: var(--cc-text, #333);
    height: var(--cc-height);
    line-height: var(--cc-height);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 4px;
    /* Optional rounded */
    width: 100%;
    position: relative;
}

.chuchay-label {
    flex: 0 0 auto;
    width: 40px;
    /* Square */
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.chuchay-label .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.chuchay-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black 95%, transparent);
}

.chuchay-content {
    display: flex;
    position: absolute;
    white-space: nowrap;
    /* Animation init */
    animation: chuchay-scroll-left var(--cc-speed, 10s) linear infinite;
}

.chuchay-item {
    display: inline-flex;
    align-items: center;
    margin-right: 40px;
}

.chuchay-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.chuchay-text {
    font-weight: 500;
}

/* Animations */
@keyframes chuchay-scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Assumption: Content is duplicated once, so 50% is the halfway point where it repeats perfectly */
}

@keyframes chuchay-scroll-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes chuchay-scroll-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes chuchay-scroll-down {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}


/* Direction Modifiers */
.chuchay-direction-right .chuchay-content {
    animation-name: chuchay-scroll-right;
}

/* For Up/Down, layout changes */
.chuchay-direction-up .chuchay-wrapper,
.chuchay-direction-down .chuchay-wrapper {
    height: 150px;
    /* Taller for vertical */
    align-items: flex-start;
}

.chuchay-direction-up .chuchay-label,
.chuchay-direction-down .chuchay-label {
    height: 40px;
    /* Keep label small or expand? Let's keep small */
}

.chuchay-direction-up .chuchay-container,
.chuchay-direction-down .chuchay-container {
    mask-image: linear-gradient(to bottom, transparent, black 10px, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10px, black 90%, transparent);
}

.chuchay-direction-up .chuchay-content,
.chuchay-direction-down .chuchay-content {
    flex-direction: column;
    animation-name: chuchay-scroll-up;
    width: 100%;
}

.chuchay-direction-down .chuchay-content {
    animation-name: chuchay-scroll-down;
}

.chuchay-direction-up .chuchay-item,
.chuchay-direction-down .chuchay-item {
    margin-right: 0;
    margin-bottom: 20px;
    width: 100%;
    /* justify-content: center; Optional center text */
}

/* Links */
a.chuchay-link {
    color: var(--cc-item-color, inherit);
    text-decoration: none;
    transition: color 0.2s;
}

a.chuchay-link:hover {
    color: var(--cc-item-hover, var(--cc-item-color, inherit));
}

a.chuchay-link:hover .chuchay-text {
    text-decoration: underline;
    opacity: 0.8;
}

/* Entrance Effects */
@keyframes cc-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cc-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cc-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chuchay-effect-fade-in {
    animation: cc-fade-in 1s ease-out forwards;
}

.chuchay-effect-slide-down {
    animation: cc-slide-down 0.5s ease-out forwards;
}

.chuchay-effect-slide-up {
    animation: cc-slide-up 0.5s ease-out forwards;
}


/* Visibility */
@media screen and (min-width: 768px) {
    .hide-on-desktop {
        display: none !important;
    }
}

@media screen and (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}