/* فایل header-notice-style.css */

.header-notice-bar {
    width: 1230px; margin: 0 auto; background-color: #333; border-radius: 10px;
    direction: rtl; display: flex; align-items: center; justify-content: space-between;
    padding: 12px 25px; box-sizing: border-box; overflow: hidden;
}

/* --- استایل‌های Skeleton Loading --- */
.hn-skeleton { display: flex; align-items: center; }

.hn-skeleton-text-column {
    flex: 0 1 80%; padding-left: 15px; box-sizing: border-box;
    display: flex; 
    align-items: center;
}
.hn-skeleton-button-column {
    flex: 0 0 20%; display: flex; justify-content: flex-end;
    align-items: center; box-sizing: border-box;
}

.hn-skeleton-line, .hn-skeleton-button, .hn-skeleton-icon-placeholder {
    background-color: #404040; border-radius: 4px;
    background-image: linear-gradient(90deg, #404040 0px, #4d4d4d 40px, #404040 80px);
    background-size: 300px; animation: hn-shimmer 1.5s infinite linear;
}

.hn-skeleton-icon-placeholder { 
    width: 14px; 
    height: 14px;
    margin-left: 10px; 
    border-radius: 3px; 
    flex-shrink: 0; /* برای اطمینان از عدم کوچک شدن در اسکلت */
}
.hn-skeleton-text-column .hn-skeleton-line { width: calc(100% - 24px); height: 16px; } 
.hn-skeleton-button-column .hn-skeleton-button { width: 100px; height: 30px; border-radius: 10px; }

@keyframes hn-shimmer { 0% { background-position: -150px; } 100% { background-position: 150px; } }
.header-notice-bar.hn-content-loaded .hn-skeleton { display: none !important; }

/* --- استایل‌های محتوای واقعی (پس از بارگذاری) --- */
.header-notice-bar .header-notice-text-column,
.header-notice-bar .header-notice-button-column {
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.4s 0.1s ease-out, transform 0.4s 0.1s ease-out;
}

.header-notice-bar .header-notice-text-column {
    flex: 0 1 80%; padding-left: 15px; box-sizing: border-box; overflow: hidden;
    display: flex; 
    align-items: center;
}
.hn-close-icon { 
    width: 14px;  /* ابعاد مشخص برای آیکون */
    height: 14px; /* ابعاد مشخص برای آیکون */
    flex-shrink: 0; /* جلوگیری از کوچک شدن آیکون در چیدمان flex */
    cursor: pointer;
    margin-left: 10px; 
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
    /* فیلتر برای تغییر رنگ آیکون (با فرض سیاه بودن SVG اصلی) به #fafafa */
    /* این فیلتر تلاش می‌کند رنگ را به سفید بسیار روشن (نزدیک به #fafafa) تبدیل کند */
    filter: brightness(0) saturate(100%) invert(99%) sepia(2%) saturate(341%) hue-rotate(195deg) brightness(119%) contrast(97%);
    /* اگر SVG شما رنگ دیگری دارد یا این فیلتر دقیق نیست، ممکن است نیاز به تنظیم داشته باشد. */
    /* یک فیلتر ساده‌تر برای تبدیل به سفید خالص: filter: brightness(0) invert(1); */
}
.hn-close-icon:hover { opacity: 1; }

.header-notice-bar .header-notice-text-column .notice-text {
    color: #FAFAFA; margin: 0; padding: 0; font-size: 15px; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-grow: 1; 
}

.header-notice-bar .header-notice-button-column {
    flex: 0 0 20%; display: flex; justify-content: flex-end;
    align-items: center; box-sizing: border-box;
}

.header-notice-bar.hn-content-loaded.hn-visible .header-notice-text-column,
.header-notice-bar.hn-content-loaded.hn-visible .header-notice-button-column {
    opacity: 1; transform: translateY(0);
}

.notice-button {
    background-color: #FAFAFA; color: #009acd; padding: 6px 18px;
    border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center;
    transition: background-color 0.2s ease, transform 0.2s ease; white-space: nowrap;
}
.notice-button:hover { background-color: #e8e8e8; transform: translateY(-1px); }
.notice-button span { display: inline-block; }
.notice-button .notice-button-icon { /* آیکون دکمه اصلی (action button) */
    width: 1em; height: 1em; margin-right: 8px;
    /* فیلتر این آیکون برای رنگ #009acd باید حفظ شود */
    filter: invert(50%) sepia(84%) saturate(1523%) hue-rotate(165deg) brightness(93%) contrast(101%);
}

/* واکنش‌گرایی */
@media (max-width: 1250px) {
    .header-notice-bar { width: 95%; padding-left: 15px; padding-right: 15px; }
    .hn-skeleton-text-column .hn-skeleton-line { width: calc(100% - 24px - 10px); } 
    .hn-skeleton-button-column .hn-skeleton-button { width: 80px; }
}
@media (max-width: 768px) {
    .header-notice-bar { flex-direction: column; padding-top: 15px; padding-bottom: 15px; }
    .header-notice-bar.is-loading { height: auto; }

    .hn-skeleton-text-column,
    .header-notice-bar .header-notice-text-column {
        flex-basis: auto; width: 100%; padding-left: 0; 
        text-align: center; margin-bottom: 15px;
        justify-content: center;
    }
    .header-notice-bar .header-notice-text-column .notice-text { white-space: normal; overflow: visible; text-overflow: clip; }
    .hn-close-icon { margin-left: 8px; margin-right: 0;  }


    .hn-skeleton-button-column,
    .header-notice-bar .header-notice-button-column {
        flex-basis: auto; width: 100%; justify-content: center;
    }

    .header-notice-bar.is-loading .hn-skeleton-text-column {
        width: 100%; margin-bottom: 10px; padding-left: 0; align-items: center; justify-content: center;
    }
    .hn-skeleton-text-column .hn-skeleton-icon-placeholder { margin-left: 8px; }
    .hn-skeleton-text-column .hn-skeleton-line { height: 16px; width: 70%; }

    .header-notice-bar.is-loading .hn-skeleton-button-column {
        width: 100%; justify-content: center;
    }
     .hn-skeleton-button-column .hn-skeleton-button { height: 28px; width: 120px; }
}