/* Header: reuse cart visual language */
.eca-notif-header-module {
  .eca-notif-icon {
    display: block;
    width: 22px;
    height: 22px;
    color: #161616;
    margin: 0 auto 5px;
  }

  .cart-preview-desktop {
    background: transparent !important;
    padding: 9px 0 !important;

    &:hover {
      box-shadow: unset !important;
      background-color: unset !important;

      >span {

        .eca-notif-icon,
        i {
          color: #e70036 !important;
        }

        span {
          color: #e70036;
        }
      }
    }

    >span {
      display: grid;
      justify-items: center;
      gap: 2px;

      .cart-design {
        margin-bottom: 0;
        position: relative;

        i {
          color: #161616;
          font-size: 22px;
          margin-bottom: 5px;
          -webkit-text-stroke: 0.85px white;
        }

        .cart-products-count,
        .eca-notif-count {
          border-color: #ffc5cc;
          background-color: #ffc5cc !important;
          color: #e70036;
          top: -12px;
          right: auto;
          left: -8px;
          width: 20px;
          height: 21px;
          line-height: 19px;
          font-size: 10px;
          text-align: center;
          border-radius: 50%;
          position: absolute;
          display: block;
          border: 1px solid #ffc5cc;
        }
      }

      .cart-design-text {
        color: #161616;
        font-weight: 500;
        font-size: 11px;
        min-width: 55px;
        text-align: center;
        overflow: hidden;
      }
    }
  }

  .cart-preview-mobile {
    display: none;
  }

  .eca-notif-count.is-zero {
    display: none !important;
  }
}

.a-mobile-device .eca-notif-header-module .cart-preview-desktop {
  display: none !important;
}

/* Notifications page */
.eca-notif-page {
  direction: rtl;
}

.eca-notif-page__card {
  background: #fff;
  border: 1px solid #eceff1;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(22, 22, 22, 0.04);
  padding: 20px 22px 24px;
}

.eca-notif-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef1f4;
}

.eca-notif-page__toolbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.eca-notif-page__toolbar-icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff0f3;
  border: 1px solid #ffe3e8;
}

.eca-notif-page__bell {
  width: 26px;
  height: 26px;
  color: #e70036;
}

.eca-notif-page__toolbar-title {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 800;
  color: #161616;
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .eca-notif-page__toolbar-title {
    font-size: 16px;
  }
}

.eca-notif-page__toolbar-unread {
  font-size: 13px;
  font-weight: 600;
  color: #8a939b;
}

.eca-notif-page__toolbar-sub {
  margin: 0;
  font-size: 13px;
  color: #8a939b;
  line-height: 1.5;
}

.eca-notif-page__mark-all {
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff0f3 !important;
  color: #e70036 !important;
  padding: 10px 16px !important;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
  transition: background 0.15s ease;
}

.eca-notif-page__mark-all-icon {
  flex: none;
  font-size: 20px;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eca-notif-page__mark-all:hover:not(:disabled),
.eca-notif-page__mark-all:focus:not(:disabled) {
  background: #ffe4ea !important;
  color: #cf002f !important;
}

.eca-notif-page__mark-all:disabled {
  opacity: 0.45;
}

.eca-notif-page__controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
}

.eca-notif-page__filters {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  border-bottom: 1px solid #eef1f4;
  flex: 1 1 auto;
}

.eca-notif-page__controls-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-bottom: 10px;
}

.eca-notif-tab {
  border: 0;
  background: transparent;
  color: #7a8791;
  padding: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eca-notif-tab__count {
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  background: #eef2f5;
  color: #607580;
}

.eca-notif-tab:hover {
  color: #161616;
}

.eca-notif-tab.is-active {
  color: #e70036;
}

.eca-notif-tab.is-active .eca-notif-tab__count {
  background: #ffe4ea;
  color: #e70036;
}

.eca-notif-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #e70036;
}

.eca-notif-page__sort {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-width: 170px;
  max-width: 100%;
  height: 40px;
  padding: 0;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  background: #fff;
  margin-right: auto;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.eca-notif-page__sort.is-open {
  border-color: #e70036;
  z-index: 5;
}

.eca-notif-page__sort-icon {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  color: #8a939b;
  display: inline-flex;
  pointer-events: none;
  transition: color 0.15s ease;
}

.eca-notif-page__sort-icon svg {
  width: 100%;
  height: 100%;
}

.eca-notif-page__sort.is-open .eca-notif-page__sort-icon {
  color: #e70036;
}

.eca-notif-page__sort-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
  cursor: pointer;
  direction: rtl;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.eca-notif-page__sort-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.eca-notif-page__sort-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #8a939b;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  transition: color 0.15s ease;
}

.eca-notif-page__sort-chevron i {
  display: inline-block;
  transition: transform 0.15s ease;
}

.eca-notif-page__sort.is-open .eca-notif-page__sort-chevron {
  color: #e70036;
}

.eca-notif-page__sort.is-open .eca-notif-page__sort-chevron i {
  transform: rotate(180deg);
}

.eca-notif-page__sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(22, 22, 22, 0.1);
  box-sizing: border-box;
}

.eca-notif-page__sort-menu[hidden] {
  display: none !important;
}

.eca-notif-page__sort-menu li {
  margin: 0;
}

.eca-notif-page__sort-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
  text-align: right;
  cursor: pointer;
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eca-notif-page__sort-menu button:hover,
.eca-notif-page__sort-menu button.is-active {
  background: #fff5f5;
  color: #e70036;
}

.eca-notif-page__list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eca-notif-page__list:has(.eca-notif-item) {
  border: 1px solid #eef1f4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.eca-notif-page__loading {
  display: flex;
  flex-direction: column;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.eca-notif-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 36px;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
  transition: background 0.12s ease;
}

.eca-notif-item:last-child {
  border-bottom: 0;
}

.eca-notif-item.is-unread {
  background: #ffe8ef;
}

.eca-notif-item.is-unread:hover {
  background: #ffdee8;
}

.eca-notif-item.is-read:hover {
  background: #fafbfc;
}

.eca-notif-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: #e70036;
  justify-self: center;
  margin-top: 6px;
}

.eca-notif-item__dot.is-empty {
  visibility: hidden;
}

.eca-notif-item__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eca-notif-item__headline {
  min-width: 0;
}

.eca-notif-item__title {
  margin: 0;
  font-weight: 700;
  color: #161616;
  font-size: 14px;
  line-height: 1.45;
  display: block;
}

.eca-notif-item__title-link {
  color: inherit;
  text-decoration: none;
}

.eca-notif-item__title-link:hover {
  color: #e70036;
}

.eca-notif-item__body {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #5c6670;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  text-align: justify;
}

.eca-notif-item__body a {
  color: #e70036;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.eca-notif-item__body a:hover {
  color: #c4002f;
}

.eca-notif-item__when {
  font-size: 12px;
  font-family: IRANSansFaNum, IranSANS, sans-serif;
  color: #90a4ae;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
  line-height: 1.4;
  direction: rtl;
  font-variant-numeric: normal;
}

.eca-notif-item__mark-read {
  flex: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.eca-notif-item__mark-read-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8ecef;
  box-shadow: 0 2px 6px rgba(22, 22, 22, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eca-notif-item__mark-read-box {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #b0bec5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.eca-notif-item.is-unread .eca-notif-item__mark-read:not(.is-done) .eca-notif-item__mark-read-box {
  border-color: #cfd8dc;
  color: #90a4ae;
}

.eca-notif-item.is-unread .eca-notif-item__mark-read:not(.is-done):hover .eca-notif-item__mark-read-box,
.eca-notif-item.is-unread .eca-notif-item__mark-read:not(.is-done):focus-visible .eca-notif-item__mark-read-box {
  border-color: #e70036;
  color: #e70036;
  background: rgba(231, 0, 54, 0.06);
}

.eca-notif-item.is-unread .eca-notif-item__mark-read:not(.is-done):hover .eca-notif-item__mark-read-icon,
.eca-notif-item.is-unread .eca-notif-item__mark-read:not(.is-done):focus-visible .eca-notif-item__mark-read-icon {
  border-color: #ffc5cc;
}

.eca-notif-skeleton {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 72px 36px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
}

.eca-notif-skeleton:last-child {
  border-bottom: 0;
}

.eca-notif-skeleton__dot,
.eca-notif-skeleton__check,
.eca-notif-skeleton__bar {
  background: linear-gradient(90deg, #eceff1 25%, #e3e8ee 37%, #eceff1 63%);
  background-size: 400% 100%;
  animation: ecaNotifShine 1.2s ease infinite;
}

.eca-notif-skeleton__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: center;
}

.eca-notif-skeleton__line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.eca-notif-skeleton__bar {
  display: block;
  height: 10px;
  border-radius: 999px;
}

.eca-notif-skeleton__bar--title {
  width: 55%;
  max-width: 240px;
  height: 12px;
}

.eca-notif-skeleton__bar--preview {
  width: 78%;
  max-width: 360px;
}

.eca-notif-skeleton__bar--time {
  width: 56px;
  height: 10px;
}

.eca-notif-skeleton__check {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.eca-notif-page__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef1f4;
  direction: ltr;
  flex-wrap: wrap;
}

.eca-notif-page__footer[hidden] {
  display: none !important;
}

.eca-notif-page__footer-per {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
  font-size: 13px;
  color: #78909c;
}

.eca-notif-page__per-label {
  margin: 0;
  font-weight: 600;
  color: #607580;
}

.eca-notif-page__per-select {
  height: 36px;
  min-width: 64px;
  padding: 0 10px;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  background: #fff;
  color: #455a64;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  direction: ltr;
  text-align: center;
}

.eca-notif-page__per-select:focus {
  border-color: #e70036;
  outline: none;
}

.eca-notif-page__per-suffix {
  white-space: nowrap;
}

.eca-notif-page__pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.eca-notif-page__pager[hidden] {
  display: none !important;
}

.eca-notif-page__page-info {
  min-width: 88px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
  text-align: center;
  direction: rtl;
  white-space: nowrap;
}

.eca-notif-page__pager-btn {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 1px solid #e3e8ee !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #546e7a !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.eca-notif-page__pager-btn:hover:not(:disabled) {
  border-color: #cfd8dc !important;
  color: #161616 !important;
}

.eca-notif-page__pager-btn:disabled {
  opacity: 0.45;
}

.eca-notif-page__empty {
  text-align: center;
  color: #90a4ae;
  padding: 48px 16px;
  border: 1px dashed #dde3e8;
  border-radius: 14px;
  background: #fafbfc;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.eca-notif-page__empty i {
  display: block;
  font-size: 24px;
  color: #cfd8dc;
}

@keyframes ecaNotifShine {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

@media (max-width: 767px) {
  .box-bg-title-body .body:has(.eca-notif-page) {
    padding: 0;
  }

  .eca-notif-page {
    margin: 0;
  }

  .eca-notif-page__card {
    padding: 18px 16px 22px;
    border-radius: 16px;
    border-color: #eceff1;
    box-shadow: none;
  }

  .eca-notif-page__toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .eca-notif-page__mark-all {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 140px;
  }

  .eca-notif-page__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .eca-notif-page__filters {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .eca-notif-tab {
    flex: 1 1 0;
    justify-content: center;
    font-size: 13px;
    gap: 6px;
  }

  .eca-notif-page__controls-end {
    width: 100%;
    padding-bottom: 0;
  }

  .eca-notif-page__sort {
    width: 100%;
    min-width: 0;
    margin-right: 0;
    height: 44px;
    border-radius: 12px;
  }

  .eca-notif-page__sort-toggle {
    padding: 0 14px;
  }

  .eca-notif-item {
    grid-template-columns: 8px minmax(0, 1fr) 32px;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 12px 14px;
    align-items: start;
  }

  .eca-notif-item__dot {
    grid-column: 1;
    grid-row: 1;
    margin-top: 5px;
  }

  .eca-notif-item__content {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }

  .eca-notif-item__when {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-top: 0;
    white-space: normal;
    text-align: right;
    max-width: 100%;
  }

  .eca-notif-item__mark-read {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .eca-notif-item__mark-read-icon {
    width: 32px;
    height: 32px;
  }

  .eca-notif-item__mark-read-box {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .eca-notif-item__title {
    font-size: 13px;
    padding-left: 4px;
  }

  .eca-notif-item__body {
    font-size: 12px;
    line-height: 1.7;
  }

  .eca-notif-skeleton {
    grid-template-columns: 8px minmax(0, 1fr) 32px;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 6px 10px;
  }

  .eca-notif-skeleton__dot {
    grid-column: 1;
    grid-row: 1;
  }

  .eca-notif-skeleton__line {
    grid-column: 2;
    grid-row: 1;
  }

  .eca-notif-skeleton__bar--time {
    grid-column: 2;
    grid-row: 3;
    width: 120px;
  }

  .eca-notif-skeleton__check {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 32px;
    height: 32px;
  }

  .eca-notif-page__footer {
    justify-content: center;
    gap: 0;
  }

  .eca-notif-page__footer-per {
    display: none;
  }

  .eca-notif-page__pager {
    justify-content: center;
    width: 100%;
  }
}