/* Notice Bar Widget Styles */
.enb-notice-bar {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 100;
}

.enb-notices-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.enb-notice-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.enb-notice-item.enb-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.enb-notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 0 40px;
}

.enb-notice-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.enb-notice-link:hover {
    opacity: 0.85;
}

.enb-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.enb-notice-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.enb-notice-icon i {
    line-height: 1;
}

.enb-notice-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.4;
}

/* Navigation Arrows */
.enb-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: inherit;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enb-nav-arrow:hover {
    opacity: 1;
}

.enb-nav-arrow:focus {
    outline: none;
}

.enb-nav-arrow:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.enb-nav-prev {
    left: 10px;
}

.enb-nav-next {
    right: 10px;
}

.enb-nav-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Close Button */
.enb-close-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: inherit;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enb-close-btn:hover {
    opacity: 1;
}

.enb-close-btn:focus {
    outline: none;
}

.enb-close-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.enb-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Closed State */
.enb-notice-bar.enb-closed {
    display: none;
}

/* Animation Classes */
.enb-notice-item.enb-fade-in {
    animation: enbFadeIn 0.4s ease forwards;
}

.enb-notice-item.enb-fade-out {
    animation: enbFadeOut 0.4s ease forwards;
}

@keyframes enbFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes enbFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .enb-notice-text {
        font-size: 12px;
    }
    
    .enb-notice-content {
        padding: 0 30px;
    }
    
    .enb-nav-prev {
        left: 5px;
    }
    
    .enb-nav-next {
        right: 5px;
    }
    
    .enb-nav-arrow {
        padding: 5px;
    }
    
    .enb-nav-arrow svg {
        width: 16px;
        height: 16px;
    }
    
    .enb-close-btn {
        right: 5px;
        padding: 5px;
    }
    
    .enb-close-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* When close button is present, adjust arrow position */
.enb-notice-bar:has(.enb-close-btn) .enb-nav-next {
    right: 40px;
}

@media (max-width: 767px) {
    .enb-notice-bar:has(.enb-close-btn) .enb-nav-next {
        right: 35px;
    }
}

/* Editor Preview Styles */
.elementor-editor-active .enb-notice-item {
    cursor: default;
}

.elementor-editor-active .enb-notice-bar {
    min-height: 44px;
}
