/**
 * Booking Reception — Onboarding Wizard
 * 3-step setup wizard shown after plugin activation.
 *
 * Color palette
 *   Primary:  #6366f1 (indigo-500)
 *   Hover:    #4f46e5 (indigo-600)
 *   Light:    #818cf8 (indigo-400)
 *   Accent:   #eef2ff (indigo-50)
 *   Success:  #22c55e / #16a34a
 *   Warning:  #f59e0b / #fef3c7
 */

/* ------------------------------------------------------------------ */
/*  1. Outer wrapper                                                  */
/* ------------------------------------------------------------------ */
.br-onboarding-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 100px);
  padding: 40px 20px 60px;
  background: #f0f0f1;          /* WP admin background */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/*  2. Main card                                                      */
/* ------------------------------------------------------------------ */
.br-onboarding-card {
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: brFadeUp 0.45s ease both;
}

@keyframes brFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ */
/*  3. Header                                                         */
/* ------------------------------------------------------------------ */
.br-onboarding-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 24px 20px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  text-align: center;
}

.br-onboarding-header img,
.br-onboarding-header svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.br-onboarding-header h1,
.br-onboarding-header span {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ------------------------------------------------------------------ */
/*  4. Stepper                                                        */
/* ------------------------------------------------------------------ */
.br-onboarding-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px 4px;
  gap: 0;
  user-select: none;
}

/* --- individual step --- */
.br-onboarding-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.br-onboarding-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #9ca3af;
  transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.br-onboarding-step-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  white-space: nowrap;
  transition: color 0.3s;
}

/* active step */
.br-onboarding-step.active .br-onboarding-step-circle {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.br-onboarding-step.active .br-onboarding-step-label {
  color: #6366f1;
  font-weight: 600;
}

/* completed step */
.br-onboarding-step.completed .br-onboarding-step-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.br-onboarding-step.completed .br-onboarding-step-label {
  color: #16a34a;
}

/* hide the step number text when completed (dashicons-yes is shown instead) */
.br-onboarding-step.completed .br-onboarding-step-number {
  display: none;
}

/* --- connector line --- */
.br-onboarding-step-line {
  flex: 1;
  min-width: 60px;
  height: 2px;
  background: #e5e7eb;
  align-self: flex-start;
  margin-top: 16px;                /* vertically center with 32px circle */
  transition: background 0.3s;
}

.br-onboarding-step-line.completed {
  background: #22c55e;
}

/* ------------------------------------------------------------------ */
/*  5. Body                                                           */
/* ------------------------------------------------------------------ */
.br-onboarding-body {
  padding: 32px 40px 36px;
}

/* ------------------------------------------------------------------ */
/*  6. Step title                                                     */
/* ------------------------------------------------------------------ */
.br-onboarding-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1e1e1e;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/*  7. Subtitle / description                                        */
/* ------------------------------------------------------------------ */
.br-onboarding-subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/*  8. Plugin status indicator                                        */
/* ------------------------------------------------------------------ */
.br-onboarding-plugin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 0 auto 24px;
  width: fit-content;
}

/* wrapper helper so it can center via parent flex */
.br-onboarding-body > .br-onboarding-plugin-status {
  display: flex;
  justify-content: center;
}

.br-onboarding-plugin-status.detected {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.br-onboarding-plugin-status.not-detected {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.br-onboarding-plugin-status .dashicons,
.br-onboarding-plugin-status svg {
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/*  9. Info box (API key, URL, etc.)                                  */
/* ------------------------------------------------------------------ */
.br-onboarding-info-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.br-onboarding-info-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 6px;
}

.br-onboarding-info-value {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  color: #374151;
  word-break: break-all;
}

.br-onboarding-info-value code {
  flex: 1;
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.br-onboarding-info-value button {
  flex-shrink: 0;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: #6366f1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.br-onboarding-info-value button:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

.br-onboarding-info-value button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/*  10. Action buttons container                                      */
/* ------------------------------------------------------------------ */
.br-onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/*  11. Primary button                                                */
/* ------------------------------------------------------------------ */
.br-onboarding-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: #6366f1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
}

.br-onboarding-btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.br-onboarding-btn-primary:active {
  transform: scale(0.97);
}

.br-onboarding-btn-primary:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.br-onboarding-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ------------------------------------------------------------------ */
/*  12. Secondary button                                              */
/* ------------------------------------------------------------------ */
.br-onboarding-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #6366f1;
  background: #fff;
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.br-onboarding-btn-secondary:hover {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4f46e5;
}

.br-onboarding-btn-secondary:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/*  13. Success button                                                */
/* ------------------------------------------------------------------ */
.br-onboarding-btn-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
}

.br-onboarding-btn-success:hover {
  background: #16a34a;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.br-onboarding-btn-success:active {
  transform: scale(0.97);
}

.br-onboarding-btn-success:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/*  14. Skip link                                                     */
/* ------------------------------------------------------------------ */
.br-onboarding-skip {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.br-onboarding-skip:hover {
  color: #6b7280;
  text-decoration: underline;
}

.br-onboarding-skip:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ------------------------------------------------------------------ */
/*  15. Success state (step 3 confirmation) — celebration design      */
/* ------------------------------------------------------------------ */
.br-onboarding-success-hero {
  text-align: center;
  padding: 8px 0 24px;
}

.br-onboarding-success-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.08),
              0 4px 16px rgba(34, 197, 94, 0.15);
  animation: brSuccessPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.br-onboarding-success-icon-wrap .dashicons {
  font-size: 36px;
  width: 36px;
  height: 36px;
  color: #16a34a;
}

@keyframes brSuccessPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.br-onboarding-success-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #1e1e1e;
  letter-spacing: -0.02em;
}

.br-onboarding-success-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  max-width: 440px;
  margin: 0 auto;
}

/* Detail cards row */
.br-onboarding-success-details {
  display: flex;
  gap: 12px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.br-onboarding-success-detail {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.br-onboarding-success-detail:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.br-onboarding-success-detail-icon {
  flex-shrink: 0;
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #6366f1;
}

.br-onboarding-success-detail-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.br-onboarding-success-detail-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e1e1e;
}

.br-onboarding-success-detail-ok {
  color: #16a34a;
}

.br-onboarding-success-detail-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  word-break: break-all;
}

/* "What's next?" section */
.br-onboarding-success-next {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  margin-top: 4px;
}

.br-onboarding-success-next-label {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/*  16. Tips / troubleshooting list                                   */
/* ------------------------------------------------------------------ */
.br-onboarding-tips {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 22px;
  margin-top: 20px;
}

.br-onboarding-tips h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
}

.br-onboarding-tips ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.br-onboarding-tips li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 13px;
  line-height: 1.55;
  color: #4b5563;
}

.br-onboarding-tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #818cf8;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/*  17. Copy-feedback toast                                           */
/* ------------------------------------------------------------------ */
.br-onboarding-copy-feedback {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e1e1e;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100000;
}

.br-onboarding-copy-feedback.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                        */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .br-onboarding-wrap {
    padding: 20px 10px 40px;
  }

  .br-onboarding-card {
    border-radius: 8px;
  }

  .br-onboarding-header {
    padding: 20px 16px 16px;
  }

  .br-onboarding-stepper {
    padding: 20px 16px 4px;
  }

  .br-onboarding-step-line {
    min-width: 32px;
  }

  .br-onboarding-step-label {
    font-size: 11px;
  }

  .br-onboarding-body {
    padding: 24px 18px 28px;
  }

  .br-onboarding-title {
    font-size: 19px;
  }

  .br-onboarding-actions {
    flex-direction: column;
  }

  .br-onboarding-btn-primary,
  .br-onboarding-btn-secondary,
  .br-onboarding-btn-success {
    width: 100%;
    justify-content: center;
  }

  .br-onboarding-info-value {
    font-size: 12px;
  }
}

/* ------------------------------------------------------------------ */
/*  Reduced-motion preference                                         */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .br-onboarding-card {
    animation: none;
  }

  .br-onboarding-btn-primary:active,
  .br-onboarding-btn-success:active {
    transform: none;
  }

  .br-onboarding-copy-feedback {
    transition: none;
  }
}
