/* ============================================================
   EEIS Milestones PWA – QR Code Styles
   ============================================================ */

/* ── QR Code Section ── */
.qr-section {
  padding: 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--clr-border-light);
}

.qr-code-display,
.detail-qr-display,
.qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 220px;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qr-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--clr-border);
  background: var(--bg-surface);
  color: var(--clr-text);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qr-actions button:hover {
  background: var(--bg-hover);
  border-color: var(--clr-primary);
  transform: translateY(-1px);
}

.qr-actions button:active {
  transform: translateY(0);
}

.qr-actions button svg {
  flex-shrink: 0;
}

/* ── QR Scanner Modal ── */
.qr-scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qr-scanner-container {
  position: relative;
  width: 90%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.qr-scanner-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  border: 3px solid rgba(191, 31, 31, 0.8);
  border-radius: 15px;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
}

.qr-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #bf1f1f, transparent);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.qr-scanner-instruction {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  text-align: center;
}

.qr-scanner-cancel {
  margin-top: 20px;
  padding: 12px 30px;
  background: rgba(191, 31, 31, 0.9);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.qr-scanner-cancel:hover {
  background: rgba(191, 31, 31, 1);
  transform: translateY(-2px);
}

.qr-scanner-cancel:active {
  transform: translateY(0);
}
