/* ═══════════════════════════════════════════════════════
   [PERSISTENT-ALERTS] — پیام‌هایی که بالای صفحه می‌مونن
   ═══════════════════════════════════════════════════════ */

.persistent-alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border-right: 4px solid;
  position: relative;
  animation: alert-slide-down .3s ease;
}

@keyframes alert-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.persistent-alert.alert-success {
  background: rgba(40, 199, 111, .1);
  border-right-color: #28C76F;
  color: #0e7a3d;
}
.persistent-alert.alert-danger {
  background: rgba(234, 84, 85, .1);
  border-right-color: #EA5455;
  color: #b02a2a;
}
.persistent-alert.alert-warning {
  background: rgba(255, 159, 67, .1);
  border-right-color: #FF9F43;
  color: #a06300;
}
.persistent-alert.alert-info {
  background: rgba(0, 207, 232, .1);
  border-right-color: #00CFE8;
  color: #0a6e7d;
}

.persistent-alert .alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.persistent-alert.alert-success .alert-icon { color: #28C76F; }
.persistent-alert.alert-danger .alert-icon { color: #EA5455; }
.persistent-alert.alert-warning .alert-icon { color: #FF9F43; }
.persistent-alert.alert-info .alert-icon { color: #00CFE8; }

.persistent-alert .alert-content {
  flex-grow: 1;
  font-weight: 500;
  line-height: 1.5;
}

.persistent-alert .alert-close {
  background: 0;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all .15s;
}

.persistent-alert .alert-close:hover {
  opacity: 1;
  background: rgba(0,0,0,.06);
}

/* Dark mode */
html.dark-style .persistent-alert.alert-success {
  background: rgba(40, 199, 111, .15);
  color: #6ee7a5;
}
html.dark-style .persistent-alert.alert-danger {
  background: rgba(234, 84, 85, .15);
  color: #ff8f8f;
}
html.dark-style .persistent-alert.alert-warning {
  background: rgba(255, 159, 67, .15);
  color: #ffc47a;
}
html.dark-style .persistent-alert.alert-info {
  background: rgba(0, 207, 232, .15);
  color: #7ee0fa;
}
html.dark-style .persistent-alert .alert-close:hover {
  background: rgba(255,255,255,.1);
}
