/* ── PennyHawk App UI Styles ─────────────────────────────────────────────── */
/* Extends theme.css tokens. Only styles for /feed and report modal.          */

/* ── App Shell ── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── App Nav ── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 1px;
  text-decoration: none;
}

.nav-brand span {
  color: var(--fg-muted);
  font-weight: 400;
}

.nav-spacer { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ── Feed Layout ── */
.feed-layout {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Sidebar Filters ── */
.sidebar {
  position: sticky;
  top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
}

.filter-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.filter-input:focus {
  border-color: var(--accent);
}

.filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8880' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.filter-btn {
  width: 100%;
  justify-content: center;
}

.sub-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.sub-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-status {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 4px;
  display: none;
}

.sub-status.visible { display: block; }

/* ── Feed Column ── */
.feed-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.feed-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.feed-count {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.feed-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 60px 24px;
  text-align: center;
  color: var(--fg-muted);
}

.feed-empty p { margin-top: 12px; font-size: 0.9rem; }

/* ── Item Card ── */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  transition: border-color 0.25s, transform 0.15s;
  cursor: default;
}

.item-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.item-card.verified-card {
  border-color: rgba(212, 160, 23, 0.35);
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-chain {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.badge-verified {
  background: rgba(212, 160, 23, 0.15);
  color: var(--accent-bright);
  border: 1px solid rgba(212, 160, 23, 0.3);
}

.badge-unverified {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.badge-category {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.item-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg);
}

.item-sku {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: monospace;
}

.item-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

.item-location {
  font-size: 0.82rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-location span { color: var(--fg); }

.item-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.item-time {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.reporter-tag {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.reporter-tag .reporter-name {
  color: var(--accent);
  font-weight: 500;
}

.verify-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.verify-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.verify-btn.voted {
  border-color: var(--accent);
  color: var(--accent-bright);
  cursor: default;
}

/* ── Price Display ── */
.item-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 80px;
}

.price-current {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1;
}

.price-original {
  font-size: 0.82rem;
  color: var(--fg-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #4caf7a;
  background: rgba(76, 175, 122, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ── Report Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s;
}

.modal-backdrop.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.modal-close:hover { color: var(--fg); background: var(--bg-elevated); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.form-required { color: var(--accent); }

.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus { border-color: var(--accent); }

.form-error {
  font-size: 0.78rem;
  color: #e07070;
  margin-top: 12px;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  font-size: 0.9rem;
  color: #4caf7a;
  text-align: center;
  padding: 16px;
  background: rgba(76, 175, 122, 0.1);
  border-radius: 10px;
  margin-top: 12px;
  display: none;
}

.form-success.visible { display: block; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* ── Loading State ── */
.feed-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  height: 140px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--fg);
  z-index: 9999;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 320px;
}

.toast.toast-success { border-color: rgba(76, 175, 122, 0.5); }
.toast.toast-error { border-color: rgba(224, 112, 112, 0.5); }

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .feed-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 20px;
  }

  .sidebar {
    position: static;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .item-card {
    grid-template-columns: 1fr;
  }

  .item-price-block {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}
