/**
 * Notice Management – Public Notice Board CSS
 * RTL | Persian | v1.0.0
 */

/* ─── Variables ─────────────────────────── */
.ppss-notice-list,
.notice-board {
  --pp-black: #282828;
  --pp-white: #FFFFFF;
  --pp-red-light: #ffe5e5;
  --pp-red-dark: #c21d1d;
  --pp-red: #FF4242;
  --pp-shadow-card3: 0 0 3px 0 rgba(40,40,40,.20);
  --pp-shadow-card-hover: 0 8px 32px rgba(40,40,40,.12);
  --pp-gray0: #F6F6F6;
  --pp-gray2: #E0E0E0;
  --pp-gray3: #C1C1C1;
  --pp-gray5: #515151;
  --pp-background: #F4F6FB;
  --pp-orange-dark: #B74E02;
  --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-deep: #003366;
  --pp-blue: #0080FF;
  --pp-radius-small: 12px;
  --ppss-nb-muted: rgba(17,24,39,.6);
  --ppss-nb-border: rgba(17,24,39,.08);
  --nm-transition: all 0.2s ease;
  --nm-font: inherit;
}

/* ─── Reset inside scope ────────────────── */
.ppss-notice-list * { box-sizing: border-box; }
.ppss-notice-list { font-family: var(--nm-font); direction: rtl; }

/* ─── Notice Board Layout ───────────────── */
.notice-board {
  display: flex;
  flex-direction: column;
  gap: 24px;
  direction: rtl;
}
.notice-board:last-child { margin-bottom: 16px; }
.notice-board__inner { }
.notice-board__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.notice-board__heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--pp-black);
  margin: 0;
  flex-shrink: 0;
}

/* ─── Toolbar (کنار عنوان) ──────────────── */
.nm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
  margin-right: auto;
}
/* دکمه به من خبر بده */
.nm-notify-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--pp-blue);
  background: var(--pp-white);
  color: var(--pp-blue-dark);
  font-family: var(--nm-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--nm-transition);
  white-space: nowrap;
}
.nm-notify-btn:hover { background: var(--pp-blue); color: #fff; }
.nm-notify-btn svg { flex-shrink: 0; }
/* فیلتر dropdown */
.nm-filter-dropdown {
  position: relative;
  display: inline-block;
}
.nm-filter-dropdown__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--pp-gray2);
  background: var(--pp-white);
  color: var(--pp-gray8, #2C3040);
  font-family: var(--nm-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--nm-transition);
  white-space: nowrap;
  user-select: none;
}
.nm-filter-dropdown__btn:hover { border-color: var(--pp-blue); color: var(--pp-blue-dark); }
.nm-filter-dropdown__btn.is-active { border-color: var(--pp-blue); background: var(--pp-blue-light); color: var(--pp-blue-dark); }
.nm-filter-dropdown__btn .nm-caret {
  width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s;
}
.nm-filter-dropdown.is-open .nm-caret { transform: rotate(180deg); }
.nm-filter-dropdown__panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--pp-white);
  border: 1.5px solid var(--pp-gray2);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  z-index: 999;
  padding: 8px 0;
  overflow: hidden;
}
.nm-filter-dropdown.is-open .nm-filter-dropdown__panel { display: block; }
.nm-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  color: var(--pp-black);
}
.nm-filter-option:hover { background: var(--pp-gray0); }
.nm-filter-option.is-selected { color: var(--pp-blue-dark); }
.nm-filter-option__check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--pp-gray3);
  background: var(--pp-white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--nm-transition);
}
.nm-filter-option.is-selected .nm-filter-option__check {
  background: var(--pp-blue); border-color: var(--pp-blue);
}
.nm-filter-option__check svg { display: none; }
.nm-filter-option.is-selected .nm-filter-option__check svg { display: block; }
.nm-toggle-resolved {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--pp-gray5);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--pp-gray2);
  background: var(--pp-white);
  transition: var(--nm-transition);
  user-select: none;
}
.nm-toggle-resolved::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--pp-gray3);
  background: var(--pp-white);
  flex-shrink: 0;
  transition: var(--nm-transition);
}
.nm-toggle-resolved:hover { border-color: var(--pp-gray3); background: var(--pp-gray0); }
.nm-toggle-resolved input { display: none; }
/* حالت active (checked) – از JS ست میشه، اما fallback CSS هم داریم */
.nm-toggle-resolved.is-active,
.nm-toggle-resolved:has(input:checked) {
  background: var(--pp-blue-light) !important;
  border-color: var(--pp-blue) !important;
  color: var(--pp-blue-dark) !important;
}
.nm-toggle-resolved.is-active::before,
.nm-toggle-resolved:has(input:checked)::before {
  background: var(--pp-blue);
  border-color: var(--pp-blue);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ─── Filter Bar ────────────────────────── */
.notice-board .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;
}
.nm-filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.nm-filter-scroll::-webkit-scrollbar { display: none; }

.ppss-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--pp-radius-small);
  border: 1.5px solid var(--pp-gray3);
  background: var(--pp-white);
  color: var(--pp-gray5);
  font-family: var(--nm-font);
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
  transition: var(--nm-transition);
  white-space: nowrap;
  appearance: none;
  flex-shrink: 0;
}
.ppss-filter-chip:hover {
  background: rgba(17,24,39,.04);
  border-color: var(--pp-gray2);
}
.ppss-filter-chip.is-active {
  background: var(--pp-blue-light) !important;
  border-color: var(--pp-blue) !important;
  color: var(--pp-blue) !important;
}


/* ─── Group Sections ────────────────────── */
.nm-group {
  margin-bottom: 0px;
}
.nm-group:last-child { margin-bottom: 0; }

.nm-group__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pp-gray2);
}
/* آیکون دایره گروه حذف شد (مورد ۲) */
.nm-group__icon { display: none; }

.nm-group__title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  font-family: inherit;
}
.nm-group--active      .nm-group__title { color: var(--pp-orange-dark); }
.nm-group--maintenance .nm-group__title { color: var(--pp-blue-dark); }
.nm-group--resolved    .nm-group__title { color: #2e7a2e; }

.nm-group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.nm-group--active      .nm-group__count { background: var(--pp-orange-light); color: var(--pp-orange-dark); }
.nm-group--maintenance .nm-group__count { background: var(--pp-blue-light);   color: var(--pp-blue-dark); }
.nm-group--resolved    .nm-group__count { background: var(--pp-green-light);  color: #2e7a2e; }

/* گروه resolved وقتی toggle فعاله مخفی میشه */
.nm-group--resolved.nm-group--hidden { display: none !important; }

/* ─── Pin Badge ─────────────────────────── */
.nm-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF3CD;
  color: #856404;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Cards ─────────────────────────────── */
.notice-board__cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ─── Timeline Head — بیرون از کارت ─────── */
.notice-item__timeline-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 0;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* آیکون ۳: 40px */
.notice-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  /* رنگ از inline style می‌آید */
}

.notice-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pp-gray5);
  font-size: 12px;
  font-weight: 500;
  flex-wrap: wrap;
}

/* ۴: پین سمت چپ */
.nm-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF3CD;
  color: #856404;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Notice Item — کارت اصلی ───────────── */
/* ۴: margin-top 10px */
.notice-item {
  background-color: var(--pp-white);
  box-shadow: var(--pp-shadow-card3);
  border-radius: 16px 0 16px 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: var(--nm-transition);
  border: 1.5px solid transparent;
  margin-top: 10px;
}
.notice-item:hover {
  box-shadow: var(--pp-shadow-card-hover);
}

/* border رنگ‌ها */
.notice--default     { border-color: rgba(223, 217, 212, 0.15); }
.notice--resolved    { border-color: rgba(2,88,77,.12); }
.notice--maintenance { border-color: rgba(0,128,255,.15); }

/* ─── Notice Header ─────────────────────── */
.notice-item__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notice-item__title {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  color: var(--pp-black);
  margin: 0;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.notice-item__type-label {
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.notice-item__type-sep {
  color: var(--pp-gray3);
  font-weight: 400;
  flex-shrink: 0;
}


/* ─── Notice Item ───────────────────────── */
.notice-item__divider {
  width: 1px;
  height: 14px;
  background-color: var(--pp-gray2);
  display: inline-block;
  flex-shrink: 0;
}

/* ─── Body ──────────────────────────────── */
.notice-item__body {
  border-top: 1px solid var(--pp-gray2);
  padding-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--pp-black);
}
.notice-item__body.has-updates { border-top: none; padding-top: 0; }
.notice-item__body p { margin: 0 0 8px; }
.notice-item__body p:last-child { margin-bottom: 0; }

/* ─── Affected Services ─────────────────── */
.notice-item__affected {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.notice-item__affected-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pp-black);
}
.notice-item__affected-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notice-item__affected-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--pp-radius-small);
  background: var(--pp-blue-light);
  color: var(--pp-blue-dark);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0,128,255,.15);
}

/* ─── Updates Timeline ──────────────────── */
.notice-item__updates {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1.5px solid var(--pp-gray2);
  padding-top: 4px;
  min-width: 0;
  overflow: hidden;
}
.notice-item__update-row {
  border-bottom: 1px solid var(--pp-gray2);
  padding: 12px 0;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.notice-item__update-row:last-child { border-bottom: none; padding-bottom: 0; }
.notice-item__update-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.notice-item__update-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
}
.notice-item__update-badge--red    { background: var(--pp-red); color: var(--pp-white); }
.notice-item__update-badge--yellow { background: var(--pp-orange-light); color: var(--pp-orange-dark); }
.notice-item__update-badge--blue   { background: var(--pp-blue-light); color: var(--pp-blue-dark); }
.notice-item__update-badge--gray   { background: var(--pp-gray0); color: var(--pp-gray5); }

.notice-item__update-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pp-black);
  font-size: 12px;
  font-weight: 600;
}
.notice-item__update-text {
  font-size: 13px;
  color: var(--pp-black);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
  min-width: 0;
}
.notice-item__update-text p {
  margin: 0 0 6px;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.notice-item__update-text p:last-child { margin-bottom: 0; }

/* ─── Footer (resolved) ─────────────────── */
.notice-item__footer {
  display: flex;
  flex-direction: column;
  box-shadow: var(--pp-shadow-card3);
  background-color: var(--pp-background);
  border-radius: 10px;
  padding: 14px 16px;
  gap: 8px;
}
.notice-item__reply {
  margin: 0;
  font-size: 13px;
  color: var(--pp-black);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
  min-width: 0;
}

/* ─── Load More ─────────────────────────── */
.notice-board__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.notice-board__more-btn {
  background: var(--pp-blue-light);
  color: var(--pp-blue-deep);
  border: none;
  border-radius: 12px;
  padding: 10px 24px;
  font-family: var(--nm-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--nm-transition);
}
.notice-board__more-btn:hover { background: var(--pp-blue); color: var(--pp-white); }
.notice-board__more-btn svg path { transition: var(--nm-transition); }
.notice-board__more-btn:hover svg path { stroke: var(--pp-white); }
.notice-board__more-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Empty State ───────────────────────── */
.nm-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--pp-gray5);
  font-size: 14px;
  background: var(--pp-white);
  border-radius: 16px;
  box-shadow: var(--pp-shadow-card3);
}

/* ─── Loading Skeleton ──────────────────── */
.nm-skeleton {
  background: linear-gradient(90deg, var(--pp-gray0) 25%, var(--pp-gray2) 50%, var(--pp-gray0) 75%);
  background-size: 200% 100%;
  animation: nmSkeleton 1.2s infinite;
  border-radius: 8px;
}
@keyframes nmSkeleton { 0%{ background-position:200% 0 } 100%{ background-position:-200% 0 } }

/* ─── Timeline dotted line ──────────────── */
.nm-group__cards .item {
  position: relative;
  padding-right: 20px;  /* فضا برای خط نقطه‌چین */
}

/* خط نقطه‌چین — از مرکز آیکون به پایین 
.nm-group__cards .item::before {
  content: '';
  position: absolute;
  right: 19px;          
  top: 40px;            
  bottom: 0;
  width: 2px;
  background-image: radial-gradient(circle, var(--pp-gray3) 1px, transparent 1px);
  background-size: 2px 10px;
  background-repeat: repeat-y;
}
*/
/* آخرین آیتم خط نقطه‌چین نداره */
.nm-group__cards .item:last-child::before {
  display: none;
}
.ppss-notice-list .item.ppss-filter-hidden { display: none !important; }
.ppss-notice-list .item.ppss-resolved-hidden { display: none !important; }

/* ─── Animations ────────────────────────── */
.notice-item { animation: nmFadeUp 0.3s ease both; }
@keyframes nmFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notice-item:nth-child(1) { animation-delay: 0.05s; }
.notice-item:nth-child(2) { animation-delay: 0.10s; }
.notice-item:nth-child(3) { animation-delay: 0.15s; }
.notice-item:nth-child(4) { animation-delay: 0.20s; }
.notice-item:nth-child(5) { animation-delay: 0.25s; }

/* ─── Desktop (Timeline mode) ───────────── */
@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__cards { gap: 0; }
  .notice-board__cards .item {
    padding-right: 32px;
    padding-bottom: 24px;
  }
  .notice-board__cards .item:last-child { margin-bottom: 22px; 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__meta { flex-direction: row; justify-content: flex-start; }
  .notice-item__open-time { position: static; }
  .notice-item__timeline-head { padding-right: 0; }
  .nm-group__cards .item { padding-right: 33px;margin-right: 18px; }
  .nm-group__cards .item::before { right: 23px; }
  .notice-item__footer { border-radius: 14px; }
}

/* ─── UI Overrides: border-radius 5px, no hover shadow ─── */
.notice-item {
  border-radius: 16px 0 16px 16px!important;
  transition: border-color 0.2s ease !important;
  padding: 24px;
}
.notice-item:hover {
  box-shadow: var(--pp-shadow-card3) !important;
  transform: none !important;
}
.notice-item__footer { border-radius: 5px !important; }
.nm-group { border-radius: 5px; }
.nm-group__header { border-radius: 5px 5px 0 0; }
.ppss-filter-chip { border-radius: 5px !important; }
.nm-toggle-resolved { border-radius: 5px !important; }
.nm-notify-btn { border-radius: 5px !important; }
.nm-filter-dropdown__btn { border-radius: 5px !important; }
.nm-filter-dropdown__panel { border-radius: 5px !important; }
.notice-item__affected-tag { border-radius: 5px !important; }
.notice-item__update-badge { border-radius: 5px !important; }
.nm-group__count { border-radius: 5px !important; }

/* ─── Notify Modal ──────────────────────── */
.nm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.nm-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}
.nm-modal {
  background: var(--pp-white);
  border-radius: 5px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  direction: rtl;
  transform: translateY(20px);
  transition: transform 0.25s ease;
  overflow: hidden;
}
.nm-modal-overlay.is-open .nm-modal {
  transform: translateY(0);
}
.nm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1.5px solid var(--pp-gray2);
}
.nm-modal__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--pp-black);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nm-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pp-gray5);
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  transition: var(--nm-transition);
}
.nm-modal__close:hover { background: var(--pp-gray0); color: var(--pp-black); }
.nm-modal__body { padding: 20px; }
.nm-modal__footer { padding: 14px 20px; border-top: 1.5px solid var(--pp-gray2); }

/* مراحل modal */
.nm-step { display: none; }
.nm-step.is-active { display: block; }
.nm-step-indicator {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
}
.nm-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pp-gray2); transition: var(--nm-transition);
}
.nm-step-dot.is-active { background: var(--pp-blue); width: 20px; border-radius: 4px; }

/* فیلد modal */
.nm-modal-field { margin-bottom: 14px; }
.nm-modal-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pp-black);
  margin-bottom: 6px;
}
.nm-modal-input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 5px;
  border: 1.5px solid var(--pp-gray2);
  font-family: var(--nm-font);
  font-size: 13px;
  color: var(--pp-black);
  direction: rtl;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}
.nm-modal-input:focus { border-color: var(--pp-blue); box-shadow: 0 0 0 3px rgba(0,128,255,.1); }
.nm-modal-input.is-error { border-color: var(--pp-red); }
.nm-modal-input[type="tel"] { direction: ltr; text-align: right; letter-spacing: 1px; }

/* OTP input */
.nm-otp-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.nm-otp-wrap .nm-modal-input { flex: 1; letter-spacing: 4px; font-size: 16px; font-weight: 700; text-align: center; }

/* countdown */
.nm-otp-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pp-gray5);
  margin-top: 8px;
  font-weight: 600;
}
.nm-otp-timer__count {
  font-size: 14px;
  font-weight: 800;
  color: var(--pp-blue-dark);
  min-width: 28px;
  text-align: center;
}
.nm-otp-timer__count.is-danger { color: var(--pp-red); }
.nm-resend-btn {
  background: none;
  border: none;
  color: var(--pp-blue);
  font-family: var(--nm-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: none;
}
.nm-resend-btn.is-visible { display: inline; }

/* دکمه modal */
.nm-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  border: none;
  background: var(--pp-blue);
  color: #fff;
  font-family: var(--nm-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--nm-transition);
}
.nm-modal-btn:hover { background: var(--pp-blue-dark); }
.nm-modal-btn:disabled { opacity: .5; cursor: not-allowed; }

/* پیام خطا/موفق */
.nm-modal-msg {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 5px;
  margin-top: 10px;
  display: none;
}
.nm-modal-msg.is-error   { background: var(--pp-red-light, #fff0f0); color: #c0392b; display: block; }
.nm-modal-msg.is-success { background: var(--pp-green-light); color: var(--pp-green-dark); display: block; }

/* حالت موفق نهایی */
.nm-modal-success-state {
  text-align: center;
  padding: 20px 0;
  display: none;
}
.nm-modal-success-state.is-active { display: block; }
.nm-modal-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--pp-green-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.nm-modal-success-state h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.nm-modal-success-state p { font-size: 13px; color: var(--pp-gray5); margin: 0; }
