/* ── ALL STYLES SCOPED UNDER #mco-auth — will NOT affect WordPress theme ── */

#mco-auth * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#mco-auth {
  font-family: 'Inter', sans-serif;
  color: #1A1A2E;
  background: #F4F6F9;
  width: 100%;
}

/* ── TOP BAR ── */
#mco-auth .ma-topbar {
  background: #B30909;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 16px 16px 0 0;
}

#mco-auth .ma-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

#mco-auth .ma-logo-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

#mco-auth .ma-logo h2 {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: -0.5px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-logo p {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

#mco-auth .ma-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}

#mco-auth .ma-dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: ma-blink 1.8s infinite;
}

@keyframes ma-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── PAGE ── */
#mco-auth .ma-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* ── HERO ── */
#mco-auth .ma-hero {
  text-align: center;
  padding: 16px 0 28px;
}

#mco-auth .ma-hero h3 {
  font-size: clamp(20px, 4vw, 32px) !important;
  font-weight: 800 !important;
  color: #1A1A2E !important;
  line-height: 1.2 !important;
  letter-spacing: -0.5px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-hero h3 span { color: #B30909; }

#mco-auth .ma-hero p {
  color: #6B7280;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

#mco-auth .ma-chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

#mco-auth .ma-chip {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  display: flex; align-items: center; gap: 5px;
}

/* ── CARD ── */
#mco-auth .ma-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  margin-bottom: 0;
}

#mco-auth .ma-card-head {
  background: linear-gradient(135deg, #B30909 0%, #8C0707 100%);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 12px;
}

#mco-auth .ma-card-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

#mco-auth .ma-card-head h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-card-head p {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin: 2px 0 0;
}

#mco-auth .ma-card-body { padding: 24px; }

/* ── AUTO-VERIFY BANNER ── */
#mco-auth .ma-auto-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1D4ED8;
  font-weight: 500;
}

#mco-auth .ma-auto-banner .ma-spinner-blue {
  width: 16px; height: 16px;
  border: 2px solid #BFDBFE;
  border-top-color: #1D4ED8;
  border-radius: 50%;
  animation: ma-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── INPUT ── */
#mco-auth .ma-input {
  width: 100%;
  padding: 15px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  background: #F9FAFB;
  border: 2px solid #E5E7EB !important;
  border-radius: 12px;
  transition: all 0.2s;
  outline: none;
  margin-bottom: 16px;
  display: block;
}

#mco-auth .ma-input:focus {
  border-color: #B30909 !important;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(179,9,9,0.08);
}

/* ── BUTTONS ── */
#mco-auth .ma-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#mco-auth .ma-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 16px;
  border: none !important;
  border-radius: 11px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none;
}

#mco-auth .ma-btn:active { transform: scale(0.97); }

#mco-auth .ma-btn-verify {
  grid-column: span 2;
  background: #B30909 !important;
  color: #fff !important;
  padding: 16px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(179,9,9,0.25) !important;
}

#mco-auth .ma-btn-verify:hover { background: #8C0707 !important; }

#mco-auth .ma-btn-dark {
  background: #1F2937 !important;
  color: #fff !important;
}

#mco-auth .ma-btn-dark:hover { background: #111827 !important; }

#mco-auth .ma-btn-light {
  background: #F3F4F6 !important;
  color: #374151 !important;
  border: 1px solid #E5E7EB !important;
}

#mco-auth .ma-btn-light:hover { background: #E5E7EB !important; }

/* ── LOADING ── */
#mco-auth .ma-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  color: #6B7280;
  font-size: 14px;
}

#mco-auth .ma-spinner {
  width: 18px; height: 18px;
  border: 2px solid #E5E7EB;
  border-top-color: #B30909;
  border-radius: 50%;
  animation: ma-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ma-spin { to { transform: rotate(360deg); } }

/* ── RESULT ── */
#mco-auth .ma-result {
  margin-top: 20px;
  display: none;
}

#mco-auth .ma-result-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  animation: ma-fadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes ma-fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#mco-auth .ma-res-ok {
  background: linear-gradient(135deg, #059669, #047857);
  padding: 20px 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

#mco-auth .ma-res-fail {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  padding: 20px 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

#mco-auth .ma-res-title h4 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-res-title p {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin: 3px 0 0;
}

#mco-auth .ma-badge-ok {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 30px;
  padding: 7px 16px;
}

#mco-auth .ma-badge-ok .tick {
  width: 20px; height: 20px;
  background: #fff; color: #059669;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
}

#mco-auth .ma-badge-ok span { color: #fff; font-weight: 700; font-size: 13px; }

#mco-auth .ma-badge-fail {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 30px;
  padding: 7px 16px;
  color: #fff; font-weight: 700; font-size: 13px;
}

#mco-auth .ma-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

#mco-auth .ma-data-cell {
  padding: 14px 20px;
  border-right: 1px solid #F3F4F6;
  border-bottom: 1px solid #F3F4F6;
}

#mco-auth .ma-data-cell:nth-child(even) { border-right: none; }

#mco-auth .ma-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9CA3AF;
  font-weight: 600;
  margin-bottom: 5px;
}

#mco-auth .ma-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  word-break: break-all;
}

#mco-auth .ma-value.ok { color: #059669; }

#mco-auth .ma-warranty {
  background: #F0FDF4;
  border-top: 1px solid #D1FAE5;
  padding: 18px 20px;
  display: flex; gap: 14px; align-items: flex-start;
}

#mco-auth .ma-warranty-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }

#mco-auth .ma-warranty h5 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #065F46 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-warranty p {
  font-size: 12px; color: #047857; line-height: 1.6; margin: 0;
}

#mco-auth .ma-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}

#mco-auth .ma-pill {
  background: #D1FAE5;
  color: #065F46;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

#mco-auth .ma-notfound-body {
  padding: 28px 20px;
  text-align: center;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.7;
}

/* ── DOWNLOAD BTN ── */
#mco-auth .ma-download {
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  background: #fff !important;
  border: 2px solid #059669 !important;
  border-radius: 12px;
  color: #059669 !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

#mco-auth .ma-download:hover { background: #059669 !important; color: #fff !important; }

/* ── FOOTER ── */
#mco-auth .ma-footer {
  text-align: center;
  padding: 24px 0 0;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.8;
}

#mco-auth .ma-footer a { color: #B30909; text-decoration: none; }

/* ── MODAL OVERLAY ── */
#mco-scanModal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center; justify-content: center;
  padding: 16px;
}

#mco-scanModal .ma-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
  font-family: 'Inter', sans-serif;
}

#mco-scanModal .ma-modal-box h4 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1A1A2E !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
}

#mco-scanModal .ma-modal-box p {
  font-size: 13px; color: #6B7280;
  margin: 0 0 22px; line-height: 1.5;
}

#mco-scanModal .ma-modal-btns {
  display: flex; flex-direction: column; gap: 10px;
}

/* ── CAMERA OVERLAY ── */
#mco-cameraOverlay {
  display: none;
  position: fixed; inset: 0;
  background: #000;
  z-index: 99999;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 20px;
  font-family: 'Inter', sans-serif;
}

#mco-cameraOverlay .ma-cam-wrap {
  position: relative;
  width: 100%; max-width: 500px;
  display: flex; align-items: center; justify-content: center;
}

#mco-cameraOverlay video {
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
}

#mco-cameraOverlay .ma-cam-frame {
  position: absolute;
  width: 260px; height: 160px;
  border: 2px solid #E7C7A1;
  border-radius: 10px;
  pointer-events: none;
  overflow: hidden;
}

#mco-cameraOverlay .ma-cam-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: #B30909;
  animation: ma-scan 2s linear infinite;
}

@keyframes ma-scan {
  from { top: 0; }
  to   { top: 100%; }
}

#mco-cameraOverlay .ma-cam-hint {
  color: rgba(255,255,255,0.6); font-size: 13px;
}

#mco-cameraOverlay .ma-btn-stop {
  background: #B30909 !important;
  color: #fff !important;
  width: 180px; padding: 13px;
  border: none !important;
  border-radius: 11px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}

#mco-qrHidden { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  #mco-auth .ma-badge { display: none; }
  #mco-auth .ma-card-body { padding: 16px; }
  #mco-auth .ma-btn-grid { grid-template-columns: 1fr; }
  #mco-auth .ma-btn-verify { grid-column: unset; }
  #mco-auth .ma-data-grid { grid-template-columns: 1fr; }
  #mco-auth .ma-data-cell { border-right: none; }
  #mco-auth .ma-res-ok,
  #mco-auth .ma-res-fail { flex-direction: column; align-items: flex-start; }
  #mco-auth .ma-warranty { flex-direction: column; gap: 8px; }
}

/* ── NETWORK BANNER ── */
#mco-auth .ma-network-banner {
  background: #1C1C2E;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 16px 16px 0 0;
}

#mco-auth .ma-network-banner span:first-child { font-size: 16px; }

#mco-auth .ma-network-banner button {
  margin-left: auto;
  background: none !important;
  border: none !important;
  color: rgba(255,255,255,0.6) !important;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px !important;
  line-height: 1;
}

/* ── NETWORK ERROR RESULT CARD ── */
#mco-auth .ma-result-network .ma-badge-network {
  background: #1C1C2E;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

#mco-auth .ma-network-body {
  padding: 28px 24px;
  text-align: center;
}

#mco-auth .ma-network-icon {
  font-size: 40px;
  margin-bottom: 12px;
  animation: ma-pulse-net 2s ease-in-out infinite;
}

@keyframes ma-pulse-net {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.92); }
}

#mco-auth .ma-network-body h5 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: none !important;
}

#mco-auth .ma-network-body p {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.7;
  margin: 0 0 18px;
}

#mco-auth .ma-retry-btn {
  display: inline-flex !important;
  width: auto !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  margin: 0 auto;
}
