/* Site-wide additions on top of the theme. */

/* Header path: "/home/amirivojdan/projects/shekar", each parent segment is a link (like cd ..). */
.pt-path {
  min-width: 0;
}

.pt-path p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Keep the menu button beside a long path; the path wraps at its slashes instead. */
.site-header .wp-block-group:has(> .pt-path) {
  flex-wrap: nowrap;
  gap: 16px;
}

.pt-path a,
.pt-path [aria-current] {
  color: var(--wp--preset--color--contrast, #000);
  text-decoration: none;
}

.pt-path a {
  border-radius: 4px;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.pt-path a:hover {
  color: var(--wp--preset--color--primary, #ffa500);
  text-decoration-color: currentColor;
}

.pt-path a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.pt-short {
  display: none;
}

/* On narrow screens, deep paths shorten the home directory to "~". */
@media (max-width: 600px) {
  .pt-deep .pt-short {
    display: inline;
  }

  .pt-deep .pt-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pt-path a {
    transition: none;
  }
}
