/* ==========================================================================
   PoofShare Standalone Privacy Tools Stylesheet (public/css/tools.css)
   Interactive client-side tools above the fold & deep technical guides.
   Strictly zero em dashes enforced.
   ========================================================================== */

.tools-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Tool Hero Header */
.tool-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124, 92, 255, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.tool-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.tool-subtitle {
  font-size: 1.0625rem;
  color: #9ca3af;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Tool Interactive Card (Above the fold) */
.tool-card {
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  margin-bottom: 3.5rem;
  position: relative;
}

/* Dropzone */
.tool-dropzone {
  border: 2px dashed rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.03);
  border-radius: 0.875rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.tool-dropzone:hover,
.tool-dropzone.drag-active {
  border-color: #7c5cff;
  background: rgba(124, 92, 255, 0.08);
  transform: translateY(-1px);
}

.tool-dropzone-icon {
  width: 48px;
  height: 48px;
  color: #7c5cff;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-dropzone-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 0.4rem;
}

.tool-dropzone-hint {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.tool-dropzone-meta {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Controls Bar */
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-control-label {
  font-size: 0.875rem;
  color: #d1d5db;
  font-weight: 600;
}

.tool-select,
.tool-input {
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  color: #f3f4f6;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.tool-select:focus,
.tool-input:focus {
  border-color: #7c5cff;
}

.tool-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tool-slider {
  accent-color: #7c5cff;
  cursor: pointer;
}

/* Tool Actions & Buttons */
.tool-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.tool-actions .tool-btn {
  white-space: nowrap;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.tool-btn-primary {
  background: #7c5cff;
  color: #ffffff;
}

.tool-btn-primary:hover {
  background: #6d4aff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.tool-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tool-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tool-btn-share {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.tool-btn-share:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

/* Output Display Box */
.tool-output-box {
  margin-top: 1.5rem;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.tool-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tool-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tool-metric-item {
  display: flex;
  flex-direction: column;
}

.tool-metric-label {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tool-metric-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.tool-savings-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.tool-preview-card {
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.625rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-preview-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-preview-frame {
  width: 100%;
  height: 240px;
  background-image: linear-gradient(45deg, #181a24 25%, transparent 25%),
                    linear-gradient(-45deg, #181a24 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #181a24 75%),
                    linear-gradient(-45deg, transparent 75%, #181a24 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #10121a;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tool-preview-frame img,
.tool-preview-frame canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Canvas Redaction Studio Specifics */
.studio-canvas-wrap {
  width: 100%;
  overflow: auto;
  background-color: #10121a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  touch-action: none;
}

.studio-canvas-wrap canvas {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  cursor: crosshair;
  max-width: 100%;
  height: auto;
}

/* Metadata List */
.metadata-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.metadata-table th,
.metadata-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.metadata-table th {
  color: #9ca3af;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

.metadata-table td {
  color: #e5e7eb;
}

.tag-badge-danger {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-badge-success {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* SVG Sanitizer Code View */
.code-viewer {
  background: #08090d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  color: #a5b4fc;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Technical Article Below the Fold */
.tool-article {
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 3.5rem;
  color: #d1d5db;
  line-height: 1.7;
}

.tool-article h2 {
  font-size: 1.625rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.tool-article h2:first-child {
  margin-top: 0;
}

.tool-article h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.tool-article p {
  margin-bottom: 1.25rem;
}

.tool-article ul,
.tool-article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.tool-article li {
  margin-bottom: 0.5rem;
}

.tool-article strong {
  color: #ffffff;
}

.tool-article a {
  color: #7c5cff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tool-article a:hover {
  color: #9f86ff;
}

/* Specs Table */
.specs-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #0d0f17;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.specs-table th,
.specs-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.specs-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-weight: 700;
}

/* Callout Box */
.tool-callout {
  background: rgba(124, 92, 255, 0.08);
  border-left: 4px solid #7c5cff;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.tool-callout-title {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-callout p {
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: #d1d5db;
}

/* Privacy Guarantee Box */
.privacy-guarantee-card {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.privacy-icon {
  width: 36px;
  height: 36px;
  color: #34d399;
  flex-shrink: 0;
}

.privacy-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.privacy-content p {
  font-size: 0.9375rem;
  color: #d1d5db;
  line-height: 1.55;
  margin-bottom: 0;
}

/* FAQ Accordion Section */
.tool-faq-wrap {
  margin-top: 2rem;
}

.tool-faq-item {
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.tool-faq-item:hover {
  border-color: rgba(124, 92, 255, 0.4);
}

.tool-faq-summary {
  padding: 1.125rem 1.25rem;
  font-weight: 700;
  color: #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.tool-faq-summary::-webkit-details-marker {
  display: none;
}

.tool-faq-summary svg {
  color: #7c5cff;
  transition: transform 0.2s;
}

.tool-faq-item[open] .tool-faq-summary svg {
  transform: rotate(180deg);
}

.tool-faq-body {
  padding: 0 1.25rem 1.25rem;
  color: #9ca3af;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Tools Hub Directory Cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.tool-hub-card {
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.tool-hub-card:hover {
  transform: translateY(-3px);
  border-color: #7c5cff;
  box-shadow: 0 15px 30px -10px rgba(124, 92, 255, 0.25);
}

.tool-hub-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  margin-bottom: 1.25rem;
}

.tool-hub-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.tool-hub-desc {
  font-size: 0.9375rem;
  color: #9ca3af;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  font-size: 0.8125rem;
  color: #7c5cff;
  font-weight: 600;
}

@media (max-width: 640px) {
  .tools-container {
    padding: 1.25rem 1rem 3rem;
  }
  .tool-card {
    padding: 1.25rem;
  }
  .tool-article {
    padding: 1.5rem;
  }
  .tool-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-control-group {
    justify-content: space-between;
  }
  .tool-output-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .tool-metrics {
    justify-content: space-between;
  }
  .tool-actions {
    flex-direction: column;
    width: 100%;
  }
  .tool-actions .tool-btn {
    width: 100%;
    justify-content: center;
  }
}
