/**
 * PP Service Status – Notice Board (لیست اطلاعیه‌ها)
 *
 * ساختار:
 * ۱) متغیرها (رنگ‌ها و مقادیر مشترک – تم + پلاگین)
 * ۲) استایل اصلی (از تم پارس‌پک – frontend.min.css)
 * ۳) کاستوم پلاگین (تغییرات و افزودنی‌های خودمان)
 */

/* ═══════════════════════════════════════════════════════════════════════════
   ۱) متغیرها – تمام رنگ‌ها و مقادیر به متغیر نسبت داده شده‌اند
   ═══════════════════════════════════════════════════════════════════════════ */

.notice-board,
.ppss-notice-list {
  /* مقادیر پایه (پلاگین) */
  --ppss-nb-muted: rgba(17, 24, 39, 0.6);
  --ppss-nb-border: rgba(17, 24, 39, 0.08);
  --ppss-nb-green: #24b47e;
  --ppss-nb-blue: #0077ff;
  --ppss-nb-yellow: #ffd68a;
  --ppss-nb-red-soft: #ffe5e5;
  /* فیلتر (فیگما) */
  --pp-radius-small: 12px;
  /* متغیرهای استایل اصلی تم (همان نام‌ها برای سازگاری) */

  --pp-black: #282828;
  --pp-white: #FFFFFF;
  --pp-shadow-card3: 0 0 3px 0 rgba(40, 40, 40, 0.20);
  --pp-gray2: #E0E0E0;
  --pp-gray3: #C1C1C1;
  --pp-gray5: #515151;
  --pp-background: #F4F6FB;
  --pp-orange-light: #FFE7CD;
  --pp-orange: #FF8605;
  --pp-green-light: #C7FEF7;
  --pp-green-dark: #02584D;
  --pp-green: #05DBC1;
  --pp-blue-light: #E9F4FF;
  --pp-blue-dark: #0066CC;
  --pp-blue: #0080FF;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ۲) استایل اصلی – از تم پارس‌پک (frontend.min.css)
   ═══════════════════════════════════════════════════════════════════════════ */

.notice-board {
  display: flex;
  flex-direction: column;
  gap: 24px;
  direction: rtl;
}

.notice-board:last-child {
  margin-bottom: 16px;
}

.notice-board__inner {
  max-width: 58.5rem;
}

.notice-board__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-bottom: 1rem;
}

.notice-board .notice-board__filter.ppss-filter-bar {
  direction: rtl;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.notice-board .ppss-filter-bar__swiper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.notice-board .ppss-filter-bar .swiper-container {
  overflow: hidden;
  max-width: 100%;
}

.notice-board .ppss-filter-bar .swiper {
  overflow: hidden;
  max-width: 100%;
}

.notice-board .ppss-filter-bar .swiper-wrapper {
  box-sizing: border-box;
}

.notice-board .ppss-filter-bar .swiper-slide {
  width: auto !important;
  flex-shrink: 0;
}

.notice-board .ppss-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--pp-radius-small);
  border: 1px solid var(--pp-gray3);
  background: var(--pp-white);
  color: var(--pp-gray5);
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  appearance: none;
}

.notice-board .ppss-filter-chip:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: var(--pp-gray2);
}

.notice-board .ppss-filter-chip.is-active,
.notice-board .ppss-filter-bar .ppss-filter-btn.is-active:hover {
  background: var(--pp-blue-light) !important;
  border-color: var(--pp-blue) !important;
  color: var(--pp-blue) !important;
}

.notice-board .ppss-filter-chip__text {
  display: inline;
}

/* مخفی کردن آیتم‌های غیرهم‌خوان با فیلتر */
.ppss-notice-list .notice-board .item.ppss-filter-hidden {
  display: none !important;
}

.notice-board__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notice-board__cards .item:last-child {
  margin-bottom: 32px;
}

.notice-board__cards .notice-item__control {
  padding-top: 16px;
}

.notice-item {
  background-color: var(--pp-white);
  box-shadow: var(--pp-shadow-card3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.notice-item__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--pp-gray2);
  padding-bottom: 16px;
}

.notice-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-item__content {
  flex: 1;
}

.notice-item__title {
  flex: 1 1 200px;
}

.notice-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pp-gray5);
}

.notice-item__divider {
  width: 1px;
  height: 24px;
  background-color: var(--pp-gray2);
  display: inline-block;
}

.notice-item__status {
  display: flex;
  align-items: center;
  font-weight: bold;
  gap: 8px;
}

.notice-item__status .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-item__affected {
  margin-top: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.notice-item__affected-label {
  text-align: center;
  /* Body 4 */
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  color: var(--pp-black);
}

.notice-item__affected-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice-item__affected-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--pp-radius-small);
  border: none;
  background: var(--pp-blue-light);
  color: var(--pp-blue-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: normal;
}

.notice-item__footer {
  display: flex;
  flex-direction: column;
  box-shadow: var(--pp-shadow-card3);
  background-color: var(--pp-background);
  border-radius: 8px;
  padding: 16px;
  gap: 16px;
}

.notice--default .notice-item__icon {
  background-color: var(--pp-orange-light);
}

.notice--default .notice-item__icon path {
  fill: var(--pp-orange);
}

.notice--default .notice-item__status {
  color: var(--pp-orange);
}

.notice--resolved .notice-item__icon {
  background-color: var(--pp-green-light);
}

.notice--resolved .notice-item__icon path {
  fill: var(--pp-green-dark);
}

.notice--resolved .notice-item__status {
  color: var(--pp-green);
}

@media only screen and (min-width: 1051px) {
  .notice-board:last-child {
    margin-bottom: 28px;
  }

  .notice-board__head {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 1.625rem;
  }

  .notice-board__head:first-of-type {
    transform: translateX(16px);
  }

  .notice-board__cards {
    gap: 0;
  }

  .notice-board__cards .item {
    padding-right: 28px;
    padding-bottom: 24px;
  }

  .notice-board__cards .item:last-child {
    margin-bottom: 52px;
    padding-bottom: 0;
  }

  .notice-board__cards .item:not(.no-border) {
    background-image: radial-gradient(circle, var(--pp-gray3) 1px, transparent 1px);
    background-position: right center;
    background-size: 2px 16px;
    background-repeat: repeat-y;
  }

  .notice-item {
    margin-top: 32px;
    padding: 24px;
    border-radius: 16px 0 16px 16px;
  }

  .notice-item__icon {
    width: 40px;
    height: 40px;
    position: absolute;
    right: -46.5px;
    top: -42px;
  }

  .notice-item__meta {
    flex-direction: row-reverse;
    justify-content: flex-end;
  }

  .notice-item__open-time {
    position: absolute;
    right: 0;
    top: -32px;
  }

  .notice-item__status .icon {
    width: 40px;
    height: 40px;
  }

  .notice-item__footer {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    border-radius: 16px;
  }

  .notice-item__footer .notice-item__meta {
    flex-direction: row;
    justify-content: flex-start;
  }
}

