/**
 * confirmation-ui.css — MailSentry v3.0 Success Panel Styles
 *
 * Pairs with form-submission-ui.js.
 * Designed to work within any existing page layout.
 *
 * Brand color: The CSS variable --ms-brand is set dynamically by
 * form-submission-ui.js via auto-detection of the site's accent color.
 * Falls back to #4CAF50 (green) if not set.
 */

/* ---- Success Container ---- */
.form-success-container {
  --_brand: var(--ms-brand, #4CAF50);
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  padding: 20px 24px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.form-success-container.show {
  opacity: 1;
}
.form-success-container.fade-out {
  opacity: 0;
  transition: opacity 0.9s ease;
}

/* ---- Animated Checkmark ---- */
.success-checkmark {
  margin-bottom: 12px;
}
.success-icon {
  width: 48px;
  height: 48px;
}
.success-icon-circle {
  stroke: var(--_brand);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkCircle 0.6s ease forwards;
}
.success-icon-check {
  stroke: var(--_brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkStroke 0.4s 0.4s ease forwards;
}

@keyframes checkCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes checkStroke {
  to { stroke-dashoffset: 0; }
}

/* ---- Content ---- */
.success-content {
  max-width: 480px;
}
.success-title {
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  color: var(--_brand);
  margin: 0 0 12px;
}
.success-message {
  font-family: Verdana, sans-serif;
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ---- What happens next ---- */
.success-details {
  text-align: left;
  margin: 0 auto;
  max-width: 400px;
}
.success-details strong {
  font-family: Verdana, sans-serif;
  font-size: 14px;
  color: var(--_brand);
  display: block;
  margin-bottom: 8px;
}
.success-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.success-steps li {
  font-family: Verdana, sans-serif;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  padding: 6px 0 6px 32px;
  position: relative;
  counter-increment: step;
}
.success-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--_brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
}

/* ---- Error Messages ---- */
.form-messages.error {
  background: #fef3cd;
  border: 1px solid #ffc107;
  color: #664d03;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  margin: 12px 0;
}
