/* ── Website Scraper Custom Subpage Styles ── */

@import url("../link-auditor/link-auditor.css");

/* Select Dropdown Override */
.custom-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 12px 16px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.custom-select:focus {
  border-color: var(--border-hover);
  background: var(--surface-3);
}

/* Tabs & Panes */
.tab-pane {
  display: block;
  animation: fadeUp 0.35s var(--ease);
}

.tab-pane.hidden {
  display: none !important;
}

.tab-pane-intro {
  font-size: 0.86rem;
  color: var(--fg-55);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Color Swatches Grid */
.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: 100%;
}

.color-swatch-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

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

.swatch-preview {
  height: 100px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 245, 245, 0.05);
  position: relative;
  overflow: hidden;
}

.swatch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.swatch-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--fg-55);
}

.swatch-hex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swatch-hex {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}

.swatch-copy-btn {
  background: transparent;
  border: none;
  color: var(--fg-40);
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  font-size: 0.85rem;
}

.swatch-copy-btn:hover {
  color: var(--fg);
}

.color-empty-state,
.font-empty-state,
.image-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-40);
}

/* Typography List */
.font-previews-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.font-preview-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s;
}

.font-preview-card:hover {
  border-color: var(--border-hover);
}

.font-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.font-preview-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.font-preview-specimen {
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--fg-90);
  padding: 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Image Gallery */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.image-gallery-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.image-gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.image-gallery-thumb {
  height: 140px;
  width: 100%;
  background: rgba(24, 24, 24, 0.4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.image-gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.image-gallery-card:hover .image-gallery-thumb img {
  transform: scale(1.05);
}

.image-gallery-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.image-gallery-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* Code View Panel */
.sitemap-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.code-view-container {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  max-height: 320px;
  overflow-y: auto;
}

.code-view-container pre {
  margin: 0;
}

.code-view-container code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #fbbf24; /* soft amber code style */
}

/* Modal Popup Overlay */
.source-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.source-modal.hidden {
  display: none !important;
}

.source-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.source-modal-inner {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.3s var(--ease);
  z-index: 310;
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1.0);
  }
}

.source-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.modal-close-x {
  background: transparent;
  border: none;
  color: var(--fg-40);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s;
  padding: 4px;
}

.modal-close-x:hover {
  color: var(--fg);
}

.source-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: var(--surface-2);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.source-modal-body pre {
  margin: 0;
}

.source-modal-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--fg-70);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Premium Design System Mockups */
.design-system-comp-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s var(--ease), transform 0.22s var(--ease);
}

.design-system-comp-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.comp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.badge-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(245, 245, 245, 0.04);
  color: var(--fg-80);
}

.comp-classes {
  font-size: 0.68rem;
  color: var(--fg-40);
  font-family: "JetBrains Mono", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.comp-card-text {
  font-size: 0.76rem;
  color: var(--fg-70);
  line-height: 1.4;
  word-break: break-all;
}

/* Header wireframe mockup */
.header-mockup-bar {
  height: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.mockup-logo {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mockup-links {
  display: flex;
  gap: 6px;
}

.mockup-links span {
  width: 16px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

/* Footer wireframe mockup */
.footer-mockup-bar {
  height: 44px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
}

.mockup-footer-columns {
  display: flex;
  gap: 16px;
}

.mockup-footer-columns span {
  width: 15px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1px;
}

.mockup-footer-bottom {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1px;
}

/* Card wireframe mockup */
.card-mockup-box {
  height: 60px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-card-img {
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.mockup-card-title {
  width: 40%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.mockup-card-body {
  width: 80%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.scraped-btn-preview:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.25) !important;
  transform: scale(1.02);
}

/* Upgraded Advanced Dashboard Styling */

/* Pages Split Layout */
.pages-tab-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .pages-tab-layout {
    grid-template-columns: 1fr;
  }
}

/* SEO Sidebar Accents */
.seo-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
}

.seo-heading-tag {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--fg-80);
  width: 24px;
}

.seo-heading-gauge {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
}

.seo-heading-gauge-fill {
  height: 100%;
  background: #6366f1;
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}

.seo-heading-val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--fg-40);
  width: 16px;
  text-align: right;
}

.schema-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  font-family: "JetBrains Mono", monospace;
  transition: background 0.2s, border-color 0.2s;
  cursor: default;
}

.schema-badge:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Technology Badges */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--fg-80);
  transition: all 0.25s var(--ease);
}

.tech-badge i {
  font-size: 0.8rem;
}

.tech-badge.react {
  background: rgba(14, 165, 233, 0.05);
  border-color: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}

.tech-badge.next-js {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tech-badge.tailwindcss {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
  color: #22d3ee;
}

.tech-badge.framer {
  background: rgba(236, 72, 153, 0.05);
  border-color: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.tech-badge.shopify {
  background: rgba(132, 204, 22, 0.05);
  border-color: rgba(132, 204, 22, 0.2);
  color: #a3e635;
}

.tech-badge.webflow {
  background: rgba(67, 83, 255, 0.05);
  border-color: rgba(67, 83, 255, 0.2);
  color: #7b8aff;
}

.tech-badge.wordpress {
  background: rgba(33, 117, 155, 0.05);
  border-color: rgba(33, 117, 155, 0.2);
  color: #4db3e6;
}

/* Extrapolated Theme Tokens */
.radius-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.radius-token-row:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.radius-swatch-box {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.radius-value-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
  flex: 1;
}

.spacing-token-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.spacing-token-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
}

.spacing-token-val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--fg-80);
}

.spacing-visual-gauge {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.spacing-visual-fill {
  height: 100%;
  background: rgba(99, 102, 241, 0.35);
  border-radius: 4px;
}

/* Dynamic Box Shadows */
.shadow-specimen-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  cursor: pointer;
}

.shadow-specimen-box:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.shadow-label-block {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--fg-40);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 4px;
  word-break: break-all;
  max-height: 60px;
  overflow-y: auto;
}

/* Scheduler Tasks Grid */
.automation-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px 14px;
  transition: border-color 0.2s;
}

.automation-task-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.automation-task-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.automation-task-url {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.automation-task-meta {
  font-size: 0.68rem;
  color: var(--fg-40);
}

/* CSS Match Highlighting inside modal */
.modal-match-item {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 0.74rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 4px;
}

.modal-match-tag {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: #818cf8;
}

.modal-match-text {
  font-family: "JetBrains Mono", monospace;
  color: var(--fg-70);
  word-break: break-all;
}

/* Custom Spacing & Padding Improvements for Left Control Panel */
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 24px; /* Generous gap between Scraper Settings and Scraping Progress */
}

/* Ensure scraper setting inputs and button are beautifully spaced */
.control-panel .ws-card {
  padding: 32px !important; /* Premium inner breathing room */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-panel .ws-card .ws-card-header {
  margin-bottom: 8px; /* Balanced header margin */
}

.control-panel .control-group {
  margin-bottom: 0; /* Let flex gap handle spacing cleanly */
}

.control-panel label {
  margin-bottom: 8px; /* Clean spacing under labels */
}

#start-scrape-btn {
  margin-top: 4px; /* Subtle top spacing */
}

#status-card {
  padding: 32px !important; /* Match settings card inner padding */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#status-card .ws-card-header {
  margin-bottom: 0;
}

#status-card .progress-bar-wrap {
  margin-bottom: 0; /* Let card flex gap handle internal spaces */
}

.progress-status-row {
  margin-top: 4px;
  line-height: 1.4;
}


