/* WordPress-specific additions on top of the compiled design CSS (site.css). */

/* Cross-page transition: the new page grows out of a circle at the bottom, as on the Next.js site */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: page-out 260ms var(--ease-in-out-quart, cubic-bezier(0.76, 0, 0.24, 1)) both;
}
::view-transition-new(root) {
  animation: page-in 700ms var(--ease-in-out-quart, cubic-bezier(0.76, 0, 0.24, 1)) both;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* Keep the fixed header clear of the admin bar when logged in */
body.admin-bar header.absolute {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar header.absolute {
    top: 46px;
  }
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- Fluent Forms, styled as the original form */
.aj-ff .ff-el-group {
  margin-bottom: 2rem;
}
.aj-ff .ff-el-input--label label,
.aj-ff .ff-el-input--label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-cream) 75%, transparent);
}
.aj-ff .ff-el-is-required.asterisk-right label::after {
  color: var(--brand-lilac);
}
.aj-ff input.ff-el-form-control,
.aj-ff textarea.ff-el-form-control {
  margin-top: 0.5rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-cream) 20%, transparent);
  border-radius: 0;
  background: transparent;
  padding: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--brand-cream);
  box-shadow: none;
  outline: none;
  transition: border-color 0.3s;
  resize: none;
}
.aj-ff .ff-el-form-control::placeholder {
  color: color-mix(in srgb, var(--brand-cream) 55%, transparent);
}
.aj-ff .ff-el-form-control:focus {
  border-bottom-color: var(--brand-lilac);
}
.aj-ff .ff-t-container {
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) {
  .aj-ff .ff-t-container {
    grid-template-columns: 1fr 1fr;
  }
}
.aj-ff .ff-t-cell {
  width: auto !important;
  padding: 0 !important;
}

/* Project type: pill radios */
.aj-ff .ff-el-input--content .ff-el-form-check {
  display: inline-block;
  margin: 0.75rem 0.5rem 0 0;
}
.aj-ff .ff-el-form-check-label {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.aj-ff .ff-el-form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.aj-ff .ff-el-form-check-label span {
  display: inline-block;
  border: 1px solid color-mix(in srgb, var(--brand-cream) 20%, transparent);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--brand-cream) 70%, transparent);
  transition: all 0.3s;
}
.aj-ff .ff-el-form-check-label:hover span {
  border-color: color-mix(in srgb, var(--brand-cream) 40%, transparent);
}
.aj-ff .ff-el-form-check-input:checked + span {
  border-color: var(--brand-lilac);
  background: var(--brand-lilac);
  color: var(--brand-black);
}
.aj-ff .ff-el-form-check-input:focus-visible + span {
  outline: 2px solid var(--brand-lilac);
  outline-offset: 2px;
}

.aj-ff .ff-btn-submit,
.aj-ff button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-lilac) !important;
  color: var(--brand-black) !important;
  padding: 1rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}
.aj-ff .ff-btn-submit:hover {
  background: var(--brand-cream) !important;
}
.aj-ff .ff-message-success {
  border: 0;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--brand-lilac) 15%, transparent);
  color: var(--brand-cream);
  padding: 1.25rem;
  box-shadow: none;
}
.aj-ff .error,
.aj-ff .text-danger {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--brand-pink);
}

/* ---------------------------------------------------------------- posts written in WordPress */
.aj-prose > * + * {
  margin-top: 1.25rem;
}
.aj-prose h2 {
  margin-top: 3rem;
  font-family: var(--font-bricolage), sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--brand-black);
}
.aj-prose h3 {
  margin-top: 2rem;
  font-family: var(--font-bricolage), sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--brand-black);
}
.aj-prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.aj-prose a:hover {
  color: var(--brand-violet);
}
.aj-prose ul,
.aj-prose ol {
  padding-left: 1.25rem;
}
.aj-prose ul {
  list-style: disc;
}
.aj-prose ol {
  list-style: decimal;
}
.aj-prose li + li {
  margin-top: 0.5rem;
}
.aj-prose strong {
  font-weight: 600;
  color: var(--brand-black);
}
.aj-prose img {
  border-radius: 1.5rem;
}

/* Fluent's own radio spacing (checkbox indent) off, so the pills line up as before */
.aj-ff .ff-el-form-check,
.aj-ff .ff-el-form-check.ff-el-form-check- {
  padding-left: 0 !important;
  margin: 0.75rem 0.5rem 0 0 !important;
}
.aj-ff .ff-el-form-check-label {
  padding: 0 !important;
  margin: 0 !important;
}
.aj-ff .ff-el-group:has(.ff-el-form-check) .ff-el-input--content {
  display: flex;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- Elementor post body */
/* Blocks sit 3rem apart (space-y-12), widgets inside a block 1.25rem (space-y-5); no Elementor padding or colours. */
.aj-post .elementor > .e-con + .e-con,
.aj-post .elementor > .elementor-element + .elementor-element {
  margin-top: 3rem;
}
.aj-post .e-con {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  --gap: 1.25rem;
  --row-gap: 1.25rem;
  --column-gap: 1.25rem;
  --content-width: 100%;
  --container-max-width: 100%;
  --widgets-spacing: 1.25rem;
  --margin-top: 0;
  --margin-bottom: 0;
}
.aj-post .e-con > .e-con-inner {
  max-width: none;
  padding: 0;
}
.aj-post .elementor-widget:not(:last-child) {
  margin-block-end: 0;
}
.aj-post .elementor-heading-title {
  font: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}
.aj-post .elementor-widget-text-editor,
.aj-post .elementor-widget-heading {
  color: inherit;
  font-family: inherit;
}
.aj-post .elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}
.aj-post .elementor-widget-text-editor a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand-violet) 50%, transparent);
  text-underline-offset: 4px;
}
