#ksn-notice-bar {
    --ksn-default-bg: #123a5e;
    --ksn-default-fg: #ffffff;
    --ksn-accent: #f5a623;

    direction: rtl;
    background: var(--ksn-default-bg);
    color: var(--ksn-default-fg);
    font: 16px/1.5 IRANSans, Tahoma, Arial, sans-serif;
    height: 48px;
    position: relative;
    z-index: 999;
    contain: layout style paint;
}

.ksn-notice-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    overflow: hidden;
    text-align: center;
    background: var(--ksn-slide-bg, var(--ksn-default-bg));
    color: var(--ksn-slide-fg, var(--ksn-default-fg));
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s linear, visibility 0s linear .35s;
}

.ksn-notice-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.ksn-notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.ksn-notice-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}

a.ksn-notice-content:hover,
a.ksn-notice-content:focus-visible {
    color: var(--ksn-accent);
}

.ksn-notice-image {
    display: block;
    max-width: 100%;
    height: 42px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

/* حالت موبایل: ریز کردن فونت و اجازه شکستن متن طولانی (در صورت نیاز) */
@media (max-width: 768px) {
    #ksn-notice-bar {
        height: auto;
        min-height: 42px;
        padding: 6px 10px;
    }

    .ksn-notice-slide {
        position: relative;
        inset: auto;
        display: none;
    }

    .ksn-notice-slide.is-active {
        display: flex;
    }

    .ksn-notice-text {
        white-space: normal; /* اجازه دو خطی شدن متن‌های طولانی */
        font-size: 13px;
        line-height: 1.4;
    }
}
