/* --- General Wrapper --- */
.news-ticker-wrapper {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    padding: 10px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

/* --- Ticker Label --- */
.ticker-label {
    color: #ffffff;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    text-transform: uppercase;
    position: relative;
    line-height: 1.3;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Ticker Content --- */
.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 25px;
}
.ticker-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.ticker-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
}
.ticker-list li a {
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticker-item-date {
    font-size: 0.8em;
    margin-left: 10px;
    opacity: 0.8;
}

/* --- Navigation Arrows --- */
.ticker-navigation {
    display: flex;
    align-items: center;
}
.ticker-nav-arrow {
    cursor: pointer;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: all 0.3s ease;
}
.ticker-nav-arrow svg {
    width: 12px;
    height: 12px;
    fill: #333;
}
.ticker-nav-arrow.arrow-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ticker-nav-arrow:hover {
    background: rgba(0,0,0,0.1);
}

/* ===========================================
   PREDEFINED DESIGNS
============================================== */

/* --- Design: Default --- */
.news-ticker-wrapper.design-default {
    border-radius: 5px;
}
.design-default .ticker-label {
    background-color: #d9534f;
}
.design-default .ticker-list a {
    color: #333;
}
.design-default .ticker-list a:hover {
    color: #d9534f;
}

/* --- Design: Modern Dark --- */
.news-ticker-wrapper.design-modern {
    background-color: #2c3e50;
    border: none;
    border-radius: 0;
}
.design-modern .ticker-label {
    background-color: #e74c3c;
    color: #fff;
}
.design-modern .ticker-list a, .design-modern .ticker-item-date {
    color: #ecf0f1;
}
.design-modern .ticker-list a:hover {
    color: #e74c3c;
}
.design-modern .ticker-nav-arrow {
    background: #34495e;
}
.design-modern .ticker-nav-arrow svg {
    fill: #ecf0f1;
}
.design-modern .ticker-nav-arrow:hover {
    background: #4a637c;
}

/* --- Design: Minimal --- */
.news-ticker-wrapper.design-minimal {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    padding-left: 0;
    padding-right: 0;
}
.design-minimal .ticker-label {
    background-color: #3498db;
}
.design-minimal .ticker-list a {
    color: #555;
}
.design-minimal .ticker-list a:hover {
    color: #3498db;
}

/* --- Design: Glassmorphism --- */
.news-ticker-wrapper.design-glass {
    background: rgba(30, 30, 30, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px;
}
.design-glass .ticker-label {
    background-color: rgba(0, 0, 0, 0.3);
}
.design-glass .ticker-list a, .design-glass .ticker-item-date {
    color: #fff;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.design-glass .ticker-list a:hover {
    color: #ddd;
}
.design-glass .ticker-nav-arrow {
    background: rgba(0,0,0,0.2);
}
.design-glass .ticker-nav-arrow svg {
    fill: #fff;
}

/* --- Design: Heavy Border --- */
.news-ticker-wrapper.design-bordered {
    background-color: #fff;
    border: 3px solid #1e1e1e;
    border-radius: 0;
}
.design-bordered .ticker-label {
    background-color: #1e1e1e;
    color: #fff;
}
.design-bordered .ticker-list a {
    color: #333;
    font-weight: 500;
}
.design-bordered .ticker-list a:hover {
    color: #e74c3c;
}

/* --- Design: Vibrant Gradient --- */
.news-ticker-wrapper.design-gradient {
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    border-radius: 8px;
}
.design-gradient .ticker-label {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.design-gradient .ticker-list a, .design-gradient .ticker-item-date {
    color: #fff;
}
.design-gradient .ticker-list a:hover {
    color: #eee;
}
.design-gradient .ticker-nav-arrow {
    background: rgba(255, 255, 255, 0.15);
}
.design-gradient .ticker-nav-arrow svg {
    fill: #fff;
}

/* ===========================================
   LABEL DESIGNS
============================================== */
.ticker-label.design-1 {
    border-radius: 4px;
}
.ticker-label.design-2 {
    padding-right: 25px;
}
.ticker-label.design-2:after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14.5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 19px 0 19px 15px;
    border-color: transparent transparent transparent;
    border-left-color: inherit;
    transform: translateY(-50%);
    filter: brightness(0.9);
}
.ticker-label.design-3 {
    border-radius: 50px;
}
.ticker-label.design-4 {
    position: relative;
    padding-left: 20px;
    border-radius: 0 3px 3px 0;
}
.ticker-label.design-4:before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 10px;
    background-color: inherit;
    filter: brightness(0.85);
    clip-path: polygon(0 0, 100% 100%, 100% 0);
}
.ticker-label.design-5 {
    border-radius: 4px 0 0 4px;
    padding-right: 25px;
}
.ticker-label.design-5:after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14.5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 19px 0 19px 15px;
    border-color: transparent transparent transparent;
    border-left-color: inherit;
    transform: translateY(-50%);
}
.ticker-label.design-6 {
    clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 50%, 100% 100%, 0 100%);
    padding-right: 25px;
}
.ticker-label.design-7 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    text-align: center;
}

/* ===========================================
   ANIMATION STYLES
============================================== */
.ticker-list.effect-fade li,
.ticker-list.effect-slide-up li {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.ticker-list.effect-fade li.active,
.ticker-list.effect-slide-up li.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.ticker-list.effect-slide-up li {
    transform: translateY(100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.ticker-list.effect-slide-up li.active {
    transform: translateY(0);
}
.ticker-list.effect-scroll {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: ticker-scroll 30s linear infinite;
}
.ticker-list.effect-scroll li {
    position: static;
    opacity: 1;
    visibility: visible;
    margin-right: 40px;
}
.news-ticker-wrapper:hover .ticker-list.effect-scroll {
    animation-play-state: paused;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
