/* Self-contained SweetAlert-style dialog styles.
   The legacy CSS chain has no swal styles, so we ship them here, scoped to the
   same `.swal-*` class names the sweetalert library emits (so the DOM reads as
   swal). Brand accent uses the site red (#990303) for the confirm button. */

.swal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.swal-overlay--show-modal {
  opacity: 1;
  visibility: visible;
}

.swal-modal {
  width: 478px;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 5px;
  padding: 24px 28px 20px;
  text-align: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s, transform 0.25s;
}
.swal-overlay--show-modal .swal-modal {
  opacity: 1;
  transform: scale(1);
  animation: swal-modal-pop 0.3s;
}
@keyframes swal-modal-pop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Icon base */
.swal-icon {
  width: 80px;
  height: 80px;
  margin: 8px auto 16px;
  border-radius: 50%;
  border: 4px solid #ccc;
  position: relative;
  box-sizing: content-box;
}

/* Success — SVG ring + tick drawn with stroke-dashoffset (like SweetAlert). */
.swal-icon--success {
  border: none;
  border-radius: 0;
}
.swal-success-svg {
  display: block;
  width: 80px;
  height: 80px;
}
.swal-success-svg__ring {
  fill: none;
  stroke: #a5dc86;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
  animation: swal-success-ring 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.swal-success-svg__tick {
  fill: none;
  stroke: #a5dc86;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: swal-success-tick 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}
@keyframes swal-success-ring {
  to { stroke-dashoffset: 0; }
}
@keyframes swal-success-tick {
  to { stroke-dashoffset: 0; }
}

/* Error */
.swal-icon--error {
  border-color: #f27474;
}
.swal-icon--error__line {
  position: absolute;
  height: 5px;
  width: 47px;
  background: #f27474;
  border-radius: 2px;
  top: 37px;
  left: 17px;
}
.swal-icon--error__line--left { transform: rotate(45deg); }
.swal-icon--error__line--right { transform: rotate(-45deg); }

/* Warning */
.swal-icon--warning { border-color: #f8bb86; animation: swal-pulse-warning 0.75s infinite alternate; }
.swal-icon--warning__body {
  position: absolute;
  width: 5px;
  height: 34px;
  left: 50%;
  top: 14px;
  margin-left: -2px;
  border-radius: 2px;
  background: #f8bb86;
}
.swal-icon--warning__dot {
  position: absolute;
  width: 7px;
  height: 7px;
  left: 50%;
  bottom: 14px;
  margin-left: -3px;
  border-radius: 50%;
  background: #f8bb86;
}
@keyframes swal-pulse-warning {
  0% { border-color: #f8d486; }
  100% { border-color: #f8bb86; }
}

/* Info */
.swal-icon--info { border-color: #c9dae1; }
.swal-icon--info::before {
  content: '';
  position: absolute;
  width: 5px;
  height: 29px;
  left: 50%;
  bottom: 17px;
  margin-left: -2px;
  border-radius: 2px;
  background: #c9dae1;
}
.swal-icon--info::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  left: 50%;
  top: 19px;
  margin-left: -3px;
  border-radius: 50%;
  background: #c9dae1;
}

.swal-title {
  margin: 0;
  padding: 4px 0 8px;
  color: rgba(0, 0, 0, 0.65);
  font-size: 24px;
  font-weight: 600;
}
.swal-text {
  margin: 0 auto;
  max-width: 320px;
  color: rgba(0, 0, 0, 0.55);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.swal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.swal-button {
  padding: 10px 22px;
  border: none;
  border-radius: 5px;
  background: #990303;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.swal-button:hover { background: #7a0202; }
.swal-button--cancel {
  background: #efefef;
  color: #555;
}
.swal-button--cancel:hover { background: #e0e0e0; }
.swal-button--danger { background: #e02020; }
.swal-button--danger:hover { background: #c01a1a; }
