/*
 * Privacy Filter — namespaced styles for the NHCX inline tab.
 * All rules scoped under .pf-panel to avoid collisions with NHCX styles.
 */

/* ── Container ── */
.pf-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ── Disclaimer banner ── */
.pf-disclaimer {
  max-width: 100%;
  background: #FFF8E1;
  border: 1px solid #F5C76A;
  border-left: 6px solid #E0A82E;
  color: #6B4A06;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  margin-bottom: 24px;
}
.pf-disclaimer strong { color: #5A3D04; margin-right: 4px; }

/* ── API Access panel ── */
.pf-api-panel {
  background-color: #FDFCFC;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  border-top: 6px solid #14868C;
  padding: 32px 40px 40px;
}
.pf-api-panel.hidden { display: none !important; }

.pf-card-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dee2e6;
}
.pf-card-header h3 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #14868C;
  letter-spacing: -0.5px;
}
.pf-card-header .pf-sub {
  margin: 0;
  color: #6c757d;
  font-size: 1rem;
}
.pf-beta-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #fff;
  background: #14868C;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ── API docs body ── */
.pf-api-body h4 {
  margin: 1.5rem 0 0.5rem;
  color: #0e6a6f;
  font-size: 1.05rem;
  font-weight: 700;
}
.pf-api-body p { margin: 0.4rem 0 0.75rem; color: #495057; line-height: 1.55; }
.pf-api-body code {
  background: #f0fafb;
  color: #0e6a6f;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.pf-code-block {
  background: #0e1f21;
  color: #d6f5f7;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.5rem 0 1rem;
}
.pf-code-block code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.pf-callout {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 12px 14px;
  border-radius: 8px;
  color: #5c4400;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.pf-endpoint-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.pf-endpoint-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.55;
  color: #495057;
}
.pf-endpoint-list li:last-child { border-bottom: none; }
.pf-http-verb {
  display: inline-block;
  min-width: 48px;
  text-align: center;
  margin-right: 8px;
  font-weight: 700;
  padding: 2px 6px;
  font-size: 0.82rem;
}
.pf-http-verb.get { color: #14868c; border: 1px solid #14868c; background: transparent; }
.pf-http-verb.post { color: #b8430b; border: 1px solid #b8430b; background: transparent; }

/* Postman button */
.pf-btn-postman {
  color: #fff;
  background: linear-gradient(135deg, #FF6C37 0%, #e84c18 100%);
  box-shadow: 0 4px 14px rgba(255,108,55,0.35);
  display: inline-flex;
  align-items: center;
  margin: 0.25rem 0 1.5rem;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  border: none;
  cursor: pointer;
}
.pf-btn-postman:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255,108,55,0.45);
}

/* ── Demo token card ── */
.pf-demo-token-card {
  background: linear-gradient(135deg, #f0fafb 0%, #e6f7f8 100%);
  border: 1.5px solid rgba(20,134,140,0.25);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 1.25rem 0 0.5rem;
  box-shadow: 0 4px 24px rgba(20,134,140,0.08);
  transition: box-shadow 0.2s;
}
.pf-demo-token-card:hover { box-shadow: 0 6px 32px rgba(20,134,140,0.14); }

.pf-demo-token-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0e6a6f;
  margin-bottom: 18px;
}
.pf-demo-token-header i { font-size: 1.15rem; color: #14868C; }
.pf-demo-token-badge {
  background: linear-gradient(45deg, #14868C, #0e6a6f);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pf-demo-token-form { display: flex; flex-direction: column; gap: 14px; }
.pf-demo-token-fields { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 12px; 
}
.pf-demo-token-field { display: flex; flex-direction: column; gap: 5px; }
.pf-demo-token-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pf-demo-token-field input {
  padding: 10px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.pf-demo-token-field input:focus {
  border-color: #14868C;
  box-shadow: 0 0 0 3px rgba(20,134,140,0.12);
}
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease-in-out;
}
.pf-btn-primary {
  color: white;
  background: linear-gradient(45deg, #14868C, #0e6a6f);
  box-shadow: 0 4px 20px rgba(20,134,140,0.25);
}
.pf-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 25px rgba(20,134,140,0.35); }
.pf-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none !important; }

.pf-demo-token-result {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pf-fadeSlideIn 0.35s ease;
}
@keyframes pf-fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pf-demo-token-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0e6a6f;
}
.pf-demo-token-expiry {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 3px 10px;
  border-radius: 999px;
}
.pf-demo-token-output-wrap { display: flex; align-items: flex-start; gap: 10px; }
.pf-demo-token-output {
  flex: 1;
  background: #0e1f21;
  color: #7ee8ea;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  border: 1px solid rgba(20,134,140,0.3);
  max-height: 90px;
}
.pf-demo-token-copy {
  flex-shrink: 0;
  background: white;
  color: #14868C;
  border: 1.5px solid #14868C !important;
  padding: 8px 14px;
  font-size: 0.83rem;
  gap: 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.pf-demo-token-copy:hover { background: #f0fafb; transform: translateY(-1px); }
.pf-demo-token-copy.pf-copied { background: #e6fffa; color: #059669; border-color: #059669 !important; }

.pf-demo-token-applied {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 9px 14px;
}
.pf-demo-token-error {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff5f5;
  border-left: 4px solid #e63946;
  border-radius: 8px;
  color: #e63946;
  font-size: 0.88rem;
}

/* ── Main filter card ── */
.pf-card {
  background-color: #FDFCFC;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  border-top: 6px solid #14868C;
  padding: 32px 40px 40px;
  margin-top: 20px;
}

/* ── Dropzone ── */
.pf-dropzone {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: white;
}
.pf-dropzone:hover, .pf-dropzone.pf-drag {
  border-color: #14868C;
  background: #f0fafb;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(20,134,140,0.08);
}
.pf-dz-icon { color: #14868C; margin-bottom: 14px; display: flex; justify-content: center; }
.pf-dz-inner strong { display: block; font-size: 1.05rem; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.pf-dz-inner span { display: block; color: #64748b; margin-bottom: 12px; font-size: 0.95rem; }
.pf-dz-inner small { color: #64748b; font-size: 0.8rem; }

/* ── Status ── */
.pf-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f0fafb;
  border-left: 4px solid #14868C;
  font-size: 0.95rem;
  color: #0e6a6f;
}
.pf-status.pf-error { background: #fff5f5; border-left-color: #e63946; color: #e63946; }

/* ── Results ── */
.pf-results { margin-top: 24px; display: grid; gap: 24px; }
.pf-downloads { display: flex; gap: 12px; }
.pf-downloads a { flex: 1; text-align: center; }

.pf-btn-ghost {
  color: #14868C;
  background: transparent;
  border: 2px solid #14868C;
}
.pf-btn-ghost:hover { background: #f0fafb; }

.pf-counts h4, .pf-previews h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #14868C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pf-counts ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pf-counts li {
  background: #f0fafb;
  color: #0e6a6f;
  border: 1px solid rgba(20,134,140,0.15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}
.pf-counts li b { color: #14868C; font-weight: 700; margin-right: 6px; }

.pf-previews { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 18px; 
}
.pf-previews pre {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #495057;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .pf-api-panel { padding: 24px 18px 28px; }
  .pf-card { padding: 24px 18px 28px; }
  .pf-previews { grid-template-columns: 1fr; }
  .pf-demo-token-fields { grid-template-columns: 1fr; }
  .pf-demo-token-output-wrap { flex-direction: column; }
  .pf-demo-token-copy { align-self: flex-start; }
}

/* ── Meta chips (job id / filename / content-type) ── */
.pf-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #0e6a6f;
  background: white;
  border: 1px solid rgba(20,134,140,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 260px;
  text-overflow: ellipsis;
}
.pf-meta-chip i { color: #14868C; flex-shrink: 0; }
.pf-meta-chip span { overflow: hidden; text-overflow: ellipsis; }
.pf-meta-warn { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.pf-meta-warn i { color: #d97706; }

/* ── Entity summary cards ── */
.pf-summary-card {
  flex: 1;
  min-width: 130px;
  background: white;
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--pf-card-accent, #14868C);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 0.2s;
}
.pf-summary-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.pf-summary-card-count {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pf-card-accent, #14868C);
  line-height: 1;
}
.pf-summary-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Entity table ── */
#pfEntityTable tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.15s; }
#pfEntityTable tbody tr:hover { background: #f8fafc; }
#pfEntityTable tbody tr:last-child { border-bottom: none; }
#pfEntityTable td { padding: 9px 14px; vertical-align: middle; }

.pf-entity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-conf-bar-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
}
.pf-conf-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.pf-conf-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14868C, #0e6a6f);
  transition: width 0.4s ease;
}
.pf-conf-bar-fill.pf-conf-low  { background: #f59e0b; }
.pf-conf-bar-fill.pf-conf-mid  { background: #14868C; }
.pf-conf-bar-fill.pf-conf-high { background: #059669; }
.pf-conf-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  min-width: 34px;
  text-align: right;
}

.pf-pos-chip {
  font-size: 0.72rem;
  color: #64748b;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.pf-entity-word {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.88rem;
}

/* ── Full-width download buttons ── */
.pf-dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 18px 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s;
}
.pf-dl-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.pf-dl-btn:not(:disabled):hover {
  transform: translateY(-2px);
}
.pf-dl-btn i {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.pf-dl-btn-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.pf-dl-btn-sub {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.8;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Original — slate/neutral */
.pf-dl-btn-original {
  background: #f1f5f9;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pf-dl-btn-original:not(:disabled):hover {
  background: #e2e8f0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Redacted — primary teal */
.pf-dl-btn-redacted {
  background: linear-gradient(135deg, #14868C 0%, #0e6a6f 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(20,134,140,0.3);
}
.pf-dl-btn-redacted:not(:disabled):hover {
  box-shadow: 0 8px 24px rgba(20,134,140,0.45);
}

@media (max-width: 600px) {
  .pf-dl-btn { padding: 14px 10px; }
  .pf-dl-btn i { font-size: 1.2rem; }
}

