/* ═══ رسالة أذكار — تظهر 5 ثوانٍ عند فتح الصفحة ═══ */
.dhikr-toast {
  --dhikr-duration: 5000ms;
  position: fixed;
  inset-inline: 0;
  top: max(18px, calc(env(safe-area-inset-top, 0px) + 14px));
  z-index: 12000;
  width: min(440px, calc(100vw - 28px));
  margin-inline: auto;
  padding: 18px 20px 16px;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(61, 18, 28, 0.96), rgba(42, 13, 20, 0.94));
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 18px 48px rgba(42, 13, 20, 0.38),
    inset 0 1px 0 rgba(251, 246, 238, 0.08);
  color: #fbf6ee;
  text-align: center;
  overflow: hidden;
  animation: dhikrIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: auto;
}

.dhikr-toast__ornament {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(212, 175, 55, 0.16), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(212, 175, 55, 0.12), transparent 40%);
  pointer-events: none;
}

.dhikr-toast__inner {
  position: relative;
  z-index: 1;
  padding-inline: 28px 8px;
}

.dhikr-toast__text {
  margin: 0;
  font-family: Amiri, 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 4.2vw, 1.65rem);
  line-height: 1.7;
  color: #fbf6ee;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.dhikr-toast__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(251, 246, 238, 0.14);
  background: rgba(251, 246, 238, 0.08);
  color: rgba(251, 246, 238, 0.75);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.dhikr-toast__close:hover {
  background: rgba(251, 246, 238, 0.16);
  color: #fbf6ee;
}

.dhikr-toast__bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: rgba(251, 246, 238, 0.08);
  overflow: hidden;
}

.dhikr-toast__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #b8924a, #dfc48e);
  transform-origin: right;
  animation: dhikrBar var(--dhikr-duration) linear forwards;
}

.dhikr-toast.is-leaving {
  animation: dhikrOut 0.36s ease forwards;
  pointer-events: none;
}

@keyframes dhikrIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dhikrOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }
}

@keyframes dhikrBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 560px) {
  .dhikr-toast {
    top: max(12px, calc(env(safe-area-inset-top, 0px) + 10px));
    width: calc(100vw - 20px);
    padding: 16px 16px 14px;
    border-radius: 16px;
  }
  .dhikr-toast__inner { padding-inline: 24px 4px; }
  .dhikr-toast__text { font-size: 1.28rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dhikr-toast,
  .dhikr-toast.is-leaving,
  .dhikr-toast__bar span {
    animation: none !important;
  }
  .dhikr-toast { opacity: 1; }
}
