/**
 * Rico Notifications - Modern Central Modal Popups with Animations
 */

#rico-notify-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  direction: rtl;
  font-family: inherit;
}

#rico-notify-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.rico-notify-popup {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3);
  transform: scale(0.92) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#rico-notify-overlay.is-visible .rico-notify-popup {
  transform: scale(1) translateY(0);
}

.rico-notify-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.rico-notify-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.rico-notify-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* آیکون متحرک وضعیت */
.rico-notify-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
}

.rico-notify-popup.is-success .rico-notify-icon-wrap {
  background: #ecfdf5;
}

.rico-notify-popup.is-warning .rico-notify-icon-wrap {
  background: #fffbeb;
}

.rico-notify-popup.is-error .rico-notify-icon-wrap {
  background: #fef2f2;
}

.rico-notify-svg {
  width: 72px;
  height: 72px;
  display: block;
}

/* انیمیشن تیک دایره */
.rico-notify-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  fill: none;
  animation: ricoCircleStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.rico-notify-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: ricoCheckStroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.45s forwards;
}

.rico-notify-line {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  stroke-width: 3.5;
  stroke-linecap: round;
  animation: ricoCheckStroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

.rico-notify-popup.is-success .rico-notify-circle,
.rico-notify-popup.is-success .rico-notify-check {
  stroke: #10b981;
}

.rico-notify-popup.is-warning .rico-notify-circle,
.rico-notify-popup.is-warning .rico-notify-line {
  stroke: #f59e0b;
}

.rico-notify-popup.is-error .rico-notify-circle,
.rico-notify-popup.is-error .rico-notify-line {
  stroke: #ef4444;
}

@keyframes ricoCircleStroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes ricoCheckStroke {
  100% { stroke-dashoffset: 0; }
}

.rico-notify-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.4;
}

.rico-notify-message {
  margin: 0 0 24px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* دکمه‌های اقدام CTA */
.rico-notify-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.rico-notify-btn {
  flex: 1;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 0;
  box-sizing: border-box;
}

.rico-notify-btn-primary {
  background: #1d3265;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(29, 50, 101, 0.25);
}

.rico-notify-btn-primary:hover {
  background: #142347;
  transform: translateY(-1px);
}

.rico-notify-btn-secondary {
  background: #f1f5f9;
  color: #475569 !important;
  border: 1px solid #e2e8f0;
}

.rico-notify-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

@media (max-width: 480px) {
  .rico-notify-popup {
    padding: 26px 18px 20px;
  }
  .rico-notify-actions {
    flex-direction: row;
    gap: 8px;
  }
  .rico-notify-btn {
    width: 100%;
  }
}