/* Vendor Onboarding Page Custom Styles */

/* Add padding to body to account for fixed progress bar */
body {
  padding-top: 6px;
}

/* Vendor Information & Signature Cards */
.form-label {
  margin-bottom: 0.5rem;
  font-size: 14px;
}

.form-control:focus {
  border-color: #343f52;
  box-shadow: 0 0 0 0.2rem rgba(52, 63, 82, 0.25);
}

.form-control.is-valid {
  border-color: #28a745;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

#signature {
  font-family: 'Brush Script MT', cursive, 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-style: italic;
}

#signatureDate {
  background-color: #f8f9fa;
}

.onboarding-section {
  position: relative;
  border-left: 4px solid #e0e0e0;
  transition: all 0.3s ease;
  padding-left: 70px !important;
}

.onboarding-section:hover {
  border-left-color: #343f52;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

.onboarding-section.acknowledged {
  border-left-color: #343f52;
  background-color: #e8f0f8;
}

.onboarding-section.skipped {
  border-left-color: #dc3545;
  background-color: #fff5f5;
  animation: pulse-red 0.5s ease-in-out;
}

@keyframes pulse-red {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.onboarding-section.skipped .section-number {
  background: #dc3545;
  border-color: #fff5f5;
  animation: shake 0.3s ease-in-out;
}

.onboarding-section.skipped::before {
  content: "⚠ Skipped - Please acknowledge this section";
  position: absolute;
  top: 8px;
  right: 12px;
  background: #dc3545;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 5;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.section-number {
  position: absolute;
  top: 24px;
  left: -27px;
  width: 54px;
  height: 54px;
  background: #343f52;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  border: 4px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.onboarding-section.acknowledged .section-number {
  background: #343f52;
  border-color: #e8f0f8;
}

.onboarding-section h3 {
  color: #343f52;
  font-weight: 600;
  margin-left: 0;
  line-height: 1.3;
}

.onboarding-section ul {
  list-style-type: none;
  padding-left: 0;
}

.onboarding-section ul {
  margin-bottom: 0.75rem;
}

.onboarding-section ul li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.5;
  font-size: 15px;
}

.onboarding-section ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #343f52;
  font-weight: bold;
  font-size: 16px;
}

.onboarding-section p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-size: 15px;
}

.onboarding-section h3 {
  font-size: 1.35rem;
}


.form-check-lg {
  padding: 14px 16px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 2px solid #dee2e6;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  margin-left: 0;
}

.form-check-lg:hover {
  background-color: #e8f0f8;
  border-color: #343f52;
}

.form-check-lg .form-check-input {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  margin-right: 12px;
  margin-left: 0 !important;
  padding-left: 0;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid #adb5bd;
  position: relative;
  float: none;
}

.form-check-lg .form-check-input:checked {
  background-color: #343f52;
  border-color: #343f52;
}

.form-check-lg .form-check-input:focus {
  border-color: #343f52;
  box-shadow: 0 0 0 0.2rem rgba(52, 63, 82, 0.25);
}

.form-check-lg .form-check-label {
  cursor: pointer;
  padding-left: 0;
  margin-left: 0 !important;
  color: #343f52;
  flex: 1;
  line-height: 1.6;
}

.onboarding-section.acknowledged .form-check-lg {
  background-color: #e8f0f8;
  border-color: #343f52;
}

.onboarding-section.skipped .form-check-lg {
  background-color: #fff5f5;
  border-color: #dc3545;
  border-width: 2px;
}

/* Fixed Progress Bar at Top */
.progress-bar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: transparent;
  padding: 0;
  height: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-bar-container {
  width: 100%;
  height: 100%;
  background-color: #e9ecef;
}

.progress-bar-fill {
  height: 100%;
  background-color: #343f52;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(52, 63, 82, 0.5);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3));
  border-radius: 0 2px 2px 0;
}

.progress-bar-fill.progress-complete {
  background-color: #28a745;
  box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}

#submitOnboarding {
  min-width: 300px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#submitOnboarding:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(52, 63, 82, 0.3);
}

#submitOnboarding:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background-color: #adb5bd;
  border-color: #adb5bd;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .onboarding-section {
    padding-left: 60px !important;
  }
  
  .section-number {
    width: 44px;
    height: 44px;
    font-size: 18px;
    top: 20px;
    left: -22px;
    border-width: 3px;
  }
  
  .onboarding-section h3 {
    font-size: 20px;
    margin-left: 0;
  }
  
  .onboarding-section .card-body {
    padding: 16px 16px 16px 8px !important;
  }
  
  .onboarding-section h3 {
    font-size: 1.15rem;
  }
  
  .onboarding-section.skipped::before {
    font-size: 11px;
    padding: 3px 8px;
    top: 6px;
    right: 8px;
  }
  
  #submitOnboarding {
    min-width: 100%;
    font-size: 15px;
    padding: 12px 20px;
    white-space: normal;
    line-height: 1.4;
  }
  
  .form-check-lg {
    padding: 12px 12px 12px 12px;
  }
  
  .onboarding-section p {
    font-size: 14px;
  }
  
  .onboarding-section ul li {
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  .form-check-lg .form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-left: 0;
  }
  
  
  .progress-bar-fixed {
    height: 5px;
  }
  
  body {
    padding-top: 5px;
  }
}

/* Print Styles */
@media print {
  .onboarding-section {
    page-break-inside: avoid;
    border: 1px solid #ddd;
    margin-bottom: 20px;
  }
  
  .section-number {
    background: #333 !important;
  }
  
  #submitOnboarding,
  .progress-bar-fixed {
    display: none;
  }
}
