/* ==== ROOT COLORS ==== */
:root {
  --green:#00542A;
  --gold:#C08329;
  --bg:#fff;
}
/* 1. BASE STYLES */
.pp-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* Optional: Progress Indicator */
.pp-progress {
  margin-bottom: 32px;
}

.pp-progress-track {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.pp-progress-track::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #e0e0e0;
  z-index: 1;
}

.pp-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.pp-progress-step span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #757575;
  transition: all 0.3s ease;
}

.pp-progress-step.active span {
  background: var(--gold);
  border-color: #a47023;
  color: white;
  box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.pp-progress-step.completed span {
  background: var(--green);
  border-color: var(--gold);
  color: white;
}

.pp-progress-step label {
  font-size: 12px;
  color: #757575;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.pp-progress-step.active label {
  color: var(--gold);
  font-weight: 600;
}

/* 2. CARD STYLES */
.pp-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.pp-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  border-radius: 0;
}

.pp-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.pp-card-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--gold);
  border-radius: 0;
}

/* Section numbers */
.pp-card-title::after {
  content: attr(data-section);
  margin-left: auto;
  font-size: 11px;
  color: #757575;
  font-weight: 400;
  background: #f8f9fa;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

/* 3. GRID LAYOUTS - FIXED SPACING */
.pp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; /* Increased from 16px */
}

.pp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; /* Increased from 16px */
}

/* Add spacing between field groups */
.pp-grid-2 + .pp-grid-2,
.pp-grid-3 + .pp-grid-3,
.pp-grid-2 + .pp-grid-3,
.pp-grid-3 + .pp-grid-2 {
  margin-top: 20px;
}

/* 4. FORM FIELDS - FIXED SPACING */
.pp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  margin-bottom: 4px; /* Add bottom margin for extra spacing */
}

.pp-label {
  font-size: 13px;
  color: #444;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pp-label::after {
  content: '*';
  color: #ea4335;
  font-size: 14px;
  margin-left: 2px;
}

.pp-input,
.pp-select,
.pp-textarea {
  padding: 10px 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  width: 100%;
  background: #fff;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-bottom: 0; /* Remove any default margin */
}

.pp-input:hover,
.pp-select:hover {
  border-color: #bbb;
}

.pp-input:focus,
.pp-select:focus,
.pp-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.pp-input[readonly] {
  background: #f8f9fa;
  border-color: #e0e0e0;
  color: #666;
  cursor: not-allowed;
}

.pp-input[readonly]:hover {
  background: #f8f9fa;
  border-color: #e0e0e0;
}

.pp-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

.pp-textarea {
  min-height: 100px;
  resize: vertical;
}

/* 5. NOTES AND HELPER TEXT */
.pp-note {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.pp-note strong {
  color: #333;
  font-weight: 500;
}

/* 6. DIVIDERS */
.pp-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 20px 0;
  border: none;
}

.pp-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center; /* CENTER THE BUTTONS */
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}
/* Make buttons equal width for better centering */
.pp-actions .pp-btn {
  min-width: 200px; /* Ensure buttons have consistent width */
}
.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  font-size: 14px;
  transition: all 0.2s ease;
  gap: 6px;
}

.pp-btn-primary {
  background: var(--gold);
  color: #fff;
}

.pp-btn-primary:hover {
  background: #bf8938;
}

.pp-btn-outline {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.pp-btn-outline:hover {
  background: #f8f9fa;
  border-color: #bbb;
}

.pp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 8. ALERTS AND MESSAGES */
.pp-alert {
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid;
  font-size: 14px;
}

.pp-alert-error {
  background: #fce8e6;
  border-color: #f28b82;
  color: #c5221f;
}

.pp-alert-success {
  background: #e6f4ea;
  border-color: #003e1f;
  color: var(--green);
}

/* 9. TOTAL PRICE DISPLAY */
.pp-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-radius: 4px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
  color: #444;
}

.pp-total strong {
  font-size: 20px;
  color: var(--green);
  font-weight: 600;
}

/* 10. PARTICIPANT ROWS - FIXED CUTOFF ISSUE */
.pp-participant-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px; /* Increased gap */
  padding: 20px; /* Increased padding */
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 16px; /* Increased margin */
  background: #f8f9fa;
  transition: all 0.2s ease;
  position: relative;
  margin-top: 16px; /* Add top margin to prevent cutoff */
}

.pp-participant-row:first-child {
  margin-top: 20px; /* Extra space for first participant */
}

.pp-participant-row:hover {
  border-color: #4285f4;
  background: #fff;
}

/* Fix the participant label - removed cutoff pseudo-element */
.pp-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  padding-top: 4px; /* Add padding to prevent cutoff */
}

/* Add icon to first participant label */
.pp-participant-row > div:first-child .pp-row-title::before {
  content: '👤 ';
  margin-right: 4px;
}

/* Fix participant wrapper spacing */
[data-participants-wrap] {
  margin-top: 16px;
  min-height: 100px; /* Ensure enough space */
}

/* Placeholder styling */
.pp-participant-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  margin-top: 20px; /* Add top margin */
}

/* 11. QR CODE DISPLAY */
.pp-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px dashed #ddd;
}

.pp-qr-img {
  max-width: 350px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* 12. ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animations */
.pp-card {
  animation: fadeIn 0.3s ease-out;
}

/* 13. LOADING STATE */
.pp-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 14. RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .pp-wrap {
    padding: 20px 16px 40px;
  }
  
  .pp-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .pp-card-title {
    font-size: 15px;
    flex-direction: row;
  }
  
  .pp-card-title::after {
    display: none;
  }
  
  .pp-grid-2,
  .pp-grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .pp-participant-row {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
    margin-top: 12px;
  }
  
  .pp-participant-row:first-child {
    margin-top: 16px;
  }
  
  .pp-btn {
    padding: 10px 16px;
    width: 100%;
  }
  
  .pp-actions {
    flex-direction: column;
    gap: 10px;
  }
    .pp-actions .pp-btn {
    width: 100%;
    min-width: auto;
  }
  
  .pp-progress-track {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .pp-progress-step {
    min-width: 70px;
  }
  
  .pp-progress-track::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .pp-wrap {
    padding: 16px 12px 32px;
  }
  
  .pp-card {
    padding: 16px;
  }
  
  .pp-input,
  .pp-select,
  .pp-textarea {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .pp-total {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .pp-total strong {
    font-size: 18px;
  }
  
  .pp-qr-img {
    max-width: 350px;
  }
  
  .pp-participant-row {
    padding: 12px;
    gap: 12px;
  }
  
  .pp-field {
    margin-bottom: 8px;
  }
}

/* 15. FILE UPLOAD STYLING */
.pp-file-upload {
  border: 1px dashed #ddd;
  border-radius: 4px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.pp-file-upload:hover {
  border-color: #4285f4;
  background: #fff;
}

/* 16. QUANTITY BUTTONS */
.pp-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pp-btn-quantity {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.pp-btn-quantity:hover {
  background: #e8eaed;
}

/* 17. REQUIRED FIELD STYLING */
.pp-label.required {
  font-weight: 500;
}

/* 18. READ-ONLY STYLING */
.pp-input[readonly],
.pp-input[disabled] {
  background-color: #f8f9fa;
  color: #666;
}

/* 19. FOCUS VISIBLE FOR ACCESSIBILITY */
.pp-input:focus-visible,
.pp-select:focus-visible,
.pp-textarea:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

/* 20. PRINT STYLES */
@media print {
  .pp-progress,
  .pp-actions .pp-btn-outline,
  .pp-btn-outline {
    display: none !important;
  }
  
  .pp-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
  
  .pp-btn-primary {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
}
/* =====================================================
   PARTICIPANT-ONLY MODE FIX (NO PACKAGE / NO PAYMENT)
===================================================== */
body:not(.commercial-flow) [data-participants-wrap] {
  display: block !important;
}
/* =====================================================
   PARTICIPANT-ONLY MODE - MATCHING COMMERCIAL DESIGN
===================================================== */

/* Remove button styling */
.pp-btn-remove-participant {
  transition: all 0.2s ease;
}

.pp-btn-remove-participant:hover {
  background: #fca5a5 !important;
  color: #991b1b !important;
  border-color: #f87171 !important;
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.pp-btn-remove-participant:active {
  transform: scale(0.95);
}

/* Participant row grid layout - 3 columns (Name | Position | Remove) */
.pp-participant-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 16px;
  background: #f8f9fa;
  transition: all 0.2s ease;
  position: relative;
  margin-top: 16px;
}

.pp-participant-row:first-child {
  margin-top: 20px;
}

.pp-participant-row:hover {
  border-color: #C08329;
  background: #fff;
  box-shadow: 0 2px 4px rgba(192, 131, 41, 0.1);
}

/* Participant label */
.pp-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  padding-top: 4px;
}

/* Add icon to first participant label */
.pp-participant-row > div:first-child .pp-row-title::before {
  content: '👤 ';
  margin-right: 4px;
}

/* Fix participant wrapper spacing */
[data-participants-wrap] {
  margin-top: 16px;
  min-height: 100px;
}

/* Placeholder styling */
.pp-participant-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  margin-top: 20px;
}

/* Required label indicator */
.pp-label.required::after {
  content: '';
  display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .pp-participant-row {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
    margin-top: 12px;
  }
  
  .pp-participant-row:first-child {
    margin-top: 16px;
  }

  .pp-participant-row > div:last-child {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
  }

  .pp-btn-remove-participant {
    width: 100%;
    padding: 10px !important;
    font-size: 14px !important;
  }

  .pp-btn-remove-participant::before {
    content: 'Remove Participant ';
    font-size: 14px;
  }
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pp-participant-row {
  animation: slideIn 0.3s ease-out;
}

/* =====================================================
   PARTICIPATION FORM DOWNLOAD LINK
   Styling for the Download Link (Top of Upload Box)
===================================================== */

/* Download button for form */
.pf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #006B3F;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.pf-download-btn:hover {
    background-color: #00552F;
}

.pf-download-btn:active {
    background-color: #00421F;
}

/* Optional text */
.pf-optional {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

/* =====================================================
   SUPPORTING DOCUMENT (PUBLIC FORM)
   Prefix: pf-
===================================================== */

/* Card container */
.pf-card {
  background: #fff;
  border-radius: 10px;
  border-left: 4px solid #C08329;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);  /* Added shadow */
  transition: all 0.2s ease;
}

.pf-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* Slight increase on hover */
}

/* Card title */
.pf-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 18px;
}

/* Required/Optional text */
.pf-optional,
.pf-required {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

/* Field wrapper */
.pf-field {
  display: flex;
  flex-direction: column;
}

/* Label */
.pf-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111827;
}

/* Add red asterisk for required fields */
.pf-required {
  color: #ea4335;  /* Red color */
  font-size: 16px; /* Same size as label */
  font-weight: 600;
  margin-left: 5px;  /* Space between label and asterisk */
}

/* Upload box (dashed) */
.pf-upload-box {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #fafafa;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pf-upload-box:hover {
  border-color: #C08329;
  background: #f9fafb;
}

/* Upload icon */
.pf-upload-icon {
  font-size: 18px;
}

/* Upload text */
.pf-upload-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #111827;
}

/* File preview row */
.pf-upload-preview {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #374151;
}

/* Remove button */
.pf-upload-remove {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
}

.pf-upload-remove:hover {
  color: #991b1b;
}

/* Helper note */
.pf-note {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* Mobile */
@media (max-width: 768px) {
  .pf-card {
    padding: 20px;
  }

  .pf-upload-text {
    font-size: 13px;
  }
}

/* Add required red asterisk next to label */
.pf-required {
  color: #dc2626;  /* Red color */
  font-size: 12px;  /* Same size as label */
  font-weight: 600;
  margin-left: 5px;  /* Space between label and asterisk */
}

/* Style for 'Required' text */
.pf-required-text {
  color: #dc2626;  /* Red color */
  font-size: 12px;  /* Same size as label */
  font-weight: 600;
}
