/*
 * Intake Completion Page Styles
 *
 * Extracted from inline styles in completion/show.html.erb
 * Celebratory success screen with animations and themed cards
 *
 * Color themes:
 * - Green: Success/appointment details (uses Culina brand tokens)
 * - Blue: Info/next-steps (semantic - intentionally not Culina green scale)
 * - Amber: Warning/payment info (semantic - intentionally not Culina green scale)
 */

/* =================================
   Page Background
   ================================= */

body.intake-completion-page {
  background: var(--color-bg-primary);
  min-height: 100vh;
}

/* =================================
   Intake Verification Loading UI
   ================================= */

.verification-step-dot {
  animation: verification-dot-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
}

.verification-step.complete .verification-step-dot {
  background-color: #10b981;
  animation: none;
  box-shadow: none;
}

.verification-step.active .verification-step-dot {
  background-color: var(--color-accent);
}

.verification-step.pending .verification-step-dot {
  background-color: #9ca3af;
  animation: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .verification-step-dot {
    animation: none;
    box-shadow: none;
  }
}

@keyframes verification-dot-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.55);
  }
  70% {
    transform: scale(1.2);
    box-shadow: 0 0 0 0.5rem rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* =================================
   Main Container
   ================================= */

.completion-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* =================================
   Success Header
   ================================= */

.success-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.confetti-background {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4rem;
  opacity: 0.15;
  z-index: 0;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--color-status-success, #10b981);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.5);
  animation: successPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -10px rgba(16, 185, 129, 0.6);
  }
}

.success-icon i {
  color: white;
  font-size: 3rem;
}

.success-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.success-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-primary, #374151);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* =================================
   Shared Card Base Styles (DRY)
   ================================= */

.intake-card-base {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-width: 3px;
  border-style: solid;
  position: relative;
  overflow: hidden;
}

.intake-card-base::before {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.15;
}

.intake-card-header {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom-width: 2px;
  border-bottom-style: solid;
}

.intake-card-header i {
  font-size: 1.75rem;
}

/* =================================
   Appointment Details Card (Green Theme)
   ================================= */

.appointment-details-card {
  background: var(--color-bg-secondary);
  border-radius: 1.5rem;
  border: 3px solid var(--color-status-success, #10b981);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.appointment-details-card::before {
  content: '\2728'; /* Sparkle emoji */
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.2;
}

.details-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-culina-green-dark, #065f46);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #d1fae5;
}

.details-header i {
  color: var(--color-status-success, #10b981);
  font-size: 1.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 0.75rem;
  background: var(--color-bg-primary);
  transition: all 0.2s;
}

.detail-row:hover {
  background: var(--color-surface-soft);
  transform: translateX(5px);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 700;
  color: var(--color-culina-green-dark, #065f46);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-value {
  color: var(--color-text-primary, #1f2937);
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
}

/* =================================
   Next Steps Card (Blue Theme - Semantic Info)
   Note: Blue is intentionally NOT on Culina green scale
   Used for info/instructional content
   ================================= */

.next-steps-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 3px solid #3b82f6; /* Semantic: info blue */
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
  position: relative;
  overflow: hidden;
}

.next-steps-card::before {
  content: '\1F4CB'; /* Clipboard emoji */
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.15;
}

.next-steps-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e40af; /* Semantic: dark info blue */
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #dbeafe;
}

.next-steps-title i {
  font-size: 1.75rem;
  color: #3b82f6; /* Semantic: info blue */
}

.next-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.next-step-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  margin: 0.75rem 0;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 0.875rem;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.next-step-item:hover {
  border-color: #3b82f6; /* Semantic: info blue */
  transform: translateX(5px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.step-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #2563eb); /* Semantic: info blue gradient */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.step-text {
  flex-grow: 1;
  padding-top: 0.375rem;
  color: #1e40af; /* Semantic: dark info blue */
  font-size: 1rem;
  line-height: 1.6;
}

.step-text strong {
  color: #1e3a8a; /* Semantic: darker info blue */
  font-weight: 700;
}

/* =================================
   Info Card (Amber Theme - Semantic Warning)
   Note: Amber is intentionally NOT on Culina green scale
   Used for payment/insurance information
   ================================= */

.info-card {
  background: white;
  border: 3px solid #f59e0b; /* Semantic: warning amber */
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.1);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '\1F4A1'; /* Lightbulb emoji */
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.15;
}

.info-card-title {
  font-weight: 700;
  color: #92400e; /* Semantic: dark warning amber */
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #fef3c7;
}

.info-card-title i {
  color: #f59e0b; /* Semantic: warning amber */
  font-size: 1.5rem;
}

.info-card-text {
  color: #78350f; /* Semantic: darker warning amber */
  font-size: 1rem;
  line-height: 1.7;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1rem;
  border-radius: 0.75rem;
}

/* =================================
   Action Buttons
   ================================= */

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.btn-primary-action {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  display: block;
  box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary-action:hover::before {
  left: 100%;
}

.btn-primary-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px -5px rgba(5, 150, 105, 0.5);
}

.btn-secondary-action {
  background: white;
  color: #059669;
  padding: 1.125rem 2.5rem;
  border: 3px solid #059669;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: block;
}

.btn-secondary-action:hover {
  background: #ecfdf5;
  border-color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(5, 150, 105, 0.2);
}

/* =================================
   Responsive Styles
   Responsive: 640px matches Tailwind 'sm' breakpoint
   Optimized for small phones (tested at 390px iPhone width)
   ================================= */

@media (max-width: 640px) {
  .completion-container {
    padding: 2rem 1rem;
  }

  .success-title {
    font-size: 2rem;
  }

  .success-subtitle {
    font-size: 1.125rem;
  }

  .appointment-details-card,
  .next-steps-card,
  .info-card {
    padding: 1.5rem;
  }
}
