.qr-widget {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-widget-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.qr-code {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated; /* Keep QR codes crisp */
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.qr-code-image {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.qr-caption {
  text-align: center;
  font-weight: 500;
  margin-top: 10px;
  max-width: 300px;
  word-wrap: break-word;
  line-height: 1.4;
}

.qr-error-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  background: rgba(255, 0, 0, 0.1);
  border: 2px dashed rgba(255, 0, 0, 0.3);
  border-radius: 8px;
  color: rgba(255, 0, 0, 0.8);
}

.qr-error-placeholder .error-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.qr-error-placeholder .error-text {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 0 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .qr-widget-container {
    gap: 10px;
  }
  
  .qr-caption {
    font-size: 12px;
    max-width: 200px;
  }
  
  .qr-error-placeholder {
    width: 150px;
    height: 150px;
  }
  
  .qr-error-placeholder .error-icon {
    font-size: 32px;
  }
  
  .qr-error-placeholder .error-text {
    font-size: 12px;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .qr-caption {
    color: #e0e0e0;
  }
}