/* STD Credits UI — Modern SaaS Checkout Design
   Date: 2025-08-24
   Scope: Modern checkout interface with clear credits vs standard comparison
   Updated: Complete redesign for better UX and visual appeal
*/

/* Modern container with subtle shadows and spacing */
#std-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
  margin: 2rem 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Payment logos row */
.std-pay-logos { display: flex !important; gap: 12px !important; align-items: center !important; justify-content: flex-start !important; margin: 6px 0 0 0 !important; flex-wrap: nowrap !important; font-size: 12px !important; color: #cbd5e1 !important; white-space: nowrap !important; }
.std-pay-logos img {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1) opacity(.9);
  opacity: .85;
}
.std-pay-logos img:hover { opacity: 1; }

/* Single banner with all payment methods */
.std-pay-banner { text-align: center; margin: 0 auto 12px; max-width: 410px; }
.std-pay-banner img { width: 100%; height: auto; opacity: .92; display: inline-block; }

@media (min-width: 1024px) {
  #std-checkout-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Left card (Standard) - Clean, minimal design */
#std-left-standard {
  background: #ffffff;
  border: 2px solid #f1f5f9;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#std-left-standard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

#std-left-standard:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Right card (Credits) - Premium, highlighted design */
#std-right-credits {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 2px solid #3b82f6;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#std-right-credits::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

#std-right-credits:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Typography improvements */
#std-left-standard h3,
#std-right-credits h3,
#std-left-standard h4,
#std-right-credits h4 {
  font-size: 18px; /* Title ~18px */
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e293b;
}

#std-right-credits h3,
#std-right-credits h4 {
  color: #f8fafc;
}

#std-left-standard p,
#std-right-credits p,
#std-right-credits label,
#std-right-credits input,
#std-right-credits button {
  font-size: 14px; /* Body ~14px */
}

/* Credits header with modern badge */
.std-credits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.std-credits-header .title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #f8fafc;
}

#std-credits-badge {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  animation: pulse 2s infinite;
}

#std-credits-badge .std-badge-sub{
  display:block;
  font-weight:600;
  font-size:10px;
  opacity:0.9;
  margin-top:2px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Subtext styling */
.std-credits-subtext {
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Price summary styling */
#std-price-summary-bottom h5 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 1rem;
}

#std-price-summary-bottom p {
  color: #64748b;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

#std-price-summary-bottom strong {
  color: #1e293b;
}

/* Credits status and pricing */
#std-credits-status {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 8px 12px; /* Tightened */
  margin-bottom: 12px;
  color: #60a5fa;
  font-weight: 600;
  font-size: 14px;
  min-height: 34px; /* ~32–36px */
  display: flex;
  align-items: center;
}

#std-credits-price-note {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  color: #f8fafc; /* White text for readability on green */
  font-size: 14px;
  line-height: 1.6;
}

/* Hide empty price note */
#std-credits-price-note:empty {
  display: none;
}

#std-credits-price-note b {
  color: #34d399;
  font-weight: 700;
}

/* Modern button system */
.std-btn, .btn, button[type="button"] {
  border-radius: 12px;
  padding: 0.875rem 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 2px solid transparent;
  text-decoration: none;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.std-btn:active, .btn:active {
  transform: translateY(1px);
}

.std-btn[disabled], .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Bright Green Buttons - Default for credits buttons */
.btn, .btn-primary, .btn-success, #std-credits-inline-actions button {
  background: linear-gradient(135deg, #22c55e, #16a34a, #15803d);
  border: 2px solid #16a34a;
  color: #ffffff !important;
  box-shadow: 0 4px 20px 0 rgba(34, 197, 94, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.btn:hover:not([disabled]), .btn-primary:hover:not([disabled]), .btn-success:hover:not([disabled]), #std-credits-inline-actions button:hover:not([disabled]) {
  background: linear-gradient(135deg, #16a34a, #15803d, #166534);
  border-color: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(34, 197, 94, 0.5);
}

/* Secondary Outline Button */
.std-btn-outline {
  background: transparent;
  border-color: #10b981;
  color: #10b981;
}

.std-btn-outline:hover:not([disabled]) {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: #059669;
}

/* Button container */
#std-credits-inline-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Quantity input styling */
#std-inline-buy-wrap,
#std-inline-buy-wrap-stateb {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  transition: all 0.3s ease;
  animation: slideInUp 0.4s ease-out;
}

#std-inline-buy-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

#std-inline-buy-wrap label,
#std-inline-buy-wrap-stateb label {
  color: #cbd5e1;
  font-size: 12px; /* Meta/help ~12px */
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: block;
}

#std-credits-qty,
#std-credits-qty-b {
  width: 100%;
  max-width: 130px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  margin: 0.5rem 0;
  height: 32px;
}

#std-qty-math,
#std-qty-math-b {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Compact +/- buttons (28x28) with high contrast */
.std-qty-btn,
#std-qty-minus, #std-qty-plus,
#std-qty-minus-b, #std-qty-plus-b {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  flex-grow: 0;
}

.std-qty-btn:hover,
#std-qty-minus:hover, #std-qty-plus:hover,
#std-qty-minus-b:hover, #std-qty-plus-b:hover {
  background: #1f2937;
}

.std-qty-btn:active,
#std-qty-minus:active, #std-qty-plus:active,
#std-qty-minus-b:active, #std-qty-plus-b:active {
  transform: translateY(1px);
}

/* Tighter spacing between rows in credits card */
#std-right-credits > * + * { margin-top: 10px; }

/* Savings banner */
.savings-banner {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7a3;
  color: #065f46;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
  #std-checkout-grid {
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  #std-left-standard,
  #std-right-credits {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  }
  
  #std-credits-inline-actions {
    flex-direction: column;
  }
  
  .std-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Focus states for accessibility */
.std-btn:focus,
#std-credits-qty:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading states */
.std-btn[disabled] {
  position: relative;
  color: transparent;
}

.std-btn[disabled]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modern Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes buttonGlow {
  0% { box-shadow: 0 4px 20px 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 6px 30px 0 rgba(34, 197, 94, 0.6); }
  100% { box-shadow: 0 4px 20px 0 rgba(34, 197, 94, 0.4); }
}

/* Apply animations */
#std-right-credits {
  animation: fadeInScale 0.5s ease-out;
}

#std-credits-inline-actions {
  animation: slideInUp 0.6s ease-out;
}

.btn:not([disabled]), .btn-primary:not([disabled]) {
  animation: buttonGlow 2s ease-in-out infinite;
}

/* Professional Info Panel - Phase 1 Step 1 */
.std-info-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.std-info-panel:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
  border-left-color: #2563eb;
}

.std-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.std-info-icon {
  font-size: 1.5rem;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.std-info-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

.std-info-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 1rem 0;
  font-weight: 500;
  line-height: 1.5;
}

.std-info-content {
  margin-top: 0.5rem;
}

.std-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.std-info-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
}

.std-info-list li::before {
  content: "•";
  color: #0ea5e9;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
}

.std-info-list li:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: #1e293b;
}

.std-info-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.std-info-link:hover {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* Sophisticated Section Header - Phase 1 Step 2 */
.std-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}

.std-section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 1px;
}

.std-section-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.std-section-content {
  flex: 1;
}

.std-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.std-section-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

/* Mapping Confirmation Notice - Phase 1 Step 2.5 */
.std-mapping-confirmation {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
  transition: all 0.3s ease;
}

.std-mapping-confirmation:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  border-color: #0284c7;
}

.std-mapping-confirmation-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.std-mapping-confirmation-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #0ea5e9;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

.std-mapping-confirmation-checkbox:checked {
  background: #0ea5e9;
  border-color: #0284c7;
}

.std-mapping-confirmation-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.std-mapping-confirmation-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.std-mapping-confirmation-label {
  font-size: 1rem;
  font-weight: 600;
  color: #0c4a6e;
  line-height: 1.5;
  cursor: pointer;
  margin: 0;
  flex: 1;
}

.std-mapping-confirmation-label:hover {
  color: #075985;
}

/* Compact Mapping Fields Grid - Phase 1 Step 3 */
.std-mapping-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 1200px) {
  .std-mapping-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .std-mapping-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .std-mapping-confirmation {
    padding: 1rem 1.25rem;
  }
  
  .std-mapping-confirmation-content {
    gap: 0.75rem;
  }
  
  .std-mapping-confirmation-label {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .std-mapping-grid {
    grid-template-columns: 1fr;
  }
  
  .std-mapping-confirmation {
    padding: 0.875rem 1rem;
  }
  
  .std-mapping-confirmation-content {
    gap: 0.625rem;
  }
  
  .std-mapping-confirmation-checkbox {
    width: 18px;
    height: 18px;
  }
  
  .std-mapping-confirmation-label {
    font-size: 0.9rem;
  }
}

.std-mapping-field {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.std-mapping-field::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.std-mapping-field:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.std-mapping-field:hover::before {
  transform: scaleX(1);
}

.std-mapping-field:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.std-mapping-field:focus-within::before {
  transform: scaleX(1);
}

.std-mapping-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.std-required-asterisk {
  color: #ef4444;
  margin-left: 2px;
  font-weight: 700;
}

.std-mapping-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.std-mapping-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.std-mapping-select:hover {
  border-color: #9ca3af;
}

.std-mapping-select option {
  padding: 0.5rem;
  font-weight: 500;
}

/* Compact Address Validation Panel - Phase 2 Step 4 */
.std-validation-panel {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #3b82f6;
  border-radius: 12px;
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.std-validation-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

.std-validation-icon {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.std-validation-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

.std-validation-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Compact Stacked Progress Bars */
.std-combined-progress {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
  border: 1px solid rgba(14, 165, 233, 0.1);
  transition: all 0.2s ease;
}

.std-combined-progress:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(14, 165, 233, 0.2);
}

.std-progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
}

.std-progress-item:last-child {
  margin-bottom: 0;
}

.std-progress-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 140px;
}

.std-progress-percent {
  font-weight: 700;
  color: #0ea5e9;
  font-size: 0.875rem;
  margin-left: auto;
  flex-shrink: 0;
  min-width: 35px;
  text-align: right;
}

.std-progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-left: 0.5rem;
}

.std-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.std-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.std-progress-fill.std-progress-blue {
  background: linear-gradient(90deg, #0ea5e9, #3b82f6) !important;
}

.std-progress-fill.std-progress-green {
  background: linear-gradient(90deg, #10b981, #059669) !important;
}

.std-progress-fill.std-progress-purple {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed) !important;
}

/* Validation Messages - Phase 2 Step 6 */
.std-validation-message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Success Messages */
.std-validation-message .std-msg-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #22c55e;
  border-left: 4px solid #16a34a;
  color: #166534;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
  transition: all 0.3s ease;
}

.std-validation-message .std-msg-success:hover {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
  transform: translateY(-1px);
}

.std-validation-message .std-msg-success strong {
  color: #15803d;
  font-weight: 700;
}

/* Warning Messages */
.std-validation-message .std-msg-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
  border-left: 4px solid #d97706;
  color: #92400e;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
  transition: all 0.3s ease;
}

.std-validation-message .std-msg-warning:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  transform: translateY(-1px);
}

.std-validation-message .std-msg-warning strong {
  color: #b45309;
  font-weight: 700;
}

/* Error Messages */
.std-validation-message .std-msg-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 1px solid #ef4444;
  border-left: 4px solid #dc2626;
  color: #991b1b;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
  transition: all 0.3s ease;
}

.std-validation-message .std-msg-error:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
  transform: translateY(-1px);
}

.std-validation-message .std-msg-error strong {
  color: #dc2626;
  font-weight: 700;
}

/* Critical Messages */
.std-validation-message .std-msg-critical {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 2px solid #dc2626;
  border-left: 6px solid #b91c1c;
  color: #7f1d1d;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
  animation: criticalPulse 2s infinite;
  transition: all 0.3s ease;
}

.std-validation-message .std-msg-critical:hover {
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
  transform: translateY(-2px);
}

.std-validation-message .std-msg-critical strong {
  color: #b91c1c;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Info Messages */
.std-validation-message .std-msg-info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #3b82f6;
  border-left: 4px solid #2563eb;
  color: #1e40af;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.std-validation-message .std-msg-info:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.std-validation-message .std-msg-info strong {
  color: #2563eb;
  font-weight: 700;
}

/* Message Icons */
.std-validation-message .std-msg-icon {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 1rem;
  vertical-align: middle;
}

/* Message Actions */
.std-validation-message .std-msg-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.std-validation-message .std-msg-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.std-validation-message .std-msg-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.std-validation-message .std-msg-btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.std-validation-message .std-msg-btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.std-validation-message .std-msg-btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}

.std-validation-message .std-msg-btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.std-validation-message .std-msg-btn-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

/* Critical pulse animation */
@keyframes criticalPulse {
  0% { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3); }
  100% { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2); }
}

/* Professional Email Field - Phase 3 Step 7 */
.std-email-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.std-email-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}


.std-email-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.std-email-display:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.std-email-icon {
  color: #3b82f6;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.std-email-text {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}

.std-email-text strong {
  color: #1e293b;
  font-weight: 700;
}

.std-email-help {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .std-email-input-container {
    max-width: 100%;
  }
  
  .std-email-section {
    padding: 1rem;
  }
}

/* Business Activity Checkboxes - Phase 3 Step 8 */
.std-activity-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.std-activity-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.std-activity-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-align: center;
}

.std-activity-required {
  color: #ef4444;
  margin-left: 3px;
  font-weight: 700;
}

.std-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.std-activity-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.std-activity-option:hover {
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
  transform: translateY(-1px);
}

.std-activity-option:has(input:checked) {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.std-activity-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.std-activity-checkbox:checked {
  background: #0ea5e9;
  border-color: #0ea5e9;
}

.std-activity-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.std-activity-label-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
  flex: 1;
}

.std-activity-option:has(input:checked) .std-activity-label-text {
  color: #1e40af;
  font-weight: 700;
}

.std-activity-other-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 0.5rem;
}

.std-activity-other-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.std-activity-other-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.std-activity-error {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 1px solid #ef4444;
  border-left: 4px solid #dc2626;
  color: #991b1b;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

/* Responsive adjustments for activity grid */
@media (max-width: 768px) {
  .std-activity-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .std-activity-section {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .std-activity-option {
    padding: 0.75rem;
  }
  
  .std-activity-label-text {
    font-size: 0.85rem;
  }
}

/* Terms and Conditions Section - Phase 3 Step 9 */
.std-terms-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.std-terms-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.std-terms-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.4;
}

.std-terms-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.std-terms-option {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.std-terms-option:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.std-terms-option:has(input:checked) {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.std-terms-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  margin-top: 2px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.std-terms-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.std-terms-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.std-terms-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.5;
  flex: 1;
}

.std-terms-option:has(input:checked) .std-terms-text {
  color: #1e40af;
  font-weight: 600;
}

.std-terms-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.std-terms-link:hover {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.std-terms-required {
  color: #ef4444;
  margin-left: 3px;
  font-weight: 700;
}

/* Newsletter option specific styling */
.std-terms-option.newsletter {
  border-left: 4px solid #10b981;
}

.std-terms-option.newsletter:has(input:checked) {
  border-left-color: #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.std-terms-option.newsletter:has(input:checked) .std-terms-text {
  color: #166534;
}

/* Terms option specific styling */
.std-terms-option.terms {
  border-left: 4px solid #3b82f6;
}

.std-terms-option.terms:has(input:checked) {
  border-left-color: #2563eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .std-terms-section {
    padding: 1rem;
    margin: 1.5rem 0;
  }
  
  .std-terms-options {
    gap: 0.75rem;
  }
  
  .std-terms-option {
    padding: 0.875rem;
  }
  
  .std-terms-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
  }
  
  .std-terms-text {
    font-size: 0.85rem;
  }
}

/* Subtle Animations and Hover Effects - Phase 4 Step 11 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}

/* Page load animations */
.std-info-panel {
  animation: fadeInUp 0.6s ease-out;
}

.std-section-header {
  animation: slideInLeft 0.7s ease-out 0.1s both;
}

.std-mapping-confirmation {
  animation: fadeInUp 0.7s ease-out 0.15s both;
}

.std-mapping-grid {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.std-validation-panel {
  animation: scaleIn 0.6s ease-out 0.3s both;
}

.std-email-section {
  animation: fadeInUp 0.7s ease-out 0.4s both;
}

.std-activity-section {
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.std-terms-section {
  animation: fadeInUp 0.9s ease-out 0.6s both;
}

/* Enhanced hover effects */
.std-info-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.std-section-header:hover .std-section-icon {
  animation: pulse 1s ease-in-out;
}

.std-mapping-confirmation:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.2);
}

.std-mapping-field:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.std-mapping-field:focus-within {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 20px rgba(59, 130, 246, 0.2);
}

.std-validation-panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.std-email-display:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.std-activity-option:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.std-activity-option:has(input:checked) {
  animation: bounce 0.6s ease-out;
}

.std-terms-option:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.std-terms-option:has(input:checked) {
  animation: scaleIn 0.4s ease-out;
}

/* Button animations */
.btn, .btn-primary, .btn-success, #std-credits-inline-actions button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before, .btn-primary::before, .btn-success::before, #std-credits-inline-actions button::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 ease;
}

.btn:hover::before, .btn-primary:hover::before, .btn-success:hover::before, #std-credits-inline-actions button:hover::before {
  left: 100%;
}

/* Progress bar shimmer enhancement */
.std-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 200px 100%;
  animation: shimmer 2s infinite;
}

/* Icon animations */
.std-info-icon:hover,
.std-section-icon:hover,
.std-validation-icon:hover {
  animation: pulse 1s ease-in-out;
}

.std-email-icon:hover {
  animation: bounce 0.6s ease-out;
}

/* Form field focus animations */
.std-mapping-select:focus {
  animation: scaleIn 0.3s ease-out;
}

.std-activity-checkbox:checked {
  animation: bounce 0.4s ease-out;
}

.std-terms-checkbox:checked {
  animation: scaleIn 0.3s ease-out;
}

/* Loading states */
.std-loading {
  position: relative;
  overflow: hidden;
}

.std-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

/* Smooth transitions for all interactive elements */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final Spacing and Typography Adjustments - Phase 4 Step 12 */

/* Global typography improvements */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  font-size: 16px;
}

/* Improved heading hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: #1e293b;
}

/* Enhanced spacing consistency */
.std-info-panel {
  margin-bottom: 2.5rem;
}

.std-section-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
}

.std-mapping-grid {
  margin-bottom: 2rem;
  padding: 1.75rem;
}

.std-validation-panel {
  margin-bottom: 1.5rem;
}

.std-email-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
}

.std-activity-section {
  margin-bottom: 2.25rem;
  padding: 1.75rem;
}

.std-terms-section {
  margin: 2.25rem 0;
  padding: 1.75rem;
}

/* Refined form field spacing */
.std-mapping-field {
  padding: 1.125rem;
  margin-bottom: 0;
}

.std-mapping-label {
  margin-bottom: 0.625rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.std-mapping-select {
  padding: 0.875rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Enhanced validation panel spacing */
.std-validation-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.std-validation-metrics {
  gap: 0.625rem;
}

.std-combined-progress {
  padding: 0.625rem 0.75rem 0.375rem 0.75rem;
}

.std-progress-item {
  margin-bottom: 0.5rem;
}

/* Improved email display spacing */
.std-email-display {
  padding: 1.25rem 1.75rem;
  margin: 0 auto;
}

.std-email-text {
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Enhanced activity section spacing */
.std-activity-label {
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.std-activity-grid {
  gap: 1.125rem;
}

.std-activity-option {
  padding: 1.125rem;
}

.std-activity-label-text {
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Refined terms section spacing */
.std-terms-options {
  gap: 1.125rem;
}

.std-terms-option {
  padding: 1.125rem;
}

.std-terms-text {
  font-size: 0.925rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Improved button spacing and typography */
.btn, .btn-primary, .btn-success, #std-credits-inline-actions button {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.4;
  border-radius: 10px;
}

/* Enhanced progress bar typography */
.std-progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.std-progress-percent {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Improved validation message typography */
.std-validation-message {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 1rem;
}

.std-validation-message .std-msg-success,
.std-validation-message .std-msg-warning,
.std-validation-message .std-msg-error,
.std-validation-message .std-msg-critical,
.std-validation-message .std-msg-info {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Enhanced info panel typography */
.std-info-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  margin-bottom: 0.5rem;
}

.std-info-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.std-info-list {
  font-size: 0.95rem;
  line-height: 1.6;
}

.std-info-list li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

/* Refined section header typography */
.std-section-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  margin-bottom: 0.375rem;
}

.std-section-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.5;
}

/* Improved responsive typography */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  .std-info-title {
    font-size: 1.25rem;
  }
  
  .std-section-title {
    font-size: 1.5rem;
  }
  
  .std-mapping-grid {
    padding: 1.25rem;
  }
  
  .std-activity-section,
  .std-terms-section {
    padding: 1.25rem;
  }
  
  .std-email-display {
    padding: 1rem 1.25rem;
  }
  
  .btn, .btn-primary, .btn-success, #std-credits-inline-actions button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .std-info-title {
    font-size: 1.125rem;
  }
  
  .std-section-title {
    font-size: 1.375rem;
  }
  
  .std-mapping-grid {
    padding: 1rem;
    gap: 0.875rem;
  }
  
  .std-mapping-field {
    padding: 1rem;
  }
  
  .std-activity-section,
  .std-terms-section {
    padding: 1rem;
  }
  
  .std-email-display {
    padding: 0.875rem 1rem;
  }
  
  .btn, .btn-primary, .btn-success, #std-credits-inline-actions button {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Final polish - subtle improvements */
.std-info-panel,
.std-validation-panel,
.std-email-section,
.std-activity-section,
.std-terms-section {
  border-radius: 14px;
}

.std-mapping-field,
.std-activity-option,
.std-terms-option {
  border-radius: 10px;
}

/* Enhanced focus states */
.std-mapping-select:focus,
.std-activity-checkbox:focus,
.std-terms-checkbox:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Field Highlight Animation - Button Validation Enhancement */
.std-field-highlight {
  animation: stdHighlightPulse 3s ease-in-out;
  position: relative;
  overflow: visible;
}

.std-field-highlight::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(45deg, #3b82f6, #0ea5e9, #06b6d4, #3b82f6);
  border-radius: inherit;
  z-index: -1;
  animation: stdHighlightGlow 3s ease-in-out;
}

.std-field-highlight::after {
  content: '⚠️ Complete this field to proceed';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  color: #92400e;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  z-index: 1000;
  animation: stdHighlightTooltip 3s ease-in-out;
}

@keyframes stdHighlightPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  10% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2);
  }
  20% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.1);
  }
  30% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2);
  }
  40% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
  }
  60% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
  }
  70% {
    transform: scale(1.01);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
  }
  80% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
  }
  90% {
    transform: scale(1.01);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

@keyframes stdHighlightGlow {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  10% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  20% {
    opacity: 1;
    transform: scale(1.1);
  }
  30% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  40% {
    opacity: 0.6;
    transform: scale(1.02);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  60% {
    opacity: 0.6;
    transform: scale(1.02);
  }
  70% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  80% {
    opacity: 0.6;
    transform: scale(1.02);
  }
  90% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes stdHighlightTooltip {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Specific highlight styles for different field types */
.std-mapping-confirmation.std-field-highlight {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.std-terms-option.std-field-highlight {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.std-email-section.std-field-highlight {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.std-mapping-field.std-field-highlight {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  transform: scale(1.02);
}

/* Mobile responsive tooltip */
@media (max-width: 768px) {
  .std-field-highlight::after {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    top: -35px;
    max-width: 200px;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .std-field-highlight::after {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    top: -30px;
    max-width: 150px;
  }
}

/* Improved link styling */
a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Enhanced required field indicators */
.std-required-asterisk,
.std-terms-required {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

/* Final spacing adjustments for better visual flow */
#std-checkout-grid {
  margin: 2.5rem 0;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  #std-checkout-grid {
    gap: 3rem;
  }
}

.std-fallback-prompt {
  margin-top: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem;
}

.std-fallback-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.std-fallback-text {
  margin: 0;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
}

.std-fallback-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.std-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.std-btn-warning {
  background: #f59e0b;
  color: white;
}

.std-btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.std-btn-secondary {
  background: #6b7280;
  color: white;
}

.std-btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
}