.kyc-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #7B7B7B80;
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.kyc-container {
  position: relative;
  width: 400px;
  max-width: calc(100% - 32px);
  background: #7B7B7B80;
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 24px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  margin: auto 0;
  flex-shrink: 0;
}

/* Ensure consistent box-sizing inside modal regardless of host app styles */
.kyc-container *,
.kyc-container *::before,
.kyc-container *::after {
  box-sizing: border-box;
}

.kyc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6b7280; /* gray-500 */
  font-size: 18px;
  cursor: pointer;
}
.kyc-close:hover {
  color: #1f2937; /* gray-800 */
}

.kyc-title {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.kyc-input {
  display: block;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  font-size: 14px;
}
.kyc-input:focus {
  outline: none;
  border-color: #2563eb; /* blue-600 */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.kyc-status {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 14px;
  max-height: none;
  overflow: visible;
}

.kyc-error {
  color: #dc2626; /* red-600 */
  margin: 0 0 8px 0;
  font-size: 14px;
}

.kyc-loading {
  color: #2563eb; /* blue-600 */
  margin: 0 0 8px 0;
  font-size: 14px;
}

/* Responsive adjustments for smaller screens */
@media (max-height: 600px) {
  .kyc-backdrop {
    padding: 10px;
  }
  
  .kyc-container {
    margin: 10px 0;
  }
}

@media (max-width: 480px) {
  .kyc-container {
    width: calc(100% - 20px);
    max-width: none;
    margin: 10px 0;
  }
  
  .kyc-backdrop {
    padding: 10px;
  }
}

/* Fullscreen QR pages (no scrollbars on tall desktops, scroll on short viewports) */
.qr-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; /* no scrollbar on tall desktop */
  box-sizing: border-box;
}

@media (max-height: 700px) {
  .qr-fullscreen {
    align-items: flex-start;     /* start at top on small heights */
    /* overflow-y: auto;            allow scroll only when height is small */
    padding: 20px;               /* breathing room while scrolling */
  }
}

