* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #000000;
  height: 100vh;
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

.container {
  width: 100%;
  height: 100vh;
  background: #323232;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.logo-header {
  padding: 12px 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 60px;
}

.logo-header img {
  width: 183px;
  height: auto;
  max-height: 29px;
}

.step {
  display: none;
  animation: fadeIn 0.5s ease-in;
  flex: 1;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 60px);
  padding: 0;
}

.step.active {
  display: flex;
  flex-direction: column;
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #2a2a2a;
  border-radius: 16px;
  margin: 20px;
  border-top: 3px solid #ff3a03;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.step-actions {
  padding: 15px 20px 20px 20px;
  flex-shrink: 0;
}

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

h1 {
  color: #ffffff;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 700;
}

p {
  color: #cccccc;
  margin-bottom: 20px;
  line-height: 1.4;
  font-size: 14px;
}

button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0.3px;
  outline: none;               /* remove default outline/border on some browsers */
  appearance: none;            /* normalize native styles */
  -webkit-appearance: none;
}

button:last-child {
  margin-bottom: 0;
}

.btn-primary {
  background: #ff3a03;
  color: white;
}

.btn-primary:active {
  background: #e63300;
  transform: scale(0.98);
}

.btn-success {
  background: transparent;
  color: #ff3a03;
  border: 2px solid #ff3a03;
}

.btn-success:active {
  background: rgba(255, 58, 3, 0.1);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.1);
}

button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Remove focus ring/outline around buttons (seen on Step 2) */
button:focus,
button:focus-visible,
button::-moz-focus-inner {
  outline: none;
  box-shadow: none;
  border: 0;
}

/* Extra visual cue when waiting for consent */
#acceptBICBtn:disabled {
  filter: grayscale(20%);
}

#selfie {
  display: none;
}

.preview-container {
  margin: 15px 0;
  position: relative;
  width: 100%;
  flex: 1;
  display: none;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  min-height: 120px;
  border: 2px solid #ff3a03;
}

.preview-container.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

#preview,
.selfie-preview {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.selfie-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 15px auto;
  object-fit: cover;
  border: 3px solid #ff3a03;
}

.location-info {
  background: rgba(255, 58, 3, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
  border: 2px solid #ff3a03;
}

.location-info h3 {
  color: #ff3a03;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-info p {
  margin: 4px 0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #ffffff;
}

.location-info.error {
  background: rgba(255, 58, 3, 0.1);
  border-color: #f44336;
}

.location-info.error h3 {
  color: #f44336;
}

.success-icon {
  font-size: 48px;
  color: #ff3a03;
  margin-bottom: 15px;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #333333;
  border-top: 3px solid #ff3a03;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.signature-container {
  margin: 15px auto;
  border: 2px solid #ff3a03;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature-pad {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.simple-list li {
  color: #ffffff;
  padding: 12px 0;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  position: relative;
  transition: all 0.2s ease;
}

.simple-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #ff3a03;
  font-weight: bold;
}

.simple-list li:hover {
  color: #ff3a03;
  transform: translateX(4px);
}

.selfie-instruction {
  background: #0a0a0a;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  border: 2px solid #ff3a03;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.selfie-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  background: #2a2a2a;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.selfie-icon svg {
  width: 80px;
  height: 80px;
}

.camera-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 40px;
  height: 40px;
  background: #ff3a03;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selfie-video {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  border: 2px solid #ff3a03;
  margin: 10px auto 0;
  background: #000;
}

.form-group {
  margin: 15px 0;
  text-align: left;
}

.form-group label {
  display: block;
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 15px;
}

.text-input {
  width: 100%;
  padding: 12px;
  background: #2a2a2a;
  border: 2px solid #444444;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  transition: all 0.3s ease;
}

.text-input:focus {
  outline: none;
  border-color: #ff3a03;
}

.text-input::placeholder {
  color: #666666;
}

.pdf-container {
  width: 100%;
  height: calc(100vh - 280px);
  max-height: 400px;
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
  overflow: hidden;
  margin: 15px 0;
  border: 2px solid #ff3a03;
  position: relative;
  flex: 1;
}

.pdf-content {
  padding: 15px;
  height: 100%;
  overflow-y: auto;
  font-size: 11px;
  color: #000000;
  font-family: "Courier New", monospace;
}

/* Ensure all text inside the BIC consent (pdf-content) is solid black */
.pdf-content p,
.pdf-content span,
.pdf-content li,
.pdf-content div,
.pdf-content strong,
.pdf-content em,
.pdf-content h1,
.pdf-content h2,
.pdf-content h3,
.pdf-content h4,
.pdf-content h5,
.pdf-content h6 {
  color: #000000;
}

.pdf-header {
  text-align: center;
  margin-bottom: 15px;
}

.pdf-header img {
  width: 100px;
  margin-bottom: 8px;
}

.pdf-title {
  color: #ff3a03;
  font-weight: bold;
  font-size: 15px;
  margin: 8px 0;
}

/* PDF header sub text */
.pdf-brand {
  font-weight: bold;
  color: #000000;
  margin-top: 8px;
  font-size: 1.5rem;
}
.pdf-country {
  color: #000000;
  font-size: 1.5rem;
}

/* PDF details block */
.pdf-details {
  text-align: left;
  margin-top: 15px;
}

/* PDF signature section */
.pdf-signature {
  margin-top: 20px;
}
.pdf-signature-label {
  font-weight: bold;
  color: #000000;
}
.pdf-signature-line {
  height: 40px;
  border-bottom: 1px solid #999;
  margin-top: 15px;
}

/* PDF footnote */
.pdf-footnote {
  margin-top: 15px;
  font-size: 8px;
}
.pdf-footnote-center {
  text-align: center;
  margin-top: 8px;
}

/* BIC Consent Checkboxes */
.bic-checkboxes {
  margin-top: 15px;
  font-size: 10px;
  line-height: 1.5;
}

.bic-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
}

.bic-checkbox {
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #ff3a03;
}

.bic-checkbox-text {
  color: #000000;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

/* Inline label/value rows inside the PDF content */
.pdf-field {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}
.pdf-label {
  font-weight: 700;
  color: #000000;
  font-size: 15px; /* match previous pdf-content text size */
}
.pdf-value {
  color: #000000;
  font-size: 15px; /* match previous pdf-content text size */
}

@media (max-height: 600px) {
  .logo-header {
    height: 50px;
    padding: 8px 15px;
  }

  .logo-svg {
    width: 140px;
    max-height: 24px;
  }

  h1 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  p {
    font-size: 13px;
    margin-bottom: 10px;
  }

  button {
    padding: 12px;
    font-size: 14px;
  }

  .step-content {
    padding: 15px;
    margin: 15px;
    border-radius: 12px;
  }

  .step-actions {
    padding: 10px 15px;
  }

  .signature-container {
    height: 140px;
    max-width: 280px;
  }

  .selfie-avatar {
    width: 120px;
    height: 120px;
  }

  .pdf-container {
    max-height: 300px;
  }

  .simple-list {
    padding: 15px;
    margin: 15px 0;
  }

  .simple-list li {
    padding: 8px 0;
    padding-left: 25px;
    font-size: 14px;
  }

  .simple-list li::before {
    font-size: 18px;
    top: 8px;
  }
}

.radio-container {
  background: #4a4a4a;
  border-radius: 16px;
  padding: 8px;
}

.radio-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.radio-item input {
  display: none;
}

.radio-dot {
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-item input:checked + .radio-dot::after {
  content: "";
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
}

/* Toast notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.toast {
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 200ms ease-out;
}

.toast.success {
  border-color: #1faa5c;
}

.toast .toast-icon {
  width: 18px;
  height: 18px;
  background: #1faa5c;
  border-radius: 50%;
  display: inline-block;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Branded scrollbar styling */
/* Firefox */
.step-content,
.pdf-content {
  scrollbar-width: thin;              /* thickness */
  scrollbar-color: #ffffff #1f1f1f;   /* thumb, track */
}

/* WebKit (Chrome, Edge, Safari, Android) */
.step-content::-webkit-scrollbar,
.pdf-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.step-content::-webkit-scrollbar-track,
.pdf-content::-webkit-scrollbar-track {
  background: #1f1f1f;
  border-radius: 8px;
}

.step-content::-webkit-scrollbar-thumb,
.pdf-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff5a2a, #ff3a03);
  border-radius: 8px;
  border: 2px solid #1f1f1f;          /* creates padding gap to match track */
}

.step-content::-webkit-scrollbar-thumb:hover,
.pdf-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff754f, #ff4a1a);
}

/* Merchant Info Styling */
.merchant-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
/* add gap between info-item */
.info-item {
  margin-bottom: 20px;
}
.info-row {
  display: block;
  gap: 20px;
  margin-bottom: 20px;
}

.info-row:last-child {
  margin-bottom: 0;
}
/* add gap between info-item */

.info-item {
  display: block;
}

.info-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  color: #cccccc;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.gps-info {
  background: none;
  border-radius: 12px;
  margin-top: 20px;
}

.gps-header h3 {
  color: #ff3a03;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.gps-header p {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 13px;
}

.gps-coordinates {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.coordinate-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-radius: 8px;
}

.coordinate-label {
  color: #ffffff;
  font-weight: 500;
  font-size: 14px;
}

.coordinate-value {
  color: #ff3a03;
  font-weight: 600;
  font-size: 14px;
  font-family: "Courier New", monospace;
}

@media (max-height: 600px) {
  .merchant-info {
    padding: 15px;
  }

  .info-row {
    gap: 15px;
    margin-bottom: 15px;
  }

  .info-label {
    font-size: 13px;
  }

  .info-value {
    font-size: 14px;
  }

  .gps-info {
    padding: 15px;
  }

  .gps-coordinates {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .coordinate-item {
    padding: 10px 12px;
  }

  .coordinate-label,
  .coordinate-value {
    font-size: 13px;
  }
}

/* Success Page Styles */
.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 15px;
  height: 100%;
  overflow: hidden;
}

.success-animation {
  margin-bottom: 20px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1faa5c, #0d8a4a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: successPulse 2s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(31, 170, 92, 0.3);
}

.checkmark {
  font-size: 40px;
  color: white;
  font-weight: bold;
  animation: checkmarkAppear 0.8s ease-in-out 0.3s both;
}

.success-title {
  color: #1faa5c;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.success-message {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 20px;
  max-width: 350px;
}

.success-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.success-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(31, 170, 92, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(31, 170, 92, 0.2);
  animation: successItemSlide 0.6s ease-out both;
}

.success-item:nth-child(1) { animation-delay: 0.8s; }
.success-item:nth-child(2) { animation-delay: 1.0s; }
.success-item:nth-child(3) { animation-delay: 1.2s; }

.success-icon {
  width: 20px;
  height: 20px;
  background: #1faa5c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.success-item span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

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

@keyframes checkmarkAppear {
  0% { 
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes successItemSlide {
  0% { 
    opacity: 0; 
    transform: translateX(-20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@media (max-height: 600px) {
  .success-content {
    padding: 15px 10px;
  }
  
  .success-checkmark {
    width: 60px;
    height: 60px;
  }
  
  .checkmark {
    font-size: 30px;
  }
  
  .success-title {
    font-size: 20px;
    margin-bottom: 8px;
  }
  
  .success-message {
    font-size: 13px;
    margin-bottom: 15px;
  }
  
  .success-details {
    gap: 8px;
  }
  
  .success-item {
    padding: 6px 10px;
  }
}
