/* =========================
   QR SCANNER – CORE RESET
   ========================= */
#qrScannerApp {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 720px;
  margin: 24px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* =========================
   TAB MENU
   ========================= */
.qr-scanner-tabs {
  display: inline-flex;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 4px; 
}
.qr-scanner-tabs a {
	text-decoration: none !important;
	color: inherit !important;
}
.qr-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: all .2s ease;
}

.qr-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* =========================
   TAB CONTENT
   ========================= */
.qr-scanner-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 5px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.qr-tab-panel {
  display: none;
}

.qr-tab-panel.active {
  display: block;
}

/* =========================
   PANEL HEADER
   ========================= */
.qr-panel-header {
	text-align: center;
	margin-top: 15px;
}
.qr-panel-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #111827;
}
.qr-panel-header p {
	margin-bottom: 16px !important;
}

.qr-helper-text {
  margin: 0 0 16px;
  font-size: 13px;
  color: #6b7280;
}

/* =========================
   CAMERA AREA
   ========================= */
.qr-camera-area {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 16px;
  display: block;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}
.qr-img-area { 
	background: #f9fafb;
	border: 2px dashed #e5e7eb;
	border-radius: 16px; 
	align-items: center;
	justify-content: center;
	margin-bottom: 25px;
	overflow: hidden;
	padding: 15px;
}

#qrVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
/* =========================
   CAMERA PLACEHOLDER – PREMIUM UI
   ========================= */
.qr-camera-area {
	position: relative;
}
.qr-camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;

  /* visual polish */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  background: rgba(255,255,255,0.35);

  opacity: 1;
  transition: opacity .35s ease;
}

/* SVG styling */
.qr-camera-placeholder svg {
  display: block;
  width: 64px;
  height: 64px;
  opacity: 0.65;
}

/* =========================
   STATE: CAMERA ACTIVE
   ========================= */
.qr-camera-area.active-scan .qr-camera-placeholder {
  opacity: 0;
}

/* =========================
   CAMERA SIZE – DESKTOP IDLE
   ========================= */
@media (min-width: 768px) {
  .qr-camera-area {
    width: 100%;
    height: 180px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 16px;
    transition: all .3s ease;
  }

  .qr-camera-area.active-scan {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* =========================
   UPLOAD AREA
   ========================= */
.qr-upload-area {
  display: flex;
  justify-content: center; 
}

.qr-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 18px;
  color: #111827;
  transition: background .2s ease;
  border: 1px solid #ccc;
}

.qr-upload-btn:hover {
  background: #e5e7eb;
}

/* =========================
   BUTTONS
   ========================= */
.qr-action {
  text-align: center;
  margin-top: 10px;
}

.qr-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 18px;
  cursor: pointer;
  transition: all .2s ease;
  width: 100%;
}

.qr-btn.primary {
  background: #2563eb;
  color: #ffffff;
}

.qr-btn.primary:hover {
  background: #1d4ed8;
}

.qr-btn.secondary {
  background: #f3f4f6;
  color: #111827;
}

.qr-btn.secondary:hover {
  background: #e5e7eb;
}
.qr-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}


/* =========================
   MODAL
   ========================= */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.qr-modal.active {
  display: flex;
}


.qr-modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.qr-modal-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
}

.qr-result-text textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px;
  font-size: 13px;
  resize: none;
  box-sizing: border-box;
}

/* =========================
   RESULT ACTIONS
   ========================= */
.qr-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.qr-result-actions button {
  flex: 1 1 auto;
  padding: 10px;
  font-size: 13px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #6163F0;
}

.qr-result-actions button:hover {
  background: #494CF9;
}

/* =========================
   MODAL FOOTER
   ========================= */
.qr-modal-footer {
  margin-top: 16px;
  text-align: right;
}

/* =========================
   TRUST NOTE
   ========================= */
.qr-trust-note {
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 480px) {
  .qr-scanner-content {
    padding: 16px;
  }

  .qr-panel-header h3 {
    font-size: 16px;
  }

  .qr-btn {
    width: 100%;
  }
}
/* =========================
   BUTTON MICRO INTERACTION
   ========================= */
.qr-btn {
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.qr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

.qr-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}

.qr-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
/* =========================
   MODAL ANIMATION
   ========================= */
.qr-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.qr-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-content {
  transform: scale(.96);
  transition: transform .25s ease;
}

.qr-modal.active .qr-modal-content {
  transform: scale(1);
}
/* =========================
   TOAST FEEDBACK
   ========================= */
.qr-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10000;
}

.qr-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* visual emphasis */
.qr-result-actions button:first-child {
  background: #2563eb;
  color: #fff;
}

.qr-result-actions button:first-child:hover {
  background: #1d4ed8;
}
/* bookmark btn */ 
#qrScannerQuickAction svg{width:40px;height:40px;margin-bottom: -10px;fill:currentColor}
.qr-qa-mobile{display:none}
.qr-qa-desktop{display:none}

@media (max-width:767px){
    #qrScannerQuickAction svg{width:22px;height:22px;margin-bottom: -4px;fill:currentColor}
  .qr-qa-mobile{
    display:flex;
    position:fixed;
    bottom:0;left:0;width:100%;
    background:#6261F8;
    z-index:9999;
  }
  .qr-qa-mobile button{
    flex:1;
    border:none;
    background:none;
    color:#fff;
    padding:12px 6px;
    display:flex;
    flex-direction:column;
    align-items:center;
    font-size:13px;
    gap:4px;
  }
}

@media (min-width:768px){
  .qr-qa-desktop{
    display:block;
    position:fixed;
    bottom:40px;
    right:40px;
    z-index:9999;
    text-align:center;
    color:#facc15;
    cursor:pointer;
    margin-bottom: -10px;
  }
  .qr-qa-desktop span{
    display:block;
    font-size:12px;
    color:#555;
    margin-top:4px;
  }
} 