
/* Vital SEO — Crawl Map Generator local prototype */

.crawl-map-introduction {
  max-width: 760px;
  margin: 0 0 1.5rem;
  line-height: 1.7;
}

.crawl-map-form {
  margin-bottom: 2rem;
}

.crawl-map-form > label {
  display: block;
  margin-bottom: .65rem;
  font-weight: 600;
}

.crawl-map-input-row {
  display: flex;
  align-items: stretch;
  gap: .75rem;
}

.crawl-map-input-row input {
  flex: 1 1 350px;
  min-width: 0;
  padding: .85rem 1rem;
  border: 1px solid #b8c9d9;
  border-radius: 8px;
  font: inherit;
}

.crawl-map-input-row .button {
  flex-shrink: 0;
}

.crawl-map-form .tool-help {
  margin-top: .8rem;
  font-size: .9rem;
  opacity: .75;
}

.crawl-map-results {
  margin-top: 1.5rem;
}

.crawl-map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.crawl-map-summary > div {
  padding: 1rem;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: #f5f9fc;
  text-align: center;
}

.crawl-map-summary strong {
  display: block;
  color: #1266a6;
  font-size: 1.65rem;
  line-height: 1.3;
}

.crawl-map-summary span {
  display: block;
  margin-top: .25rem;
  font-size: .85rem;
  color: #526475;
}

.crawl-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.crawl-map-zoom-controls,
.crawl-map-export-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.crawl-map-toolbar button {
  padding: .55rem .85rem;
  border: 1px solid #c7d7e4;
  border-radius: 7px;
  background: #fff;
  color: #17527f;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.crawl-map-toolbar button:hover {
  background: #eaf4fb;
}

.crawl-map-visualisation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #d6e2ec;
  border-radius: 10px;
  background: #fff;
}

.crawl-map-canvas {
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  background: #fff;
}

.crawl-map-canvas {
  position: relative;
}

.crawl-map-progress[hidden] {
  display: none;
}

.crawl-map-progress {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #fff;
  text-align: center;
}

.crawl-map-progress-content {
  width: min(100%, 340px);
}

.crawl-map-progress-heading {
  margin: 0 0 1rem;
  color: #254b69;
  font-size: 1.1rem;
  font-weight: 700;
}

.crawl-map-progress-counter {
  margin: 0 0 1.25rem;
  color: #536c80;
  font-size: .95rem;
}

.crawl-map-progress-counter strong {
  display: block;
  margin-bottom: .25rem;
  color: #1266a6;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.crawl-map-progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eef5;
}

.crawl-map-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #2585c5;
  transition: width .2s ease;
}

.crawl-map-progress-note {
  margin: 1rem 0 0;
  color: #536c80;
  font-size: .85rem;
}

@media (prefers-reduced-motion: reduce) {
  .crawl-map-progress-fill {
    transition: none;
  }
}

#crawlMapSvg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  cursor: grab;
  touch-action: none;
}

#crawlMapSvg:active {
  cursor: grabbing;
}

#crawlMapLinks line {
  stroke: #a8c8e0;
  stroke-width: .8;
  opacity: .18;
}

#crawlMapNodes circle {
  stroke: #fff;
  stroke-width: 1.5;
  cursor: pointer;
}

#crawlMapNodes circle:hover {
  stroke: #f5b935;
  stroke-width: 2.5;
}

/* Directional links for the selected page. */
#crawlMapLinks line.crawl-map-link-incoming {
  stroke: #16a34a;
  stroke-width: 2;
  opacity: .95;
}

#crawlMapLinks line.crawl-map-link-outgoing {
  stroke: #ea580c;
  stroke-width: 2;
  opacity: .95;
}

.crawl-map-node-label {
  fill: #254b69;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  pointer-events: none;
  user-select: none;
}

.crawl-map-details {
  min-width: 0;
  padding: 1.25rem;
  border-left: 1px solid #dce6ee;
  background: #f7fafc;
  color: #253e52;
}

.crawl-map-details h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.crawl-map-details p,
.crawl-map-details dd {
  overflow-wrap: anywhere;
}

.crawl-map-details dt {
  margin-top: .9rem;
  font-size: .8rem;
  font-weight: 700;
  color: #536c80;
}

.crawl-map-details dd {
  margin: .25rem 0 0;
  font-size: .9rem;
}

#crawlMapStatus {
  margin-top: 1rem;
  font-size: .9rem;
  color: #526475;
}

@media (max-width: 800px) {
  .crawl-map-visualisation {
    grid-template-columns: minmax(0, 1fr);
  }

  .crawl-map-details {
    border-left: 0;
    border-top: 1px solid #dce6ee;
  }

  .crawl-map-canvas,
  #crawlMapSvg {
    min-height: 420px;
  }
}

@media (max-width: 600px) {
  .crawl-map-input-row {
    flex-direction: column;
  }

  .crawl-map-input-row .button {
    width: 100%;
  }

  .crawl-map-summary {
    gap: .5rem;
  }

  .crawl-map-summary > div {
    padding: .75rem .35rem;
  }

  .crawl-map-summary strong {
    font-size: 1.3rem;
  }

  .crawl-map-summary span {
    font-size: .75rem;
  }

  .crawl-map-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
    align-items: stretch;
  }

  .crawl-map-toolbar .crawl-map-page-search {
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
  }

  .crawl-map-toolbar .crawl-map-zoom-controls {
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
  }

  .crawl-map-toolbar .crawl-map-export-controls {
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .crawl-map-toolbar button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .55rem .3rem;
    white-space: nowrap;
  }

  .crawl-map-canvas,
  #crawlMapSvg {
    min-height: 350px;
  }
}

/* Page information: directional link legend. */
.crawl-map-direction-label {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.crawl-map-direction-line {
  display: inline-block;
  flex: 0 0 28px;
  height: 3px;
  border-radius: 2px;
}

.crawl-map-direction-incoming {
  background: #16a34a;
}

.crawl-map-direction-outgoing {
  background: #ea580c;
}

.crawl-map-detail-explanation {
  color: #536c80;
  font-size: .78rem !important;
  line-height: 1.5;
}

/* Other internal connections legend. */
.crawl-map-direction-other {
  background: #83c4ed;
}


/* Internal Link Visualiser — expandable SEO guidance */
.crawl-map-seo-tip[hidden] {
  display: none !important;
}

.crawl-map-seo-tip {
  margin-top: 16px;
  border: 1px solid #d8e4ef;
  border-radius: 12px;
  background: #f5f9fd;
  color: #243447;
  overflow: hidden;
}

.crawl-map-seo-tip summary {
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 650;
  list-style-position: inside;
}

.crawl-map-seo-tip summary:hover {
  background: rgba(35, 115, 185, 0.06);
}

.crawl-map-seo-tip summary:focus-visible {
  outline: 2px solid #2373b9;
  outline-offset: -3px;
}

.crawl-map-seo-tip-content {
  padding: 0 18px 16px;
  line-height: 1.65;
}

.crawl-map-seo-tip-content p {
  margin: 0 0 12px;
}

.crawl-map-seo-tip-content p:last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .crawl-map-seo-tip,
.dark-mode .crawl-map-seo-tip {
  background: #172638;
  border-color: #3b536b;
  color: #e8eef5;
}

[data-theme="dark"] .crawl-map-seo-tip summary:hover,
.dark-mode .crawl-map-seo-tip summary:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Internal Link Visualiser — mobile input and dark-mode corrections */

/* Prevent the desktop flex basis becoming input height on mobile. */
@media (max-width: 600px) {
  #tool-internal-link-visualiser .crawl-map-input-row input {
    flex: 0 0 auto;
    width: 100%;
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;
  }
}

/* Keep the visualisation consistent with the site's dark theme. */
html[data-theme="dark"] #tool-internal-link-visualiser
:is(.crawl-map-visualisation, .crawl-map-canvas, .crawl-map-progress) {
  background: #102238;
  border-color: #35516d;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-details {
  background: #192d43;
  border-color: #35516d;
  color: #e7eef7;
}

html[data-theme="dark"] #tool-internal-link-visualiser
:is(.crawl-map-details h3, .crawl-map-details p, .crawl-map-details dd) {
  color: #e7eef7;
}

html[data-theme="dark"] #tool-internal-link-visualiser
:is(.crawl-map-details dt, .crawl-map-detail-explanation) {
  color: #b5c6d9;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-summary > div {
  background: #192d43;
  border-color: #35516d;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-summary strong {
  color: #8cc8ff;
}

html[data-theme="dark"] #tool-internal-link-visualiser
:is(.crawl-map-summary span, #crawlMapStatus) {
  color: #b5c6d9;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-toolbar button {
  background: #192d43;
  border-color: #45617e;
  color: #e7eef7;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-toolbar button:hover {
  background: #25415e;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-input-row input {
  background: #102238;
  border-color: #45617e;
  color: #f1f6fc;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-input-row input::placeholder {
  color: #a0b2c7;
  opacity: 1;
}

html[data-theme="dark"] #tool-internal-link-visualiser
:is(.crawl-map-progress-heading, .crawl-map-progress-counter,
    .crawl-map-progress-note) {
  color: #d4e3f2;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-progress-track {
  background: #35516d;
}

html[data-theme="dark"] #tool-internal-link-visualiser #crawlMapLinks line {
  stroke: #78a9ce;
  opacity: .35;
}

html[data-theme="dark"] #tool-internal-link-visualiser
#crawlMapLinks line.crawl-map-link-incoming {
  stroke: #22c55e;
  opacity: .95;
}

html[data-theme="dark"] #tool-internal-link-visualiser
#crawlMapLinks line.crawl-map-link-outgoing {
  stroke: #fb923c;
  opacity: .95;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-node-label {
  fill: #e7eef7;
  stroke: #102238;
}

html[data-theme="dark"] #tool-internal-link-visualiser #crawlMapNodes circle {
  stroke: #102238;
}


/* Vital SEO — Internal Link Visualiser search and connection lists */

.crawl-map-page-search {
  margin: 0 0 1rem;
  max-width: 680px;
}

.crawl-map-page-search label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
}

.crawl-map-page-search input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: .8rem 1rem;
  border: 1px solid #b8c9d9;
  border-radius: 8px;
  background: #fff;
  color: #243b53;
  font: inherit;
}

.crawl-map-page-search input:focus-visible {
  outline: 2px solid #2585c5;
  outline-offset: 2px;
}

.crawl-map-page-search input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.crawl-map-connections {
  margin: 1.5rem 0;
}

.crawl-map-connections[hidden] {
  display: none;
}

.crawl-map-connections h3 {
  margin: 0 0 .5rem;
}

#crawlMapConnectionsUrl {
  overflow-wrap: anywhere;
  margin: 0 0 1rem;
  font-size: .9rem;
  opacity: .8;
}

.crawl-map-connection-groups {
  display: grid;
  gap: .85rem;
}

.crawl-map-connection-groups details {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #d6e2ec;
  border-radius: 8px;
  background: #f5f9fc;
}

.crawl-map-connection-groups summary {
  cursor: pointer;
  font-weight: 600;
}

.crawl-map-connection-groups details:nth-child(1) summary {
  color: #16803c;
}

.crawl-map-connection-groups details:nth-child(2) summary {
  color: #c2410c;
}

.crawl-map-connection-groups details:nth-child(3) summary {
  color: #175f9a;
}

.crawl-map-connection-groups ul {
  margin: .85rem 0 0;
  padding-left: 1.4rem;
  max-height: 320px;
  overflow: auto;
}

.crawl-map-connection-groups li {
  padding: .3rem 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.crawl-map-connection-groups details p {
  margin: .8rem 0 0;
  font-size: .9rem;
}

@media (max-width: 600px) {
  .crawl-map-page-search {
    max-width: 100%;
  }

  .crawl-map-connection-groups details {
    padding: .85rem;
  }
}

html[data-theme="dark"] .crawl-map-page-search input,
body.dark-mode .crawl-map-page-search input {
  background: #172b3b;
  color: #f0f6fb;
  border-color: #526b7e;
}

html[data-theme="dark"] .crawl-map-connection-groups details,
body.dark-mode .crawl-map-connection-groups details {
  background: #172b3b;
  border-color: #526b7e;
}

html[data-theme="dark"] .crawl-map-connection-groups details:nth-child(1) summary,
body.dark-mode .crawl-map-connection-groups details:nth-child(1) summary {
  color: #4ade80;
}

html[data-theme="dark"] .crawl-map-connection-groups details:nth-child(2) summary,
body.dark-mode .crawl-map-connection-groups details:nth-child(2) summary {
  color: #fb923c;
}

html[data-theme="dark"] .crawl-map-connection-groups details:nth-child(3) summary,
body.dark-mode .crawl-map-connection-groups details:nth-child(3) summary {
  color: #7dd3fc;
}


/* Vital SEO — Internal Link Visualiser inline toolbar search */

.crawl-map-toolbar {
  align-items: flex-end;
}

.crawl-map-toolbar .crawl-map-page-search {
  flex: 1 1 230px;
  min-width: 180px;
  max-width: 360px;
  margin: 0;
}

.crawl-map-toolbar .crawl-map-page-search label {
  margin-bottom: .3rem;
  font-size: .8rem;
}

.crawl-map-toolbar .crawl-map-page-search input {
  min-height: 36px;
  padding: .45rem .65rem;
  font-size: .85rem;
}

@media (min-width: 601px) and (max-width: 700px) {
  .crawl-map-toolbar .crawl-map-page-search {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }

  .crawl-map-toolbar .crawl-map-zoom-controls {
    order: 1;
  }

  .crawl-map-toolbar .crawl-map-export-controls {
    order: 2;
  }
}


/* Vital SEO — compact search toolbar */

.crawl-map-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crawl-map-toolbar .crawl-map-page-search input {
  min-height: 46px;
}

.crawl-map-toolbar .crawl-map-page-search {
  align-self: flex-end;
}


/* Vital SEO — crawl depth selector layout */
#tool-internal-link-visualiser .crawl-map-depth-preview {
  flex: 0 0 185px;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

#tool-internal-link-visualiser .crawl-map-depth-preview label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#tool-internal-link-visualiser #crawlMapDepth {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: .65rem .55rem;
  border: 1px solid #b8c9d9;
  border-radius: 8px;
  background: #fff;
  color: #253e52;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
}

#tool-internal-link-visualiser #crawlMapDepthNote {
  display: none;
  margin: .65rem 0 0;
  font-size: .88rem;
  line-height: 1.5;
}

#tool-internal-link-visualiser .crawl-map-form:has(
  #crawlMapDepth option[value="5"]:checked
) #crawlMapDepthNote {
  display: block;
}

html[data-theme="dark"] #tool-internal-link-visualiser #crawlMapDepth {
  background: #102238;
  border-color: #45617e;
  color: #f1f6fc;
}

@media (max-width: 600px) {
  #tool-internal-link-visualiser .crawl-map-depth-preview {
    flex: 0 0 auto;
    width: 100%;
  }

  #tool-internal-link-visualiser #crawlMapDepth {
    min-height: 48px;
  }
}

/* Vital SEO — Internal Link Visualiser PNG export dropdown */

#tool-internal-link-visualiser .crawl-map-export-dropdown {
  position: relative;
  min-width: 0;
}

#tool-internal-link-visualiser .crawl-map-export-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .85rem;
  border: 1px solid #c7d7e4;
  border-radius: 7px;
  background: #fff;
  color: #17527f;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

#tool-internal-link-visualiser .crawl-map-export-dropdown > summary::-webkit-details-marker {
  display: none;
}

#tool-internal-link-visualiser .crawl-map-export-dropdown > summary::marker {
  content: "";
}

#tool-internal-link-visualiser .crawl-map-export-dropdown > summary:hover {
  background: #eaf4fb;
}

#tool-internal-link-visualiser .crawl-map-export-dropdown > summary:focus-visible {
  outline: 2px solid #2585c5;
  outline-offset: 3px;
}

#tool-internal-link-visualiser .crawl-map-export-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  min-width: 190px;
  padding: .35rem;
  border: 1px solid #c7d7e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 35, 55, .14);
}

#tool-internal-link-visualiser .crawl-map-export-menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: .55rem .7rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}

#tool-internal-link-visualiser .crawl-map-export-menu button:hover {
  background: #eaf4fb;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-export-dropdown > summary,
html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-export-menu {
  background: #192d43;
  border-color: #45617e;
  color: #e7eef7;
}

html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-export-dropdown > summary:hover,
html[data-theme="dark"] #tool-internal-link-visualiser .crawl-map-export-menu button:hover {
  background: #25415e;
}

@media (max-width: 600px) {
  #tool-internal-link-visualiser .crawl-map-export-dropdown > summary {
    min-height: 44px;
    padding: .55rem .3rem;
  }

  #tool-internal-link-visualiser .crawl-map-export-menu {
    left: 0;
    right: auto;
  }
}
