@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
.pit-article-editor-shell {
  display: grid;
  gap: 1rem;
}

.pit-article-editor-shell lexxy-editor[name="article[rich_body]"] {
  display: block;
  width: 100%;
  min-height: 34rem;
  border: 1px solid #d7e0ea;
  border-radius: 0.625rem;
  background: #fff;
}

.pit-article-editor-shell .lexxy-editor__content {
  min-height: 28rem;
}

.pit-article-editor-shell .lexxy-editor__content pre {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.6;
  margin: 0.6em 0 1em;
  overflow-x: auto;
  padding: 0.75rem 0.85rem;
  tab-size: 2;
  white-space: pre;
}

.pit-article-editor-shell .lexxy-editor__content pre code {
  background: transparent;
  border: 0;
  color: inherit;
  display: inline;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.pit-article-editor-shell .lexxy-editor__content :not(pre) > code {
  background: #ecf3ff;
  border: 1px solid #c5d6f5;
  border-radius: 6px;
  color: #15325b;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
  padding: 0.08em 0.3em;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table {
  --pit-table-width: min(82%, 52rem);
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-size-small {
  --pit-table-width: min(46%, 28rem);
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-size-medium {
  --pit-table-width: min(68%, 42rem);
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-size-large {
  --pit-table-width: min(82%, 52rem);
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-size-full {
  --pit-table-width: 100%;
}

.pit-article-editor-shell .lexxy-editor__content .lexxy-content__table-wrapper.pit-lexxy-table,
.pit-article-editor-shell .lexxy-editor__content table.pit-lexxy-table {
  max-width: 100%;
  width: var(--pit-table-width);
  margin: 0.85em auto;
  border-radius: 10px;
}

.pit-article-editor-shell .lexxy-editor__content .lexxy-content__table-wrapper.pit-lexxy-table table {
  inline-size: 100%;
  margin: 0;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-align-left {
  float: left;
  margin: 0.35em 1.15em 1em 0;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-align-right {
  float: right;
  margin: 0.35em 0 1em 1.15em;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table.pit-lexxy-table-align-center {
  float: none;
  clear: both;
  margin-left: auto;
  margin-right: auto;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-table-selected {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.pit-article-editor-shell .lexxy-editor__content action-text-attachment.pit-lexxy-anchor-visible::before,
.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-anchor-visible::before {
  content: "Image anchor";
  display: inline-flex;
  align-items: center;
  margin-right: 0.4rem;
  margin-bottom: 0.12rem;
  padding: 0.08rem 0.4rem;
  border: 1px dashed #0f766e;
  border-radius: 999px;
  background: #ccfbf1;
  color: #115e59;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  vertical-align: middle;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-anchor-context-before,
.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-anchor-context-after {
  position: relative;
}

.pit-article-editor-shell .lexxy-editor__content .pit-lexxy-anchor-context-after::before {
  content: "New line starts here";
  display: inline-flex;
  align-items: center;
  margin-right: 0.4rem;
  margin-bottom: 0.12rem;
  padding: 0.08rem 0.4rem;
  border: 1px solid #16a34a;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  vertical-align: middle;
}

.pit-article-editor-shell .lexxy-editor__content p:empty {
  display: block;
  min-height: 1.2em;
}

.pit-article-editor-shell .lexxy-editor__content > p,
.pit-article-editor-shell .lexxy-editor__content > div {
  clear: none;
}

.pit-article-editor-shell .lexxy-editor__content::after {
  content: "";
  display: block;
  clear: both;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-size-small {
  width: auto !important;
  max-width: min(35%, 18rem) !important;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-size-medium {
  width: auto !important;
  max-width: min(55%, 30rem) !important;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-size-large {
  width: auto !important;
  max-width: min(75%, 40rem) !important;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-size-custom {
  width: auto !important;
  max-width: var(--pit-lexxy-custom-width, min(65%, 100%)) !important;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview {
  clear: none;
  margin-inline: 0;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-align-left {
  float: left !important;
  margin-top: calc(0.4em + var(--pit-lexxy-offset-y, 0px));
  margin-right: var(--pit-lexxy-wrap, 1.2em);
  margin-bottom: calc(1em - var(--pit-lexxy-offset-y, 0px));
  margin-left: var(--pit-lexxy-offset-x, 0px);
  text-align: left;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-align-center {
  clear: both;
  float: none;
  margin-left: auto;
  margin-right: auto;
  transform: translate(var(--pit-lexxy-offset-x, 0px), var(--pit-lexxy-offset-y, 0px));
  text-align: center;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-align-right {
  float: right !important;
  margin-top: calc(0.4em + var(--pit-lexxy-offset-y, 0px));
  margin-right: var(--pit-lexxy-offset-x, 0px);
  margin-bottom: calc(1em - var(--pit-lexxy-offset-y, 0px));
  margin-left: var(--pit-lexxy-wrap, 1.2em);
  text-align: right;
}

.pit-article-editor-shell .lexxy-editor__content .attachment--preview.pit-lexxy-align-full {
  clear: both;
  float: none;
  width: 100%;
  max-width: 100%;
  transform: translate(var(--pit-lexxy-offset-x, 0px), var(--pit-lexxy-offset-y, 0px));
  text-align: center;
}

.pit-lexxy-image-controls {
  border: 1px solid #d7e0ea;
  border-radius: 0.625rem;
  background: #f8fafc;
  padding: 0.65rem 0.8rem;
}

.pit-lexxy-image-controls > p {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #334155;
}

.pit-lexxy-image-controls__anchor {
  margin: -0.2rem 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #0f766e;
}

.pit-lexxy-image-controls__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.pit-lexxy-image-controls__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pit-lexxy-image-controls__custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
}

.pit-lexxy-image-controls__custom label {
  font-size: 0.72rem;
  color: #64748b;
}

.pit-lexxy-image-controls__custom input {
  width: 4.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.38rem 0.52rem;
}

.pit-lexxy-image-controls__group > span {
  font-size: 0.74rem;
  color: #64748b;
  margin-right: 0.15rem;
}

.pit-lexxy-image-controls__group button {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.42rem 0.68rem;
  cursor: pointer;
}

.pit-lexxy-image-controls__group button[aria-pressed="true"] {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #134e4a;
}

.pit-article-preview-window {
  border: 1px solid #d7e0ea;
  border-radius: 0.625rem;
  background: #fff;
  overflow: hidden;
}

.pit-article-preview-window__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 0.85rem;
  background: #f8fafc;
}

.pit-article-preview-window__heading {
  display: grid;
  gap: 0.25rem;
}

.pit-article-preview-window__header h3 {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #334155;
}

.pit-article-preview-window__header p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.pit-article-preview-window__viewport-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid #d1d9e2;
  border-radius: 999px;
  background: #fff;
}

.pit-article-preview-window__viewport-toggle button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.34rem 0.58rem;
}

.pit-article-preview-window__viewport-toggle button[aria-pressed="true"] {
  background: #dbeafe;
  color: #1e3a8a;
}

.pit-article-preview-window__frame-shell {
  padding: 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  overflow-x: auto;
}

.pit-article-preview-window iframe[data-pit-article-preview-frame] {
  display: block;
  width: 100%;
  min-height: 44rem;
  border: 0;
  background: #fff;
  margin: 0 auto;
}

.pit-article-preview-window[data-pit-preview-viewport="desktop"] iframe[data-pit-article-preview-frame] {
  width: min(936px, 100%);
  max-width: 936px;
}

.pit-article-preview-window[data-pit-preview-viewport="desktop"] .pit-article-preview-window__frame-shell {
  overflow-x: hidden;
}

.pit-article-preview-window[data-pit-preview-viewport="mobile"] iframe[data-pit-article-preview-frame] {
  width: min(390px, 100%);
  max-width: 100%;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.15);
}

.pit-article-preview-window[data-pit-preview-viewport="mobile"] .pit-article-preview-window__frame-shell {
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .pit-article-editor-shell lexxy-editor[name="article[rich_body]"] {
    min-height: 26rem;
  }

  .pit-article-editor-shell .lexxy-editor__content .lexxy-content__table-wrapper.pit-lexxy-table,
  .pit-article-editor-shell .lexxy-editor__content table.pit-lexxy-table {
    float: none !important;
    width: 100% !important;
    margin: 1em 0 !important;
  }

  .pit-article-preview-window iframe[data-pit-article-preview-frame] {
    min-height: 36rem;
  }
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_Rg-c1525531aa637674c91a4e6c5e31cd9ce6d45130b6326a4fa4c0e1367d6e41a4.ttf) format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_It-30f8dc2dcf65fb74d2a1ccd0a15e2395437d51de2247467f96b64a6f54108d3d.ttf) format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_Bd-60928fb6c19345f4c2d48ef5be5995d957e8aed547bb28f1ddb3e9e1fa4dfab7.ttf) format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_BdIt-880900d20f0ba1aa94b3fc1f1dbaace44983173c561cda04c60602bfc58a3691.ttf) format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_Md-52c1e0d79df4dc186b16e566cacd4ee94bcc64a8199be1636dee1c0c4f81caf5.ttf) format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_He-97dd01bf20ba04136c5b43b60927de8436289909b81b798e72ac71644481f0c7.ttf) format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Effra';
  src: font-url(/assets/Effra_Std_Lt-879bd6b509b576ed95e6c622a60bceb3dffca5ca0e2b85d5a293b728790e72b9.ttf) format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@import url(/assets/lexxy-variables-d2d2c4e99908a70930a2a0b407e4e33d41a101a1c8ca176d979b7abcd1c1cdd3.css);

/* Text styles
/* -------------------------------------------------------------------------- */

:where(.lexxy-content) {
  color: var(--lexxy-color-ink);

  h1, h2, h3, h4, h5, h6 {
    display: block;
    font-weight: bold;
    hyphens: auto;
    margin-block: 0 var(--lexxy-content-margin);
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1rem; }
  h5 { font-size: 0.875rem; }
  h6 { font-size: 0.75rem; }

  p,
  ul,
  ol,
  dl,
  blockquote,
  figure,
  .attachment {
    margin-block: 0 var(--lexxy-content-margin);

    &:not(lexxy-editor &) {
      overflow-wrap: break-word;
      text-wrap: pretty;
    }
  }

  .lexxy-content__italic {
    font-style: italic;
  }

  .lexxy-content__bold {
    font-weight: bold;
  }

  .lexxy-content__strikethrough {
    text-decoration: line-through;
  }

  .lexxy-content__underline {
    text-decoration: underline;
  }

  mark,
  .lexxy-content__highlight {
    background-color: transparent;
    color: inherit;
  }

  blockquote {
    border-inline-start: 0.25em solid var(--lexxy-color-ink-lighter);
    font-style: italic;
    margin: var(--lexxy-content-margin) 0;
    padding: 0.5lh 2ch;
  }

  p:empty {
    display: none;
  }

  a {
    color: var(--lexxy-color-link);
  }

  img,
  video,
  embed,
  object {
    inline-size: auto;
    margin-inline: auto;
    max-block-size: 32rem;
    object-fit: contain;

    a:has(&) {
      display: inline-block;
    }
  }

  code, pre {
    background-color: var(--lexxy-color-ink-lightest);
    border-radius: var(--lexxy-radius);
    color: var(--lexxy-color-ink);
    font-family: var(--lexxy-font-mono);
    font-size: 0.9em;
    padding: 0.25ch 0.5ch;

    &:is(pre),
    &[data-language] {
      border-radius: var(--lexxy-radius);
      display: block;
      hyphens: none;
      margin-block: 0 var(--lexxy-content-margin);
      overflow-x: auto;
      padding: 1ch;
      tab-size: 2;
      text-wrap: nowrap;
      white-space: pre;
      word-break: break-word;
    }
  }

  li.lexxy-nested-listitem {
    list-style-type: none;

    ol, ul {
      margin: 0;
    }
  }

  > :last-child {
    margin-block-end: 0;
  }

  /* Keywords and attributes */
  .code-token__attr,
  .token.atrule,
  .token.attr,
  .token.keyword {
    color: var(--lexxy-color-code-token-att);
  }

  /* Constants, booleans, numbers, properties, tags */
  .code-token__property,
  .token.boolean,
  .token.constant,
  .token.number,
  .token.property,
  .token.symbol,
  .token.tag {
    color: var(--lexxy-color-code-token-property);
  }

  /* Strings, selectors, and built-in constructs */
  .code-token__selector,
  .token.builtin,
  .token.char,
  .token.inserted,
  .token.line,
  .token.selector,
  .token.string {
    color: var(--lexxy-color-code-token-selector);
  }

  /* Comments and meta information */
  .code-token__comment,
  .token.cdata,
  .token.comment,
  .token.doctype,
  .token.prolog {
    color: var(--lexxy-color-code-token-comment);
    font-style: italic;
  }

  /* Operators and symbolic entities */
  .code-token__operator,
  .token.deleted,
  .token.entity,
  .token.operator,
  .token.url,
  code[data-language="diff"] .code-token__operator + .code-token__selector {
    color: var(--lexxy-color-code-token-operator);
  }

  /* Functions and class names */
  .code-token__function,
  .token.class,
  .token.class-name,
  .token.function {
    color: var(--lexxy-color-code-token-function);
  }

  /* Variables, regex, namespaces, important */
  .code-token__variable,
  .token.important,
  .token.namespace,
  .token.regex,
  .token.variable {
    color: var(--lexxy-color-code-token-variable);
  }

  /* Punctuation */
  .code-token__punctuation,
  .token.punctuation {
    color: var(--lexxy-color-code-token-punctuation);
  }

  /* Tables */
  :where(.lexxy-content__table-wrapper) {
    margin-block: 1ch;
    overflow-x: auto;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
    inline-size: calc(100% - 0.5ch);
    margin: 0.25ch;

    th,
    td {
      border: 1px solid var(--lexxy-color-ink-lighter);
      padding: 1ch;
      text-align: start;
      word-break: normal;
      
      *:last-child {
        margin-block-end: 0;
      }

      &.lexxy-content__table-cell--header {
        background-color: var(--lexxy-color-ink-lightest);
        font-weight: bold;
      }

      *:is(code, pre) {
        hyphens: auto;
        text-wrap: wrap;
        white-space: pre-wrap;
      }
    }
  }
}

:where([data-lexical-cursor]) {
  animation: blink 1s step-end infinite;
  block-size: 1lh;
  border-inline-start: 1px solid currentColor;
  line-height: inherit;
  margin-block: 1em;
}

/* Attachments
/* ------------------------------------------------------------------------ */

:where(.attachment) {
  block-size: auto;
  display: block;
  inline-size: fit-content;
  position: relative;
  margin-inline: auto;
  max-inline-size: 100%;
  text-align: center;

  :where(progress) {
    inline-size: 100%;
    margin: auto;
  }
}

:where(.attachment__caption) {
  color: var(--lexxy-color-text-subtle);
  font-size: var(--lexxy-text-small);

  textarea {
    background: var(--lexxy-color-canvas);
    border: none;
    color: inherit;
    font-family: inherit;
    inline-size: 100%;
    max-inline-size: 100%;
    resize: none;
    text-align: center;

    &:focus {
      outline: none;
    }

    @supports (field-sizing: content) {
      field-sizing: content;
      inline-size: auto;
      min-inline-size: 20ch;
    }
  }
}

:where(.attachment__icon) {
  aspect-ratio: 4/5;
  background-color: color-mix(var(--lexxy-attachment-icon-color), transparent 90%);
  block-size: 3lh;
  border: 2px solid var(--lexxy-attachment-icon-color);
  border-block-start-width: 1ch;
  border-radius: var(--lexxy-radius);
  box-sizing: border-box;
  color: var(--lexxy-attachment-icon-color);
  display: grid;
  font-size: var(--lexxy-text-small);
  font-weight: bold;
  inline-size: auto;
  place-content: center;
  text-transform: uppercase;
}

:where(.attachment--preview) {
  border-radius: var(--lexxy-radius);

  img, video {
    block-size: auto;
    display: block;
    margin-inline: auto;
    max-inline-size: 100%;
    user-select: none;
  }

  > a {
    display: block;
  }

  .attachment__caption {
    margin-block-start: 1ch;
  }
}

:where(.attachment--file) {
  --lexxy-attachment-icon-color: var(--lexxy-color-text-subtle);

  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1ch;
  inline-size: auto;

  .attachment__caption {
    display: grid;
    flex: 1;
    text-align: start;
  }

  .attachment__name {
    color: var(--lexxy-color-ink);
    font-weight: bold;
  }
}

:where(
  .attachment--psd,
  .attachment--key,
  .attachment--sketch,
  .attachment--ai,
  .attachment--eps,
  .attachment--indd,
  .attachment--svg,
  .attachment--ppt,
  .attachment--pptx
) {
  --lexxy-attachment-icon-color: var(--lexxy-color-red);
}

:where(
  .attachment--css,
  .attachment--php,
  .attachment--json,
  .attachment--htm,
  .attachment--html,
  .attachment--rb,
  .attachment--erb,
  .attachment--ts,
  .attachment--js
) {
  --lexxy-attachment-icon-color: var(--lexxy-color-purple);
}

:where(
  .attachment--txt,
  .attachment--pages,
  .attachment--rtf,
  .attachment--md,
  .attachment--doc,
  .attachment--docx
) {
  --lexxy-attachment-icon-color: var(--lexxy-color-blue);
}

:where(
  .attachment--csv,
  .attachment--numbers,
  .attachment--xls,
  .attachment--xlsx
) {
  --lexxy-attachment-icon-color: var(--lexxy-color-green);
}

/* Horizontal divider */
:where(.horizontal-divider) {
  margin: 0;
  margin-block-end: .5em;
  padding: 1.5em 0 .5em;

  hr {
    border: 0;
    border-block-end: 1px solid currentColor;
    inline-size: 20%;
    margin: 0;
  }
}

/* Custom attachments such as mentions, etc. */
:where(action-text-attachment[content-type^="application/vnd.actiontext"]) {
  --lexxy-attachment-bg-color: transparent;
  --lexxy-attachment-image-size: 1em;
  --lexxy-attachment-text-color: currentColor;

  align-items: center;
  background: var(--lexxy-attachment-bg-color);
  border-radius: var(--lexxy-radius);
  box-shadow: -0.25ch 0 0 var(--lexxy-attachment-bg-color), 0.5ch 0 0 var(--lexxy-attachment-bg-color);
  color: var(--lexxy-attachment-text-color);
  display: inline-flex;
  gap: 0.25ch;
  margin: 0;
  padding: 0;
  position: relative;
  white-space: normal;

  img {
    block-size: var(--lexxy-attachment-image-size);
    border-radius: 50%;
    inline-size: var(--lexxy-attachment-image-size);
  }

  &.node--selected {
    --lexxy-attachment-bg-color: var(--lexxy-color-accent-dark);
    --lexxy-attachment-text-color: var(--lexxy-color-ink-inverted);
  }
}
@import url(/assets/lexxy-variables-d2d2c4e99908a70930a2a0b407e4e33d41a101a1c8ca176d979b7abcd1c1cdd3.css);

:where(lexxy-editor) {
  --lexxy-editor-padding: 1ch;
  --lexxy-editor-rows: 8lh;
  @supports (min-block-size: attr(rows lh)) {
    --lexxy-editor-rows: attr(rows lh, 8lh);
  }

  --lexxy-toolbar-gap: 2px;

  border: 1px solid var(--lexxy-color-ink-lighter);
  border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
  background-color: var(--lexxy-color-canvas);
  display: block;
  overflow: visible;
  position: relative;
  transition: opacity 150ms;

  input,
  button,
  summary {
    &:focus-visible {
      outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
      outline-offset: var(--lexxy-focus-ring-offset);
    }
  }

  button,
  summary {
    -webkit-appearance: none;
    appearance: none;
    background: var(--lexxy-color-canvas);
    border: none;
    border-radius: var(--lexxy-radius);
    cursor: pointer;
    font-size: inherit;
    inline-size: auto;
    padding: 0;

    @media(any-hover: hover) {
      &:hover:not([aria-disabled="true"]) {
        background: var(--lexxy-color-ink-lightest);
      }
    }
  }

  .node--selected {
    &:has(img) img,
    &:not(:has(img)) {
      outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
      outline-offset: var(--lexxy-focus-ring-offset);
    }
  }

  table {
    .table-cell--selected {
      background-color: var(--lexxy-color-table-cell-selected-bg) !important;
    }

    .lexxy-content__table-cell--selected {
      background-color: var(--lexxy-color-table-cell-selected-bg) !important;
      border-color: var(--lexxy-color-table-cell-selected-border) !important;
    }
  
    &.lexxy-content__table--selection {
      ::selection {
        background: transparent;
      }
    }
  }

  action-text-attachment {
    cursor: pointer;
  }
}

/* Placeholder */
:where(.lexxy-editor--empty) {
  .lexxy-editor__content:not(:has(ul, ol))::before {
    content: attr(placeholder);
    color: currentColor;
    cursor: text;
    opacity: 0.66;
    pointer-events: none;
    position: absolute;
    white-space: pre-line;
  }
}

:where(.lexxy-editor__content) {
  min-block-size: var(--lexxy-editor-rows);
  outline: 0;
  padding: var(--lexxy-editor-padding);
}

:where(.lexxy-editor--drag-over) {
  background-color: var(--lexxy-color-selected);
  border-radius: var(--lexxy-radius);
  outline: 2px dashed var(--lexxy-color-selected-dark);
}

/* Toolbar
/* -------------------------------------------------------------------------- */

:where(lexxy-toolbar) {
  --lexxy-toolbar-icon-size: 1em;

  border-block-end: 1px solid var(--lexxy-color-ink-lighter);
  color: currentColor;
  display: flex;
  font-size: inherit;
  gap: var(--lexxy-toolbar-gap);
  max-inline-size: 100%;
  padding: 2px;
  position: relative;

  &[data-attachments="false"] button[name="upload"]{
    display: none;
  }
}

:where(.lexxy-editor__toolbar-button) {
  aspect-ratio: 1;
  block-size: 2lh;
  color: currentColor;
  display: grid;
  place-items: center;

  &:is(:active):not([aria-disabled="true"]),
  &[aria-pressed="true"] {
    background-color: var(--lexxy-color-selected);

    &:hover {
      background-color: var(--lexxy-color-selected-hover);
    }
  }

  &[aria-disabled="true"] {
    cursor: default;
    opacity: 0.3;
  }

  svg {
    -webkit-touch-callout: none;
    block-size: var(--lexxy-toolbar-icon-size);
    fill: currentColor;
    grid-area: 1/1;
    inline-size: var(--lexxy-toolbar-icon-size);
    user-select: none;
  }
}

:where(.lexxy-editor__toolbar-spacer) {
  flex: 1;
}

/* Make sure spacer is only displayed if there's another button before it */
* + :where(.lexxy-editor__toolbar-spacer) {
  min-inline-size: 1lh;
}

:where(.lexxy-editor__toolbar-overflow) {
  display: none;
  justify-self: flex-end;
  position: relative;
  z-index: 1;

  summary {
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }

    [open] & {
      background-color: var(--lexxy-color-ink-lightest);
    }
  }
}

:where(.lexxy-editor__toolbar-overflow-menu) {
  background-color: var(--lexxy-color-canvas);
  border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
  box-shadow: var(--lexxy-shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--lexxy-toolbar-gap);
  inset-inline-end: 0;
  padding: var(--lexxy-toolbar-gap);
  position: absolute;

  .lexxy-editor__toolbar-spacer {
    display: none;
  }

  * + .lexxy-editor__toolbar-spacer + button {
    margin-left: 0.5lh;
  }
}

/* Dropdowns
/* -------------------------------------------------------------------------- */

:where(.lexxy-editor__toolbar-dropdown) {
  position: relative;
  user-select: none;
  -webkit-user-select: none;

  :where(.lexxy-editor__toolbar-dropdown-content) {
    --dropdown-padding: 1ch;
    --dropdown-gap: calc(var(--dropdown-padding) / 2);

    background-color: var(--lexxy-color-canvas);
    border: 2px solid var(--lexxy-color-selected-hover);
    border-radius: var(--lexxy-radius);
    border-start-start-radius: 0;
    box-sizing: border-box;
    color: var(--lexxy-color-ink);
    display: flex;
    gap: var(--dropdown-gap);
    inset-block-start: 2lh;
    inset-inline-start: 0;
    max-inline-size: 40ch;
    margin: 0;
    padding: var(--dropdown-padding);
    position: absolute;
    z-index: 3;
  }

  &:is([open]) .lexxy-editor__toolbar-button {
    background-color: var(--lexxy-color-selected-hover);
    border-end-end-radius: 0;
    border-end-start-radius: 0;

    &:hover {
      background-color: var(--lexxy-color-selected-hover);
    }
  }
  
  [overflowing] & {
    position: static;

    .lexxy-editor__toolbar-dropdown-content {
      --dropdown-padding: 0.5ch;
      inset-inline-end: var(--dropdown-padding);
      inset-inline-start: var(--dropdown-padding);
    }
  }
}

/* Link dropdown
/* -------------------------------------------------------------------------- */

:where(lexxy-link-dropdown) {

  > * { flex: 1; }

  .lexxy-editor__toolbar-dropdown-actions {
    display: flex;
    font-size: var(--lexxy-text-small);
    flex: 1 1 0%;
    gap: 1ch;
    margin-block-start: 1ch;
  }

  input[type="url"],
  button {
    line-height: 1.5lh;
    padding-inline: 1ch;
  }

  input[type="url"] {
    background-color: var(--lexxy-color-canvas);
    border: 1px solid var(--lexxy-color-ink-lighter);
    border-radius: var(--lexxy-radius);
    color: var(--lexxy-color-text);
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 40ch;

    [overflowing] & {
      min-inline-size: 0;
    }
  }

  button {
    background-color: var(--lexxy-color-ink-lightest);
    color: var(--lexxy-color-text);
    inline-size: 100%;
    justify-content: center;
  }

  button[type="submit"] {
    background-color: var(--lexxy-color-accent-dark);
    color: var(--lexxy-color-ink-inverted);

    &:hover {
      background-color: var(--lexxy-color-accent-medium);
    }
  }
}

/* Color dropdown
/* -------------------------------------------------------------------------- */

:where(lexxy-highlight-dropdown) {
  display: flex;
  flex-direction: column;

  [data-button-group] {
    display: flex;
    justify-items: flex-start;
    flex-direction: row;
    gap: var(--dropdown-gap);

    button {
      aspect-ratio: 1 / 1;
      inline-size: var(--button-size);
      min-inline-size: var(--button-size);
      max-inline-size: var(--button-size);

      &:after {
        align-self: center;
        content: "Aa";
        display: inline-block;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        position: absolute;
        inset-block-start: 0;
        inset-block-end: 0;
        inset-inline-end: 0;
        inset-inline-start: 0;
      }
    }
  }

  button {
    --button-size: 2lh;

    color: var(--lexxy-color-text);
    flex: 1;
    min-block-size: var(--button-size);
    position: relative;

    &:hover {
      opacity: 0.8;
    }

    &[aria-pressed="true"] {
      box-shadow: 0 0 0 2px currentColor inset;

      &:after {
        content: "✓";
      }
    }
  }

  .lexxy-editor__toolbar-dropdown-reset[disabled] {
    display: none;
  }
  
  [overflowing] & {
    inline-size: fit-content;

    [data-button-group] {
      flex-wrap: wrap;

      button {
        --button-size: 1.6lh;

        &:after {
          font-size: 0.9em;
        }
      }
    }
  }
}

/* Table dropdown
/* -------------------------------------------------------------------------- */

:where(lexxy-table-dropdown) {
  display: flex;
  flex-direction: column;
  gap: 1ch;
  
  .lexxy-editor__table-create {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0;

    .lexxy-editor__table-buttons {
      background-color: var(--lexxy-color-ink-lighter);
      display: flex;
      flex-direction: column;
      gap: 1px;
      padding: 1px;

      div {
        display: flex;
        flex-direction: row;
        gap: 1px;
      }

      button {
        aspect-ratio: 1.5 / 1;
        border: 0;
        border-radius: 0;
        color: var(--lexxy-color-ink);
        font-family: var(--lexxy-font-base);
        font-size: var(--lexxy-text-small);
        font-weight: normal;
        inline-size: 4ch;
        margin: 0;

        &.active {
          background-color: var(--lexxy-color-ink-lightest);
        }
      }
    }

    label {
      align-items: center;
      display: flex;
      gap: 0.5ch;
      padding: 0.5ch 0;
      margin-block-start: 1ch;
    }

    &:has(input[type="checkbox"]:checked) {
      .lexxy-editor__table-buttons {
        div:first-child button,
        button:first-child {
          filter: brightness(0.95);
        }
      }
    }
  }
}

/* Table handle buttons
/* -------------------------------------------------------------------------- */

:where(.lexxy-table-handle-buttons) {
  --button-size: 2.5lh;

  color: var(--lexxy-color-ink-inverted);
  display: none;
  flex-direction: row;
  font-size: var(--lexxy-text-small);
  gap: 0.25ch;
  line-height: 1;
  position: absolute;
  transform: translate(-50%, -120%);
  z-index: 10;

  .lexxy-table-control {
    align-items: center;
    background-color: var(--lexxy-color-ink);
    border-radius: 0.75ch;
    display: flex;
    flex-direction: row;
    gap: 1ch;
    padding: 2px;
    white-space: nowrap;

    button {
      aspect-ratio: 1 / 1;
      align-items: center;
      background-color: transparent;
      border-radius: var(--lexxy-radius);
      border: 0;
      color: var(--lexxy-color-ink-inverted);
      cursor: pointer;
      display: flex;
      font-weight: bold;
      justify-content: center;
      line-height: 1;
      min-block-size: var(--button-size);
      min-inline-size: var(--button-size);
      padding: 0;

      &:hover {
        background-color: var(--lexxy-color-ink-medium);
      }

      svg {
        block-size: 1em;
        inline-size: 1em;
        fill: currentColor;
      }

      span {
        display: none;
      }
    }

    button,
    summary {
      &:focus,
      &:focus-visible {
        background-color: var(--lexxy-color-ink-medium);
        outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
        outline-offset: var(--lexxy-focus-ring-offset);
      }
    }
  }

  .lexxy-table-control__more-menu {
    gap: 0;
    padding: 2px;
    position: relative;
    
    summary {
      aspect-ratio: 1 / 1;
      align-items: center;
      background: transparent;
      border-radius: var(--lexxy-radius);
      border: 0;
      box-sizing: border-box;
      display: flex;
      font-size: inherit;
      justify-content: center;
      list-style: none;
      min-block-size: var(--button-size);
      min-inline-size: var(--button-size);
      padding: 0;
      user-select: none;
      -webkit-user-select: none;

      &::-webkit-details-marker {
        display: none;
      }

      &:hover {
        background: var(--lexxy-color-ink-medium);
      }
    }

    .lexxy-table-control__more-menu-details {
      display: flex;
      flex-direction: column;
      gap: 0.25ch;
      inset-block-start: 105%;
      inset-inline-start: 0;
      padding: 0;
      position: absolute;

      .lexxy-table-control__more-menu-section {
        background: var(--lexxy-color-ink);
        border-radius: 0.75ch;
        display: flex;
        flex-direction: column;
        padding: 2px;
      }

      button {
        aspect-ratio: unset;
        align-items: center;
        display: flex;
        flex-direction: row;
        font-weight: normal;
        gap: 1ch;
        justify-content: flex-start;
        padding: 0.5ch 2ch;
        padding-inline-start: 1ch;
        white-space: nowrap;

        span {
          display: inline-block;
        }

        svg {
          block-size: 1.3lh;
          inline-size: 1.3lh;
          fill: currentColor;
        }
      }
    }
  }
}


/* Language picker
/* -------------------------------------------------------------------------- */

:where(.lexxy-code-language-picker) {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--lexxy-color-canvas);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E");
  background-position: center right 1ch;
  background-repeat: no-repeat;
  background-size: 1ch;
  block-size: 1.5lh;
  border: 1px solid var(--lexxy-color-ink-lighter);
  border-radius: var(--lexxy-radius);
  color: var(--lexxy-color-ink);
  font-family: var(--lexxy-font-base);
  font-size: var(--lexxy-text-small);
  font-weight: normal;
  inset-inline-end: var(--lexxy-editor-padding);
  margin: 0.5ch 0.5ch 0 -0.5ch;
  padding: 0 2ch 0 1ch;
  text-align: start;

  @media (prefers-color-scheme: dark) {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23fff'/%3E%3C/svg%3E");
  }
}

/* Prompt
/* ------------------------------------------------------------------------ */

:where(.lexxy-prompt-menu) {
  --lexxy-prompt-avatar-size: 24px;
  --lexxy-prompt-min-width: 20ch;
  --lexxy-prompt-padding: 0.5ch;

  background-color: var(--lexxy-color-canvas);
  border-radius: calc(var(--lexxy-prompt-padding) * 2);
  box-shadow: var(--lexxy-shadow);
  color: var(--lexxy-color-ink);
  font-family: var(--lexxy-font-base);
  font-size: var(--lexxy-text-small);
  list-style: none;
  margin: 0;
  max-block-size: 200px;
  min-inline-size: var(--lexxy-prompt-min-width);
  overflow: auto;
  padding: var(--lexxy-prompt-padding);
  visibility: hidden;
  z-index: var(--lexxy-z-popup);
}

:where(.lexxy-prompt-menu--visible) {
  visibility: initial;
}

:where(.lexxy-prompt-menu__item) {
  align-items: center;
  border-radius: var(--lexxy-radius);
  cursor: pointer;
  display: flex;
  gap: var(--lexxy-prompt-padding);
  padding: var(--lexxy-prompt-padding);
  white-space: nowrap;

  &:hover {
    background-color: var(--lexxy-color-ink-lightest);
  }

  &[aria-selected] {
    background-color: var(--lexxy-color-selected);
  }

  img {
    block-size: var(--lexxy-prompt-avatar-size);
    border-radius: 50%;
    flex-shrink: 0;
    inline-size: var(--lexxy-prompt-avatar-size);
    margin: 0;
  }

  + & {
    margin-top: 2px;
  }
}

:where(.lexxy-prompt-menu__item--empty) {
  color: var(--lexxy-color-ink-medium);
  padding: var(--lexxy-prompt-padding);
}
:root {
  /* Colors */
  --lexxy-color-ink: oklch(20% 0 0);
  --lexxy-color-ink-medium: oklch(40% 0 0);
  --lexxy-color-ink-light: oklch(60% 0 0);
  --lexxy-color-ink-lighter: oklch(85% 0 0);
  --lexxy-color-ink-lightest: oklch(96% 0 0);
  --lexxy-color-ink-inverted: white;

  --lexxy-color-accent-dark: oklch(57% 0.19 260);
  --lexxy-color-accent-medium: oklch(75% 0.196 258);
  --lexxy-color-accent-light: oklch(88% 0.026 254);
  --lexxy-color-accent-lightest: oklch(92% 0.026 254);

  --lexxy-color-red: oklch(60% 0.15 27);
  --lexxy-color-green: oklch(60% 0.15 145);
  --lexxy-color-blue: oklch(66% 0.196 258);
  --lexxy-color-purple: oklch(60% 0.15 305);

  --lexxy-color-code-token-att: #d73a49;
  --lexxy-color-code-token-comment: #6a737d;
  --lexxy-color-code-token-function: #6f42c1;
  --lexxy-color-code-token-operator: #d73a49;
  --lexxy-color-code-token-property: #005cc5;
  --lexxy-color-code-token-punctuation: #24292e;
  --lexxy-color-code-token-selector: #22863a;
  --lexxy-color-code-token-variable: #e36209;

  --lexxy-color-canvas: var(--lexxy-color-ink-inverted);
  --lexxy-color-text: var(--lexxy-color-ink);
  --lexxy-color-text-subtle: var(--lexxy-color-ink-medium);
  --lexxy-color-link: var(--lexxy-color-accent-dark);
  --lexxy-color-selected: var(--lexxy-color-accent-lightest);
  --lexxy-color-selected-hover: var(--lexxy-color-accent-light);
  --lexxy-color-selected-dark: var(--lexxy-color-blue);
  --lexxy-color-code-bg: var(--lexxy-color-ink-lightest);

  /* Text color highlights */
  --highlight-1: rgb(136, 118, 38);
  --highlight-2: rgb(185, 94, 6);
  --highlight-3: rgb(207, 0, 0);
  --highlight-4: rgb(216, 28, 170);
  --highlight-5: rgb(144, 19, 254);
  --highlight-6: rgb(5, 98, 185);
  --highlight-7: rgb(17, 138, 15);
  --highlight-8: rgb(148, 82, 22);
  --highlight-9: rgb(102, 102, 102);

  --highlight-bg-1: rgba(229, 223, 6, 0.3);
  --highlight-bg-2: rgba(255, 185, 87, 0.3);
  --highlight-bg-3: rgba(255, 118, 118, 0.3); 
  --highlight-bg-4: rgba(248, 137, 216, 0.3);
  --highlight-bg-5: rgba(190, 165, 255, 0.3); 
  --highlight-bg-6: rgba(124, 192, 252, 0.3);
  --highlight-bg-7: rgba(140, 255, 129, 0.3); 
  --highlight-bg-8: rgba(221, 170, 123, 0.3);
  --highlight-bg-9: rgba(200, 200, 200, 0.3);

  /* Tables */
  --lexxy-color-table-header-bg: var(--lexxy-color-ink-lightest);
  --lexxy-color-table-cell-border: var(--lexxy-color-ink-lighter);
  --lexxy-color-table-cell-selected: var(--lexxy-color-selected);
  --lexxy-color-table-cell-selected-border: highlight;
  --lexxy-color-table-cell-selected-bg: highlight;

  /* Typography */
  --lexxy-font-base: system-ui, sans-serif;
  --lexxy-font-mono: ui-monospace, "Menlo", "Monaco", Consolas, monospace;
  --lexxy-text-small: 0.875rem;
  --lexxy-content-margin: 1rem;

  /* Focus ring */
  --lexxy-focus-ring-color: var(--lexxy-color-accent-dark);
  --lexxy-focus-ring-offset: 0;
  --lexxy-focus-ring-size: 2px;

  /* Misc */
  --lexxy-radius: 0.5ch;
  --lexxy-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --lexxy-z-popup: 1000;
}
@import url(/assets/lexxy-content-3f742bf17602ea6802b116094da7752974f21af75864bb451e8832e6570ca0b9.css);
@import url(/assets/lexxy-editor-f5c62a444cfe5a74c40630c089389781956e5040a939bc4520d6160cec5140b2.css);
.map-shell {
  position: relative;
  width: 100%;
  min-height: 520px;
  background: var(--pit-theme-bg);
  overflow: hidden;
  --map-floating-panels-top: 172px;
}

@media (min-width: 1101px) {
  .map-shell:not(.map-shell-embed) {
    height: 100dvh !important;
    min-height: 100dvh;
  }

  .map-left-panel,
  .map-right-panel {
    height: min(72dvh, calc(100% - var(--map-floating-panels-top) - 24px));
  }
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-canvas-inner {
  height: 100%;
  width: 100%;
}

.map-shell-embed {
  min-height: 0;
  padding-bottom: 0 !important;
}

.map-shell-embed .map-canvas {
  position: absolute;
  inset: 0;
  height: 100% !important;
}

.map-topbar {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 5;
  pointer-events: none;
}

.map-panel {
  background: var(--pit-theme-surface);
  border: 1px solid var(--pit-theme-line-soft);
  border-radius: 16px;
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-topbar-panel {
  padding: 14px 16px;
  pointer-events: auto;
}

.map-topbar-panel .map-panel-header {
  padding-bottom: 16px;
}

.map-topbar-panel .map-topbar-grid {
  padding-top: 12px;
}

.map-topbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) 150px auto auto;
  gap: 12px;
  align-items: start;
}

.map-field-address {
  grid-column: 1;
}

.map-field-radius {
  grid-column: 2;
}

.map-field-search {
  grid-column: 3;
  align-self: end;
}

.map-field-tender {
  grid-column: 4;
  margin-left: 96px;
}

.map-field-search .map-button {
  min-height: 40px;
  white-space: nowrap;
}

.map-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pit-theme-muted);
  font-weight: 800;
}

.map-input,
.map-select {
  margin-top: 6px;
  width: 100% !important;
  border: 1px solid var(--pit-theme-line) !important;
  border-radius: 10px;
  padding: 8px 10px !important;
  font-size: 14px !important;
  line-height: normal !important;
  color: var(--pit-theme-ink) !important;
  background: var(--pit-theme-surface) !important;
  box-shadow: var(--pit-theme-shadow-soft);
  min-height: 40px !important;
  box-sizing: border-box !important;
}

.map-location-controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-location-status.is-error {
  color: #b91c1c;
}

.map-button {
  border: none;
  border-radius: 10px;
  background: #047857;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}

.map-button:hover {
  background: #059669;
}

.map-overlay-button-copy {
  min-width: 0;
  display: block;
  justify-content: center;
}

.map-overlay-button-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pit-theme-ink);
  text-align: center;
}

.map-overlay-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-pill-group {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--pit-theme-line-soft) !important;
  background: var(--pit-theme-surface) !important;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-ink);
}

.map-select-all {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #047857;
  border: none;
  cursor: pointer;
  padding: 5px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  line-height: 1.4;
}

.map-select-all:hover,
.map-select-all:focus-visible {
  background: #059669;
}

.map-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--pit-theme-ink);
}

.map-location-trigger {
  border: 1px solid var(--pit-theme-line-soft) !important;
  border-radius: 8px;
  background: var(--pit-theme-surface) !important;
  color: var(--pit-theme-ink) !important;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
}

.map-location-trigger:hover {
  background: var(--pit-theme-surface-low);
}

.map-location-status {
  font-size: 12px;
  color: var(--pit-theme-muted);
  text-align: right;
}

.map-location-status.is-active {
  color: var(--pit-theme-primary);
}

.map-dot {
  height: 8px;
  width: 8px;
  border-radius: 999px;
}

.map-checkbox {
  height: 14px;
  width: 14px;
  accent-color: var(--pit-theme-primary);
}

html.dark .map-checkbox {
  background-color: var(--pit-theme-surface) !important;
  border-color: var(--pit-theme-line) !important;
}

.map-left-panel {
  position: absolute;
  left: 16px;
  top: var(--map-floating-panels-top);
  height: min(60vh, calc(100% - var(--map-floating-panels-top) - 16px));
  bottom: auto;
  width: 260px;
  z-index: 5;
  overflow: hidden;
  pointer-events: auto;
}

.map-right-panel {
  position: absolute;
  right: 16px;
  top: var(--map-floating-panels-top);
  height: min(60vh, calc(100% - var(--map-floating-panels-top) - 16px));
  bottom: auto;
  width: 300px;
  z-index: 5;
  overflow: hidden;
  pointer-events: auto;
}

.map-left-panel.is-collapsed,
.map-right-panel.is-collapsed {
  height: auto;
  top: auto;
  bottom: 8px;
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.map-overlay[hidden],
.map-mobile-panel-backdrop[hidden] {
  display: none !important;
}

.map-mobile-toolbar,
.map-mobile-panel-backdrop {
  display: none;
}

.map-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}

.map-overlay-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  background: var(--pit-theme-surface);
  border: 1px solid var(--pit-theme-line-soft);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--pit-theme-shadow-medium);
}

html.dark .map-overlay-panel {
  background: var(--pit-theme-surface);
  border-color: var(--pit-theme-line-soft);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-overlay-close {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--pit-theme-muted);
  cursor: pointer;
  margin-bottom: 14px;
}

.map-overlay-logo {
  height: 40px;
  max-width: 140px;
  object-fit: contain;
  margin-bottom: 14px;
}

.map-overlay-logo.is-hidden {
  display: none;
}

.map-overlay-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--pit-theme-ink);
  letter-spacing: -0.02em;
}

.map-overlay-address {
  margin-top: 6px;
  font-size: 14px;
  color: var(--pit-theme-muted);
}

.map-overlay-help {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pit-theme-muted);
}

.map-overlay-actions {
  margin-top: 12px;
  align-items: stretch;
  gap: 12px;
}

.map-overlay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid var(--pit-theme-line-soft);
  padding: 12px 10px;
  color: var(--pit-theme-ink);
  text-decoration: none;
  background: var(--pit-theme-surface);
  box-shadow: var(--pit-theme-shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  min-width: 0;
  min-height: 62px;
}

.map-overlay-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-overlay-button-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  display: block;
}

.map-overlay-button-copy {
  min-width: 0;
  display: block;
  justify-content: center;
}

.map-overlay-button-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  text-align: center;
}

html.dark .map-overlay-button-google {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.8);
}

html.dark .map-overlay-button-google:hover {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

html.dark .map-overlay-button-apple {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.8);
}

html.dark .map-overlay-button-apple:hover {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

.map-overlay-button-google {
  border-color: #d9e5ff;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.map-overlay-button-google:hover {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.map-overlay-button-apple {
  border-color: #dde3ea;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.map-overlay-button-apple:hover {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.map-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pit-theme-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--pit-theme-ink);
}

.map-panel-hide {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-muted);
  cursor: pointer;
}

.map-panel-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-panel-body {
  padding: 12px 14px;
  height: calc(100% - 56px);
  overflow-y: auto;
}

.map-panel.is-collapsed .map-panel-body,
.map-panel.is-collapsed .map-panel-subtitle,
.map-panel.is-collapsed .map-topbar-grid {
  display: none;
}

.map-panel.is-collapsed .map-panel-header {
  padding-bottom: 10px;
}

.map-checklist {
  display: grid;
  gap: 8px;
}

.map-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--pit-theme-ink);
}

.map-location-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--pit-theme-muted);
}

.map-location-list a {
  color: var(--pit-theme-ink);
  font-weight: 600;
  text-decoration: none;
}

.map-location-list a:hover {
  text-decoration: underline;
}

.map-location-meta {
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-location-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pit-theme-line-soft);
}

.map-location-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.map-location-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-location-index {
  height: 26px;
  width: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.map-location-distance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-location-view {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-primary);
  cursor: pointer;
  text-decoration: underline;
}

.map-location-name {
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pit-theme-ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.map-location-name:hover {
  text-decoration: underline;
  color: var(--pit-theme-primary);
}

.map-location-address {
  margin-top: 4px;
  font-size: 13px;
  color: var(--pit-theme-muted);
}

.map-location-count {
  color: var(--pit-theme-primary);
  font-weight: 700;
}

.map-overlay-button[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.admin-map-shell {
  height: 70vh;
}

.admin-map-panel-surface {
  display: grid;
  gap: 8px;
}

.admin-map-shell .map-topbar-panel {
  padding: 10px 12px;
}

.admin-map-shell .map-label {
  font-size: 10px;
}

.admin-map-shell .map-input,
.admin-map-shell .map-select {
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 13px;
}

.admin-map-shell .map-button {
  padding: 7px 12px;
  font-size: 13px;
}

.admin-map-shell .map-pill-group {
  margin-top: 4px;
  gap: 6px;
}

.admin-map-shell .map-pill {
  padding: 4px 8px;
  font-size: 11px;
}

.admin-map-shell .map-checkbox {
  height: 12px;
  width: 12px;
}

.admin-map-shell .map-dot {
  height: 6px;
  width: 6px;
}

.admin-map-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-map-panel-hide {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--pit-theme-muted);
  cursor: pointer;
}

.admin-map-panel.is-collapsed .map-panel-body,
.admin-map-panel.is-collapsed .map-panel-subtitle {
  display: none;
}

.admin-map-panel.is-collapsed .admin-map-filter-grid {
  display: none;
}

.admin-map-panel.is-collapsed .map-topbar-panel {
  padding: 8px 12px;
}

.admin-map-filter-grid {
  grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  row-gap: 8px;
}

.admin-map-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-map-clear {
  font-size: 12px;
  color: #0f172a;
  text-decoration: none;
}

.admin-map-clear:hover {
  text-decoration: underline;
}

.admin-map-address-status {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}


.admin-map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 220px;
  z-index: 5;
  pointer-events: auto;
}

.admin-map-summary {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 240px;
  z-index: 5;
  pointer-events: auto;
}

.admin-map-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}

.admin-map-legend-row:last-child {
  margin-bottom: 0;
}

.admin-map-summary-count {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.admin-map-summary-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.admin-map-toggles {
  position: absolute;
  right: 16px;
  top: 112px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.admin-map-toggle {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.admin-map-toggle[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.admin-map-overlay-meta {
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1100px) {
  .map-shell {
    display: flex;
    flex-direction: column;
    height: auto !important;
    padding-bottom: 12px;
  }

  .map-topbar {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    margin: 12px 16px 0;
    pointer-events: auto;
    order: 1;
  }

  .map-topbar-panel {
    padding: 12px;
  }

  .map-topbar-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .map-field-search .map-button {
    width: 100%;
  }

  .map-location-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-location-status {
    text-align: left;
  }

  .map-left-panel,
  .map-right-panel {
    position: static;
    width: auto;
    margin: 12px 16px 0;
    max-height: 40vh;
    height: auto;
  }

  .map-left-panel {
    order: 3;
  }

  .map-right-panel {
    order: 4;
  }

  .admin-map-legend,
  .admin-map-summary {
    position: static;
    width: auto;
    margin: 12px 16px 0;
  }

  .map-canvas {
    position: relative;
    height: 48vh;
    min-height: 280px;
    order: 2;
  }

  .map-shell-embed {
    height: 100vh !important;
    padding-bottom: 0 !important;
  }

  .map-shell-embed .map-canvas {
    position: absolute;
    inset: 0;
    height: 100% !important;
  }
}

@media (max-width: 640px) {
  .map-shell {
    height: 100dvh !important;
    min-height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }

  .map-left-panel,
  .map-right-panel {
    max-height: min(58dvh, 480px);
  }

  .map-mobile-toolbar {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    z-index: 14;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    pointer-events: auto;
  }

  .map-mobile-toolbar-button {
    min-height: 42px;
    border: 1px solid var(--pit-theme-line-soft);
    border-radius: 10px;
    background: var(--pit-theme-surface);
    color: var(--pit-theme-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
  }

  .map-mobile-panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 11;
    background: rgba(15, 23, 42, 0.4);
    pointer-events: auto;
  }

  .map-mobile-panel-backdrop:not([hidden]) {
    display: block;
  }

  .map-topbar,
  .map-left-panel,
  .admin-map-legend,
  .admin-map-summary {
    margin: 0;
  }

  .map-panel {
    border-radius: 12px;
    box-shadow: var(--pit-theme-shadow-medium);
  }

  .map-panel-header {
    padding: 10px 12px;
  }

  .map-panel-body {
    padding: 10px 12px;
    height: auto;
    overflow: auto;
  }

  .map-canvas {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    order: initial;
  }

  .map-topbar,
  .map-left-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(env(safe-area-inset-top, 0px) + 58px);
    width: auto;
    height: auto;
    max-height: calc(100dvh - 72px);
    display: none;
    z-index: 13;
  }

  .map-topbar.is-mobile-open,
  .map-left-panel.is-mobile-open {
    display: block;
  }

  .map-right-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    top: auto;
    width: auto;
    margin: 0;
    z-index: 9;
    max-height: min(58dvh, 480px);
  }

  .map-right-panel .map-panel-body {
    max-height: calc(min(58dvh, 480px) - 58px);
    overflow-y: auto;
  }

  .map-shell.mobile-panel-open .map-right-panel {
    z-index: 10;
  }

  .map-input,
  .map-select {
    min-height: 44px;
    font-size: 16px;
    box-sizing: border-box !important;
  }

  .map-button,
  .map-location-trigger,
  .map-overlay-button {
    min-height: 44px;
  }

  .map-location-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .map-location-view,
  .map-location-name {
    min-height: 40px;
  }

  .map-location-distance {
    gap: 8px;
  }

  .map-overlay {
    padding: 8px;
    display: flex;
    align-items: flex-end;
    z-index: 16;
  }

  .map-overlay-panel {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    padding: 16px;
    border-radius: 14px;
  }

  .map-overlay-actions {
    gap: 8px;
  }
}
/* ------------------------------------------------------------------ */
/*  DARK MODE — explicit overrides to match site theme                */
/* ------------------------------------------------------------------ */

html.dark .map-input,
html.dark .map-select {
  background: #121c20 !important;
  color: #ecf4f1 !important;
  border-color: rgba(101, 121, 116, 0.78) !important;
}

html.dark .map-input::placeholder,
html.dark .map-select::placeholder {
  color: #aec0bb !important;
}

html.dark .map-pill {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.58) !important;
}

html.dark .map-select-all {
  background: #0f766e;
  color: #f0fdfa;
}

html.dark .map-select-all:hover,
html.dark .map-select-all:focus-visible {
  background: #0d9488;
}

html.dark .map-location-trigger {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.78) !important;
  color: #ecf4f1 !important;
}

html.dark .map-location-trigger:hover {
  background: #1a262a !important;
}

html.dark .map-panel {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.58) !important;
}

html.dark .map-button {
  color: #ecf4f1 !important;
}

html.dark .map-button:hover {
  background: #0d9488 !important;
}

  .map-overlay-button {
    min-height: 58px;
    padding: 10px 8px;
    gap: 8px;
  }

  .map-overlay-button-logo {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .map-overlay-button-title {
    font-size: 12px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
