/* ============================================================
   Patent Atlas page-specific styles
   prefix: .pa-*
   ============================================================ */

/* ── input card ── */
.pa-card {
  background: rgba(15, 24, 40, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  margin: 28px auto;
  max-width: 780px;
  box-shadow: 0 30px 80px rgba(0, 8, 30, .5), 0 0 60px rgba(79, 142, 255, .05);
}
.pa-field { margin-bottom: 16px; }
.pa-field-label { font-size: 12px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }
.pa-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .pa-row2 { grid-template-columns: 1fr; } }

.pa-drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 16px;
  padding: 24px;
  background: rgba(10, 17, 29, .4);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 18px;
}
.pa-drop:hover, .pa-drop.over { border-color: var(--blue); background: rgba(79, 142, 255, .06); }
.pa-drop input { display: none; }
.pa-up-ico {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(79, 142, 255, .12);
  border: 1px solid rgba(79, 142, 255, .28);
  display: grid;
  place-items: center;
  color: var(--blue);
}
.pa-up-text .pa-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.pa-up-text .pa-title .pa-req { color: var(--hot); margin-left: 4px; }
.pa-up-text .pa-sub { font-size: 13px; color: var(--text-3); }
.pa-preview-pill {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .3);
  color: var(--ok);
  font-size: 12.5px;
  font-family: 'Geist Mono', monospace;
  display: none;
}

.pa-card textarea,
.pa-card select,
.pa-card input[type="text"] {
  width: 100%;
  background: rgba(10, 17, 29, .5);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font: 14px/1.5 inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.pa-card textarea { min-height: 80px; resize: vertical; }
.pa-card textarea:focus,
.pa-card select:focus,
.pa-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 142, 255, .12); }

.pa-go {
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  font: 500 15px/1 'Geist', sans-serif;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--blue-glow);
  transition: all .15s;
}
.pa-go:hover { background: var(--blue-2); transform: translateY(-1px); }
.pa-go:disabled { opacity: .55; cursor: wait; transform: none; }

.pa-disclaim { text-align: center; color: var(--text-4); font-size: 12.5px; margin-top: 14px; }

.pa-pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.pa-pill {
  background: rgba(15, 24, 40, .6);
  border: 1px solid var(--line);
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
}
.pa-pill .ck { color: var(--ok); margin-right: 5px; }

/* ── loader ── */
.pa-steps-loader {
  background: rgba(15, 24, 40, .55);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  margin: 28px auto;
  max-width: 780px;
}
.pa-steps-loader .pa-head {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.pa-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 9px 0;
  opacity: .35;
  transition: opacity .35s;
}
.pa-step.active { opacity: 1; }
.pa-step.done { opacity: .8; }
.pa-step .pa-ind {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  position: relative;
}
.pa-step.active .pa-ind { border-color: var(--blue); background: rgba(79, 142, 255, .12); }
.pa-step.active .pa-ind::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pa-ping 1.1s ease-out infinite;
  position: absolute;
}
.pa-step.done .pa-ind { background: var(--blue); border-color: var(--blue); }
.pa-step.done .pa-ind::after {
  content: "";
  width: 6px; height: 9px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg) translateY(-1px);
  position: absolute;
}
@keyframes pa-ping {
  0% { transform: scale(.5); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}
.pa-step .pa-name { font-size: 14px; color: var(--text); font-weight: 500; }
.pa-step .pa-sub { display: block; font-size: 12px; color: var(--text-4); margin-top: 2px; }

/* ── results ── */
.pa-results { margin-top: 36px; }

.pa-signature-card {
  background: rgba(15, 24, 40, .7);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 30px 80px rgba(0, 8, 30, .5);
}
.pa-signature-head {
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(79, 142, 255, .06), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pa-signature-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.pa-signature-head .pa-meta { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--text-3); }
.pa-signature-body { padding: 18px 26px; }
.pa-sig-section-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pa-sig-section-label + .pa-sig-tags { margin-bottom: 14px; }
.pa-sig-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-sig-tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(79, 142, 255, .08);
  border: 1px solid rgba(79, 142, 255, .25);
  color: var(--blue-2);
  font-size: 12.5px;
}
.pa-sig-cpc {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-2);
  padding: 4px 10px;
  background: rgba(15, 24, 40, .4);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-block;
}
.pa-sig-cpc strong { color: var(--blue-2); }
.pa-sig-cpc + .pa-sig-cpc { margin-left: 8px; }

/* risk banner */
.pa-risk-banner {
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--line);
}
.pa-risk-banner.high { background: rgba(255, 92, 122, .08); border-color: rgba(255, 92, 122, .35); }
.pa-risk-banner.med { background: rgba(255, 138, 92, .08); border-color: rgba(255, 138, 92, .35); }
.pa-risk-banner.low { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .3); }
.pa-risk-banner .icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.pa-risk-banner.high .icon { color: var(--hot); }
.pa-risk-banner.med .icon { color: var(--warn); }
.pa-risk-banner.low .icon { color: var(--ok); }
.pa-risk-banner .label {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.pa-risk-banner.high .label { color: var(--hot); }
.pa-risk-banner.med .label { color: var(--warn); }
.pa-risk-banner.low .label { color: var(--ok); }
.pa-risk-banner .desc { color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* patent grid */
.pa-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
  padding: 0 4px;
}
.pa-sec-h h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: .04em; }
.pa-sec-h .ct { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--text-3); }

.pa-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.pa-filter-chip {
  background: rgba(15, 24, 40, .5);
  border: 1px solid var(--line);
  color: var(--text-3);
  padding: 6px 14px;
  border-radius: 999px;
  font: 13px 'Geist', sans-serif;
  cursor: pointer;
  transition: all .15s;
}
.pa-filter-chip:hover { border-color: var(--line-2); color: var(--text-2); }
.pa-filter-chip.active { background: rgba(79, 142, 255, .12); border-color: var(--blue); color: var(--blue-2); }

.pa-patent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pa-patent {
  background: rgba(15, 24, 40, .65);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
  display: flex;
  flex-direction: column;
}
.pa-patent:hover { border-color: var(--blue); transform: translateY(-2px); background: rgba(20, 34, 53, .7); }
.pa-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1a2540 0%, #0f1828 100%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.pa-thumb svg { width: 60%; height: 60%; opacity: .85; }
.pa-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pa-score-pill {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.pa-score-pill.high { background: rgba(255, 92, 122, .18); color: #ff8a99; border: 1px solid rgba(255, 92, 122, .4); }
.pa-score-pill.med { background: rgba(255, 138, 92, .18); color: #ffb088; border: 1px solid rgba(255, 138, 92, .4); }
.pa-score-pill.low { background: rgba(52, 211, 153, .18); color: var(--ok); border: 1px solid rgba(52, 211, 153, .35); }
.pa-type-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.pa-type-badge.design { background: rgba(138, 108, 255, .18); color: #b8a8ff; border: 1px solid rgba(138, 108, 255, .4); }
.pa-type-badge.utility { background: rgba(79, 142, 255, .18); color: var(--blue-2); border: 1px solid rgba(79, 142, 255, .4); }

.pa-patent .pa-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.pa-code { font-family: 'Geist Mono', monospace; font-size: 13.5px; color: var(--blue-2); font-weight: 500; margin-bottom: 4px; }
.pa-patent-title { font-size: 14px; color: var(--text); font-weight: 500; line-height: 1.4; margin-bottom: 8px; }
.pa-patent .pa-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 11.5px;
  color: var(--text-3);
}
.pa-status {
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pa-status.active { background: rgba(52, 211, 153, .12); color: var(--ok); border: 1px solid rgba(52, 211, 153, .3); }
.pa-status.expired { background: rgba(122, 138, 168, .12); color: var(--text-3); border: 1px solid var(--line); }

.pa-results-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}

.hidden { display: none !important; }

/* reveal anim */
@keyframes pa-revealUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: pa-revealUp .5s cubic-bezier(.16, 1, .3, 1) backwards; }

/* error box */
.pa-err {
  background: rgba(255, 92, 122, .1);
  border: 1px solid rgba(255, 92, 122, .3);
  color: var(--hot);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin: 20px auto;
  max-width: 780px;
}
