/* ============================================================
   eCarPass — Verify Page Styles
   ============================================================ */

.verify-page {
  background: #000;
}

.verify-hero {
  background: #000;
  padding: 40px 0 80px;
  position: relative;
  overflow: hidden;
}

.verify-hero::before {
  display: none;
}

.verify-hero .page-header h1 {
  color: #fff;
}

.verify-hero .page-header p {
  color: rgba(255, 255, 255, .6);
}

.verify-hero .page-header .eyebrow {
  color: var(--gold);
}

/* ============================================================
   Scanner Card
   ============================================================ */

.verify-card-wrap {
  margin-top: -48px;
}

.scanner-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

.scanner-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.scanner-tab {
  flex: 1;
  padding: 16px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}

.scanner-tab:hover {
  color: var(--text-primary);
}

.scanner-tab.active {
  color: var(--gold-light);
  border-bottom-color: #000;
  background: var(--surface-2);
}

.scanner-panel {
  display: none;
  padding: 28px;
}

.scanner-panel.active {
  display: block;
}

/* ============================================================
   Camera Toolbar
   ============================================================ */

.camera-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.camera-select-wrap {
  flex: 1;
  max-width: 260px;
}

.camera-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.camera-select:focus {
  border-color: var(--gold);
}

.camera-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-tool:hover {
  background: var(--surface-3);
  border-color: var(--gold);
}

.btn-tool.active {
  background: var(--navy-800);
  color: #fff;
  border-color: var(--navy-800);
}

/* ============================================================
   Scanner Alerts
   ============================================================ */

.scanner-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: fadeIn 0.25s ease-out;
}

.scanner-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.scanner-alert-warning {
  background: #000000;
  border: 1px solid #a16207;
  color: #facc15;
}

.scanner-alert-warning .scanner-alert-icon {
  color: #d97706;
}

.scanner-alert-error {
  background: #000000;
  border: 1px solid #991b1b;
  color: #f87171;
}

.scanner-alert-error .scanner-alert-icon {
  color: #ef4444;
}

.scanner-alert-content {
  flex: 1;
}

.scanner-alert .alert-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.scanner-alert .alert-desc {
  font-size: 0.8125rem;
  opacity: 0.9;
}

.scanner-alert .alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--gold-light);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--gold-dark);
}

/* ============================================================
   QR Reader
   ============================================================ */

#qr-reader-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0d0d1a;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5);
}

#qr-reader {
  width: 100%;
}

#qr-reader video {
  border-radius: var(--radius-md);
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

#qr-reader * {
  border-color: #000 !important;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, .8);
  gap: 8px;
  text-align: center;
}

.camera-placeholder .placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.camera-placeholder .placeholder-icon svg {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.placeholder-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.placeholder-sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

.camera-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================================
   Scanner Actions & Divider
   ============================================================ */

.scanner-actions {
  margin-top: 16px;
}

.scanner-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scanner-divider::before,
.scanner-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.scanner-divider span {
  padding: 0 12px;
}

.upload-qr-btn {
  background: var(--surface-2);
  color: #ffffff;
  border: 1px solid var(--border);
}

.upload-qr-btn:hover {
  background: var(--surface-3);
  border-color: var(--gold);
}

/* ============================================================
   Manual Input
   ============================================================ */

.serial-input-group {
  display: flex;
  gap: 8px;
}

.serial-input-group .form-control {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   Result Card
   ============================================================ */

.result-container {
  margin-top: 32px;
  display: none;
}

.result-container.show {
  display: block;
}

.result-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: resultSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultSlide {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.result-header.valid {
  background: #0d2b1a;
}

.result-header.invalid {
  background: #2b0d0d;
}

.result-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-status-icon.valid {
  background: rgba(16, 185, 129, .2);
  color: #10b981;
}

.result-status-icon.invalid {
  background: rgba(239, 68, 68, .2);
  color: #ef4444;
}

.result-status-text .status-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  color: #fff;
}

.result-status-text .status-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.result-status-text .status-value.valid {
  color: #4ade80;
}

.result-status-text .status-value.invalid {
  color: #f87171;
}

.result-body {
  background: var(--surface);
  padding: 24px;
}

.result-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.result-logo-row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.result-logo-row .court-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.result-logo-row .serial-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.result-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.result-field-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-footer {
  background: var(--surface-2);
  padding: 12px 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Scanning Animation Overlay
   ============================================================ */

.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #000;
  animation: scanAnim 2s linear infinite;
}

@keyframes scanAnim {
  0% {
    top: 10%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 90%;
    opacity: 0;
  }
}

/* ============================================================
   Designation Badge
   ============================================================ */

.designation-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid;
}

/* ============================================================
   Invalid Card
   ============================================================ */

.invalid-message {
  text-align: center;
  padding: 32px;
}

.invalid-message .invalid-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
}

.invalid-message h3 {
  color: #991b1b;
  margin-bottom: 8px;
}

.invalid-message p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   How It Works
   ============================================================ */

.how-section {
  padding: 60px 0;
  background: #000;
}

.how-section .page-header h2 {
  color: #fff;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.how-card {
  text-align: center;
  padding: 32px 24px;
  background: #111;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: box-shadow var(--transition), transform var(--transition);
}

.how-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transform: translateY(-3px);
}

.how-card .step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.how-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #fff;
}

.how-card p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, .6);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
  .how-grid {
    grid-template-columns: 1fr;
  }

  .serial-input-group {
    flex-direction: column;
  }
}
