/**
 * News Ticker - 프론트엔드 스타일
 *
 * @package News_Ticker
 */

.news-ticker-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #333333;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.news-ticker-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.news-ticker-content {
    display: flex;
    white-space: nowrap;
}

.news-ticker-content.paused {
    animation-play-state: paused;
}

/* 애니메이션 타입별 스타일 */
.news-ticker-content.nt-animation-scroll {
    animation: ticker-scroll-left 30s linear infinite;
}

.news-ticker-content.nt-animation-fade {
    animation: ticker-fade 5s ease-in-out infinite;
}

.news-ticker-content.nt-animation-slide {
    animation: ticker-slide-left 10s ease-in-out infinite;
}

.news-ticker-item {
    display: inline-block;
    padding: 0 30px;
    flex-shrink: 0;
}

.news-ticker-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.news-ticker-link:hover {
    opacity: 0.8;
}

.news-ticker-text {
    display: inline-block;
}

/* 좌->우 애니메이션 */
.news-ticker-container[data-direction="left"] .news-ticker-content {
    animation-name: ticker-scroll-left;
}

/* 우->좌 애니메이션 */
.news-ticker-container[data-direction="right"] .news-ticker-content {
    animation-name: ticker-scroll-right;
}

/* 위->아래 애니메이션 */
.news-ticker-container[data-direction="up"] .news-ticker-content {
    flex-direction: column;
    animation-name: ticker-scroll-up;
}

/* 아래->위 애니메이션 */
.news-ticker-container[data-direction="down"] .news-ticker-content {
    flex-direction: column;
    animation-name: ticker-scroll-down;
}

@keyframes ticker-scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

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

@keyframes ticker-scroll-up {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

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

/* 페이드 애니메이션 */
@keyframes ticker-fade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* 슬라이드 애니메이션 */
@keyframes ticker-slide-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 자동 출력 위치 스타일 */
.nt-auto-display {
    position: relative;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
}

.nt-auto-display.nt-fixed-on-scroll {
    position: fixed;
    z-index: 9999;
}

.nt-position-top {
    /* 탑바 아래에 위치하므로 fixed가 아닌 relative 사용 */
    position: relative;
    top: 0;
}

.nt-position-top.nt-fixed-on-scroll {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nt-position-bottom {
    bottom: 0;
}

.nt-position-bottom.nt-fixed-on-scroll {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

/* 상단 고정 시 body에 패딩 추가 (선택사항) */
body.nt-has-top-ticker {
    padding-top: 40px; /* 티커 높이에 맞게 조정 */
}

body.nt-has-bottom-ticker {
    padding-bottom: 40px; /* 티커 높이에 맞게 조정 */
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .news-ticker-container {
        font-size: 12px;
    }
    
    .news-ticker-item {
        padding: 0 15px;
    }
}

