/* ===================== MAIN LAYOUT ===================== */
.match-page {
  min-height: 100dvh;
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: calc(var(--bottom-nav-height) + 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-left: 16px;
  padding-right: 16px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow blobs */
.match-page::before,
.match-page::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: 0;
}
.match-page::before {
  top: 15%;
  left: -120px;
  background: rgba(34,197,94,0.06);
}
.match-page::after {
  bottom: 15%;
  right: -120px;
  background: rgba(245,158,11,0.04);
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

/* ===================== CARD CONTAINER ===================== */
.swipe-wrapper {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

/* Telemetry chip above card */
.telemetry-chip {
  position: absolute;
  top: -14px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  box-shadow: var(--shadow-md);
}
.telemetry-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
.telemetry-text {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

/* ===================== SWIPE CARD ===================== */
.swipe-card {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  cursor: grab;
  user-select: none;
  will-change: transform;
  touch-action: pan-y;
  overflow: hidden;
}
.swipe-card:active { cursor: grabbing; }

/* Machine image */
.machine-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  width: 100%;
  overflow: hidden;
}
.machine-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.9);
  transition: transform 700ms ease;
  pointer-events: none;
}
.swipe-card:hover .machine-img { transform: scale(1.05); }

.img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.3) 40%, transparent 70%);
}

/* Card content overlay */
.card-overlay {
  position: absolute;
  bottom: 0; left: 0;
  padding: 28px;
  width: 100%;
}
.card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.card-tag {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
}
.card-tag-primary {
  background: rgba(34,197,94,0.9);
  color: #fff;
}
.card-tag-surface {
  background: rgba(255,255,255,0.1);
  color: var(--color-text-muted);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}

.machine-model {
  font-size: 1.8rem;
  color: var(--color-text);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  line-height: 1.1;
}

.machine-detail {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 6px;
}

/* Specs grid */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.spec-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-body);
}
.spec-value {
  font-family: var(--font-headline);
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 700;
}

/* ===================== 3-ACTION BUTTONS ===================== */
.match-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
}

.swipe-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 68px;
}
.swipe-action-btn .material-symbols-outlined {
  font-size: 1.5rem;
}
.swipe-action-label {
  font-size: 10px;
  letter-spacing: 0.05em;
}
.swipe-action-btn:active { transform: scale(0.95); }
.swipe-action-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reject */
.swipe-action-reject {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
  color: var(--color-error);
}
.swipe-action-reject:hover {
  background: rgba(239,68,68,0.15);
  border-color: var(--color-error);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.2);
}

/* Match (center — primary CTA) */
.swipe-action-match {
  background: linear-gradient(135deg, var(--color-primary), #16a34a);
  color: #fff;
  border-color: var(--color-primary);
  flex: 1.4;
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
  min-height: 76px;
}
.swipe-action-match .material-symbols-outlined { font-size: 1.8rem; }
.swipe-action-match:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(34,197,94,0.4);
}

/* Skip */
.swipe-action-skip {
  background: var(--color-surface);
  border-color: var(--color-outline);
  color: var(--color-text-muted);
}
.swipe-action-skip:hover {
  background: var(--color-surface-high);
  border-color: rgba(255,255,255,0.15);
  color: var(--color-text);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--color-text-muted);
}
.empty-state h3 { font-size: 1.5rem; margin-bottom: 12px; }
.empty-state p  { font-family: var(--font-body); font-weight: 400; }

/* ===================== SIDEBAR OFFSET FOR DESKTOP ===================== */
@media (min-width: 1024px) {
  .match-page { padding-left: 312px; }
}

@media (min-width: 768px) {
  .match-page {
    padding-bottom: 48px;
    padding-top: calc(var(--header-height) + 48px);
    justify-content: center;
  }
}
