/* QR Code Module Styles */

.qr-code-module {
  position: relative;
}

.qr-code-title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.qr-code-description {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.qr-code-container {
  display: inline-block;
  position: relative;
}

.qr-code-container canvas,
.qr-code-container svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-download-btn {
  margin-top: 1rem;
  cursor: pointer;
}

.qr-code-text {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text);
}

.qr-code-text code {
  background: var(--color-bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

/* Alignment variations */
.qr-code-module.left {
  text-align: left;
}

.qr-code-module.center {
  text-align: center;
}

.qr-code-module.right {
  text-align: right;
}

/* Loading state */
.qr-code-container[data-qr-loading]::before {
  content: "Generating QR Code...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-muted, #999);
  font-size: 0.875rem;
}

/* Error state */
.qr-code-container[data-qr-error]::before {
  content: "Error generating QR Code";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-primary);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .qr-code-container {
    max-width: 100%;
  }
  
  .qr-code-container canvas,
  .qr-code-container svg {
    max-width: 100%;
    height: auto;
  }
}