/* ═══════════════════════════════════════════════════════════════
   YAWMUNA Modern Popups, Modals & Toast System
   Designed for luxury digital invitations & admin experience
   ═══════════════════════════════════════════════════════════════ */

/* ── Toast Container ────────────────────────────────────────── */
#yawmuna-toast-container {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
  direction: rtl;
}

@media (max-width: 600px) {
  #yawmuna-toast-container {
    top: 14px;
    left: 14px;
    right: 14px;
    width: auto;
    max-width: 100%;
  }
}

/* ── Individual Toast Item ──────────────────────────────────── */
.ym-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(122, 34, 48, 0.06);
  color: #1a1516;
  font-family: 'Cairo', sans-serif;
  overflow: hidden;
  animation: ymToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ym-toast.ym-toast-out {
  animation: ymToastOut 0.3s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes ymToastIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ymToastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-15px) scale(0.92);
  }
}

/* Toast Icon */
.ym-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Success Toast */
.ym-toast-success {
  border-color: rgba(30, 142, 62, 0.35);
}
.ym-toast-success .ym-toast-icon {
  background: #e6f4ea;
  color: #137333;
}
.ym-toast-success .ym-toast-progress-bar {
  background: linear-gradient(90deg, #137333, #34a853);
}

/* Error Toast */
.ym-toast-error {
  border-color: rgba(217, 48, 37, 0.35);
}
.ym-toast-error .ym-toast-icon {
  background: #fce8e6;
  color: #c5221f;
}
.ym-toast-error .ym-toast-progress-bar {
  background: linear-gradient(90deg, #c5221f, #ea4335);
}

/* Warning Toast */
.ym-toast-warning {
  border-color: rgba(227, 116, 0, 0.35);
}
.ym-toast-warning .ym-toast-icon {
  background: #fef7e0;
  color: #b06000;
}
.ym-toast-warning .ym-toast-progress-bar {
  background: linear-gradient(90deg, #b06000, #f9ab00);
}

/* Info / Royal Toast */
.ym-toast-info {
  border-color: rgba(201, 162, 75, 0.45);
}
.ym-toast-info .ym-toast-icon {
  background: #fbf5e8;
  color: #a47f2e;
}
.ym-toast-info .ym-toast-progress-bar {
  background: linear-gradient(90deg, #c9a24b, #7a2230);
}

/* Toast Body */
.ym-toast-body {
  flex: 1;
  min-width: 0;
}
.ym-toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 3px;
  color: #1a1516;
}
.ym-toast-message {
  font-size: 0.88rem;
  color: #554e50;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

/* Toast Close Button */
.ym-toast-close {
  background: none;
  border: none;
  color: #8c8385;
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.ym-toast-close:hover {
  color: #1a1516;
  background: rgba(0, 0, 0, 0.05);
}

/* Toast Progress Bar */
.ym-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
}
.ym-toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: right;
  animation: ymProgress linear forwards;
}

@keyframes ymProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ── Modern Confirmation Modal ──────────────────────────────── */
.ym-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: rgba(26, 21, 22, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  direction: rtl;
}

.ym-modal-backdrop.ym-modal-show {
  opacity: 1;
  visibility: visible;
}

.ym-modal-card {
  background: #ffffff;
  border: 1px solid rgba(201, 162, 75, 0.3);
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(122, 34, 48, 0.08);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  font-family: 'Cairo', sans-serif;
}

.ym-modal-backdrop.ym-modal-show .ym-modal-card {
  transform: scale(1) translateY(0);
}

.ym-modal-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.ym-modal-icon-wrap.danger {
  background: #fce8e6;
  color: #c5221f;
  border: 2px solid rgba(197, 34, 31, 0.2);
}
.ym-modal-icon-wrap.gold {
  background: #fbf5e8;
  color: #c9a24b;
  border: 2px solid rgba(201, 162, 75, 0.3);
}
.ym-modal-icon-wrap.success {
  background: #e6f4ea;
  color: #137333;
  border: 2px solid rgba(19, 115, 51, 0.25);
}

.ym-modal-title {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #7a2230;
  margin: 0 0 8px;
}

.ym-modal-message {
  font-size: 0.98rem;
  color: #554e50;
  line-height: 1.6;
  margin: 0 0 24px;
}

.ym-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ym-modal-btn {
  flex: 1;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ym-modal-btn-cancel {
  background: #f4eedf;
  color: #554e50;
  border: 1px solid rgba(201, 162, 75, 0.25);
}
.ym-modal-btn-cancel:hover {
  background: #eee3cb;
  color: #1a1516;
}

.ym-modal-btn-confirm {
  background: linear-gradient(135deg, #c9a24b 0%, #a47f2e 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(201, 162, 75, 0.35);
}
.ym-modal-btn-confirm:hover {
  background: linear-gradient(135deg, #d8b25b 0%, #b8903e 100%);
  transform: translateY(-1px);
}

.ym-modal-btn-confirm.danger {
  background: linear-gradient(135deg, #c5221f 0%, #901614 100%);
  box-shadow: 0 4px 14px rgba(197, 34, 31, 0.35);
}
.ym-modal-btn-confirm.danger:hover {
  background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
}

