: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-selected-50: color-mix(in oklch, var(--lexxy-color-selected-dark) 50%, transparent);
  --lexxy-color-code-bg: var(--lexxy-color-ink-lightest);
  --lexxy-color-floating-controls-separator: rgba(128, 128, 128, 0.3);

  /* 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: var(--lexxy-color-selected-dark);
  --lexxy-color-table-cell-selected-bg: var(--lexxy-color-accent-lightest);
  --lexxy-color-table-cell-add: var(--lexxy-color-selected-50);
  --lexxy-color-table-cell-toggle: var(--lexxy-color-accent-lightest);
  --lexxy-color-table-cell-remove: oklch(60% 0.15 27 / 0.1);
  --lexxy-table-cell-add-size: 4px;

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

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

  /* Misc */
  --lexxy-toolbar-button-size: 2lh;
  --lexxy-radius: 0.5ch;
  --lexxy-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --lexxy-z-popup: 1000;
}
@import url(/assets/lexxy-variables-de40f8531a820e72074dc61037d0698168f05b17ecae56161c5db082c4117aab.css);

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

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

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

    @supports (text-wrap: balance) {
      text-wrap: balance;
    }
  }

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

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

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

      @supports (text-wrap: pretty) {
        text-wrap: pretty;
      }
    }
  }

  :where(.lexxy-content__italic) {
    font-style: italic;
  }

  :where(.lexxy-content__bold) {
    font-weight: bold;
  }

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

  :where(.lexxy-content__underline) {
    text-decoration: underline;
  }

  :where(.lexxy-content__strikethrough.lexxy-content__underline) {
    text-decoration: line-through underline;
  }

  mark,
  :where(.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;

    em,
    i,
    :where(.lexxy-content__italic) {
      font-style: normal;
    }

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

  p:empty {
    display: none;
  }

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

  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;
      overflow-wrap: break-word;
      padding: 1ch;
      tab-size: 2;
      white-space: pre;

      @supports (text-wrap: nowrap) {
        text-wrap: nowrap;
      }
    }
  }

  ol, ul:not(:where(.lexxy-prompt-menu)) {
    margin-inline-start: calc(var(--lexxy-content-margin) * 1.5);
    padding: 0;
  }

  ul {
    list-style-type: disc;
  }

  ol {
    list-style-type: decimal;
  }

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

    ol, ul {
      margin-block-end: 0;
    }
  }

  hr {
    border: 0;
    border-block-end: 1px solid currentColor;
    inline-size: 20%;
    margin: calc(0.5em + var(--lexxy-content-margin)) 0;
  }

  .horizontal-divider {
    margin: 0;
    padding: calc(0.5em + var(--lexxy-content-margin)) 0;

    hr {
      margin: 0;
    }
  }

  /* Kept at class specificity so it still outweighs the element margin rules above. */
  *:has(+ .horizontal-divider) {
    margin-block-end: 0;
  }

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

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

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

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

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

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

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

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

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

  /* Tables */
  :where(.lexxy-content__table-wrapper) {
    margin: 0;
    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);
      min-width: 5ch;
      max-width: 50ch;
      padding: 1ch;
      text-align: start;
      word-break: normal;

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

      &:where(.lexxy-content__table-cell--header) {
        background-color: var(--lexxy-color-table-header-bg);
        font-weight: bold;
      }

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

        @supports (text-wrap: wrap) {
          text-wrap: wrap;
        }
      }
    }
  }


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

  p:has(:where(.attachment)) {
    text-align: center;
  }

  :where(.attachment) {
    --lexxy-attachment-gap: 0.75ch;

    block-size: auto;
    box-sizing: border-box;
    border-radius: var(--lexxy-radius);
    display: block;
    inline-size: fit-content;
    margin-inline: auto;
    max-inline-size: 100%;
    min-inline-size: 10ch;
    padding: var(--lexxy-attachment-gap);
    position: relative;
    text-align: center;
  }

  /* Element weight, so a bare `figure { margin: 0 }` reset loaded before Lexxy doesn't uncenter attachments. */
  figure:where(.attachment) {
    margin-inline: auto;
  }

  :where(.attachment__caption) {
    color: var(--lexxy-color-text-subtle);
    display: block;
    font-size: var(--lexxy-text-small);
    padding: 1ch;
  }

  :where(.attachment__icon) {
    aspect-ratio: 4/5;
    background-color: color-mix(var(--lexxy-attachment-icon-color), transparent 90%);
    block-size: 3lh;
    border: 1px solid var(--lexxy-attachment-icon-color);
    border-block-start-width: 1.5ch;
    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;
    overflow: hidden;
    place-content: center;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* Kept at class specificity so it still outweighs the `a:has(img)` rule above. */
  .attachment--preview > a {
    display: block;
  }

  :where(.attachment--preview) {
    img, video {
      border-radius: var(--lexxy-radius);
      block-size: auto;
      display: block;
      margin-inline: auto;
      max-inline-size: 100%;
      -webkit-user-select: none;

      @supports (user-select: none) {
        user-select: none;
      }
    }

    :where(.attachment__caption) {
      padding-block-end: 0.5ch;
    }
  }

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

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

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

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

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

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

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

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

  :where(.attachment--error) {
    padding-block: 2ch;
  }


  /* Image galleries */
  /* ------------------------------------------------------------------------ */

  :where(.attachment-gallery) {
    display: block;
    text-align: center;

    :where(.attachment) {
      display: inline-flex;
      flex-direction: column;
      gap: 0;
      inline-size: calc(33.333% - 0.8ch);
      vertical-align: top;

      :where(.attachment__caption) {
        padding-block-end: 1ch;
      }
    }

    &:where(.attachment-gallery--2),
    &:where(.attachment-gallery--4) {
      :where(.attachment) {
        inline-size: calc(50% - 0.8ch);
      }
    }
  }


  /* Custom attachments such as mentions, etc. */
  /* ------------------------------------------------------------------------ */

  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);
    color: var(--lexxy-attachment-text-color);
    display: inline-flex;
    gap: 0.25ch;
    margin: 0;
    padding: 0;
    position: relative;
    white-space: normal;

    /* Gecko drops the whole selection when a drag crosses a contenteditable="false"
       island unless it is selectable as a single unit. Editor-only: the rendered
       view has no contenteditable and must keep normal text selection. */
    lexxy-editor & {
      -webkit-user-select: all;

      @supports (user-select: all) {
        user-select: all;
      }
    }

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


  /* Horizontal divider */
  /* ------------------------------------------------------------------------ */

  /* Kept at class specificity: the editor renders the divider as a figure, and this must outweigh the figure margin rule above. */
  .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;
    }
  }
}
@import url(/assets/lexxy-variables-de40f8531a820e72074dc61037d0698168f05b17ecae56161c5db082c4117aab.css);

:where(lexxy-editor) {
  --lexxy-editor-padding: 1ch;
  --lexxy-editor-rows: 8lh;
  /* eslint-disable-next-line css/no-invalid-properties */
  @supports (min-block-size: attr(rows lh)) {
    --lexxy-editor-rows: attr(rows lh, 8lh);
  }
  --lexxy-toolbar-gap: 2px;
  --lexxy-toolbar-spacing: 0.5ch;
  --lexxy-toolbar-padding: 2px;
  --lexxy-toolbar-border-size: 1px;
  --lexxy-toolbar-height: calc(var(--lexxy-toolbar-button-size) + 2 * var(--lexxy-toolbar-padding) + var(--lexxy-toolbar-border-size));

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

  p.provisional-paragraph {
    display: block;

    &.hidden {
      block-size: 0.5ch;
      margin: 0;
    }
  }

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

  summary {
    list-style: none;

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

  button,
  summary {
    -webkit-appearance: none;
    appearance: none;
    background: var(--lexxy-color-canvas);
    border: none;
    border-radius: var(--lexxy-radius);
    cursor: pointer;
    line-height: normal;
    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 {
    outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
    outline-offset: var(--lexxy-focus-ring-offset);
  }

  &[data-links-openable] a {
    cursor: pointer;
  }

  /* Tables */
  /* ------------------------------------------------------------------------ */

  table {
    th, td {
      position: relative;
      transition: all 0.1s ease-in-out;

      /* Used for column and row adding visualizations */
      &:after {
        box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent inset;
        content: "";
        display: block;
        inset-block-start: -1px;
        inset-block-end: -1px;
        inset-inline-start: -1px;
        inset-inline-end: -1px;
        pointer-events: none;
        position: absolute;
        transition: box-shadow 0.1s ease-in-out;
        z-index: 2;
      }

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

      &.lexxy-content__table-cell--focus {
        &:after {
          box-shadow: 0 0 0 0 transparent, 0 0 0 2px var(--lexxy-color-table-cell-selected-border) inset;
        }
      }

      &.lexxy-content__table-cell--highlight {
        &[data-action="insert"] {
          &[data-child-type="row"] {
            &[data-direction="after"] {
              &:after {
                box-shadow:
                  0 var(--lexxy-table-cell-add-size) 0 0 var(--lexxy-color-table-cell-add),
                  0 calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 var(--lexxy-color-table-cell-add) inset;
              }
            }
            &[data-direction="before"] {
              &:after {
                box-shadow:
                  0 calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 var(--lexxy-color-table-cell-add),
                  0 var(--lexxy-table-cell-add-size) 0 0 var(--lexxy-color-table-cell-add) inset;
              }
            }
          }
          &[data-child-type="column"] {
            &[data-direction="after"] {
              &:after {
                box-shadow:
                  var(--lexxy-table-cell-add-size) 0 0 0 var(--lexxy-color-table-cell-add),
                  calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 0 var(--lexxy-color-table-cell-add) inset;
              }
            }
            &[data-direction="before"] {
              &:after {
                box-shadow:
                  calc(-1 * var(--lexxy-table-cell-add-size) - 1px) 0 0 0 var(--lexxy-color-table-cell-add),
                  var(--lexxy-table-cell-add-size) 0 0 0 var(--lexxy-color-table-cell-add) inset;
              }
            }
          }
        }
        &[data-action="delete"] {
          background-color: var(--lexxy-color-table-cell-remove);
          color: var(--lexxy-color-red);

          &:after { box-shadow: 0 0 0 0 transparent; }
        }
        &[data-action="toggle"] {
          background-color: var(--lexxy-color-table-cell-toggle);

          &:after { box-shadow: 0 0 0 0 transparent; }
        }
      }
    }

    tr.lexxy-content__table-cell--highlight[data-action="delete"] {
      th, td {
        background-color: var(--lexxy-color-table-cell-remove);
        color: var(--lexxy-color-red);

        &:after { box-shadow: 0 0 0 0 transparent; }
      }
    }

    &.lexxy-content__table--selection {
      /* eslint-disable-next-line css/use-baseline */
      ::selection {
        background: transparent;
      }
    }
  }

  &:has(.lexxy-content__table-cell--selected) {
    lexxy-table-tools {
      visibility: hidden;
    }
  }

  [data-lexical-linebreak] {
    block-size: 0;
    display: contents;
    inline-size: 0;
  }

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

  action-text-attachment {
    cursor: pointer;
  }

  .attachment {
    background-color: var(--lexxy-color-canvas);

    progress {
      max-inline-size: 10ch;
      margin: auto;
    }

    &.attachment--preview {
      progress {
        inset-block-start: 2ch;
        inset-inline-start: 0;
        inset-inline-end: 0;
        position: absolute;
      }
    }

    &.attachment--error {
      background: color-mix(var(--lexxy-color-red) 10%, transparent);
      padding: 2ch;

      &:before {
        align-items: center;
        aspect-ratio: 1;
        background: var(--lexxy-color-red);
        block-size: 1.5lh;
        border-radius: 50%;
        color: white;
        content: "!";
        display: flex;
        justify-content: center;
        margin: auto;
      }

      > div {
        flex: 1;
        font-size: 0.85em;
        padding: 1ch;
        text-align: start;
      }
    }
  }

  .attachment[draggable] {
    cursor: grab;
  }

  .attachment.lexxy-dragging {
    opacity: 0.4;
  }

  [data-lexxy-decorator][draggable] {
    cursor: grab;
  }

  [data-lexxy-decorator].lexxy-dragging {
    opacity: 0.4;
  }

  .lexxy-drop-caret {
    background-color: var(--lexxy-focus-ring-color);
    border-radius: 1px;
    inline-size: 2px;
    pointer-events: none;
    position: fixed;
  }

  [class*="lexxy-drop-target--"] {
    position: relative;
  }

  /* Horizontal line indicator for block and list drops */
  .lexxy-drop-target--block-before::before,
  .lexxy-drop-target--block-after::after,
  .lexxy-drop-target--list-before::before,
  .lexxy-drop-target--list-after::after {
    background-color: var(--lexxy-focus-ring-color);
    block-size: 3px;
    border-radius: 1px;
    content: "";
    inset-inline: 0;
    pointer-events: none;
    position: absolute;
    transform: translate(0, 0.5ch);
  }

  .lexxy-drop-target--block-before::before,
  .lexxy-drop-target--list-before::before {
    transform: translate(0, -0.5ch);
  }

  .lexxy-drop-target--block-before::before,
  .lexxy-drop-target--list-before::before {
    inset-block-start: -2px;
  }

  .lexxy-drop-target--block-after::after,
  .lexxy-drop-target--list-after::after {
    inset-block-end: -2px;
  }

  /* Vertical line indicator for gallery merge and reorder */
  .lexxy-drop-target--gallery-before::before,
  .lexxy-drop-target--gallery-after::after {
    background-color: var(--lexxy-focus-ring-color);
    border-radius: 1px;
    content: "";
    inset-block: 0;
    inline-size: 3px;
    pointer-events: none;
    position: absolute;
  }

  .lexxy-drop-target--gallery-before::before {
    inset-inline-start: -4px;
  }

  .lexxy-drop-target--gallery-after::after {
    inset-inline-end: -4px;
  }

  .attachment:hover:not(.node--selected) {
    outline: var(--lexxy-focus-ring-size) solid color-mix(in oklch, var(--lexxy-focus-ring-color) 30%, transparent);
    outline-offset: var(--lexxy-focus-ring-offset);
  }

  /* Image galleries */
  /* ------------------------------------------------------------------------ */

  .attachment-gallery {
    --lexxy-attachment-gallery-columns: 3;
    --lexxy-attachment-gallery-gap: 0.4ch;
    --lexxy-focus-ring-offset: -6px;

    padding: 0;

    .attachment {
      background: transparent;
      box-sizing: border-box;
      margin: var(--lexxy-attachment-gallery-gap);
      padding: 0;
      padding-block-end: var(--lexxy-attachment-gap);
      vertical-align: top;

      img {
        box-sizing: border-box;
        padding: 1ch;
        padding-block-end: 0;
      }


      &.attachment--error {
        background: color-mix(var(--lexxy-color-red) 10%, transparent);
        padding: 2ch;

        > div {
          text-align: center;
        }
      }
    }
  }

  .attachment__caption--editable {
    box-sizing: border-box;
    cursor: text;

    .attachment__caption-text {
      display: block;
      min-block-size: 1lh;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
      text-align: center;
    }

    &[data-placeholder] .attachment__caption-text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  .attachment__caption--editing .attachment__caption-text {
    display: none;
  }
}

/* Reserve the mounted height before upgrade so it doesn't shift layout on mount. */
:where(lexxy-editor:not(:defined)) {
  min-block-size: calc(var(--lexxy-toolbar-height) + var(--lexxy-editor-rows) + 2 * var(--lexxy-editor-padding));
}

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

:where(.lexxy-editor__content) {
  /* eslint-disable-next-line css/no-invalid-properties */
  min-block-size: var(--lexxy-editor-rows);
  outline: 0;
  padding: var(--lexxy-editor-padding);

  /* Isolate the contenteditable root's layout and style. Lexical's reconciler
     commits mutations inside this element (nodes appended, text inserted,
     class flipped) on every update; containment keeps those mutations from
     invalidating ancestor-dependent selectors and sibling layout elsewhere
     in the editor. */
  contain: layout style;
}

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

:where([data-lexical-cursor]) {
  animation: blink 1s infinite;
  block-size: 1lh;
  border-inline-start: 1.5px solid currentColor;
  line-height: inherit;
  margin-block: 0 var(--lexxy-content-margin);
}

@keyframes blink {
  0% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0;}
}

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

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

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

  @container (width < 300px) {
    font-size: 0.8em;
  }

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

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

  &[data-code-blocks="false"][data-inline-code="false"] button[name="code"] {
    display: none;
  }

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

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

  .lexxy-editor__toolbar-button {
    aspect-ratio: 1;
    block-size: var(--lexxy-toolbar-button-size);
    border: 0;
    border-radius: var(--lexxy-radius);
    color: currentColor;
    display: grid;
    line-height: inherit;
    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);
      -webkit-user-select: none;

      @supports (user-select: none) {
        user-select: none;
      }
    }

    &.lexxy-editor__toolbar-group-end {
      position: relative;
      margin-inline-end: calc(var(--lexxy-toolbar-spacing) + 1px);

      &:after {
        background-color: var(--lexxy-color-ink-lighter);
        block-size: var(--lexxy-toolbar-icon-size);
        content: "";
        display: block;
        inline-size: 1px;
        inset-inline-end: calc(-1 * var(--lexxy-toolbar-spacing));
        inset-block: 0;
        margin: auto;
        pointer-events: none;
        position: absolute;
      }
    }
  }

  .lexxy-editor__toolbar-button--push-right {
    margin-inline-start: auto;
  }
}

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

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

  @supports (user-select: none) {
    user-select: none;
  }

  .lexxy-editor__toolbar-button {
    color: currentColor;

    &:hover {
      opacity: 0.8;
    }

    &.lexxy-editor__toolbar-button--chevron {
      aspect-ratio: unset;
      gap: 0.5ch;
      grid-template-columns: 2fr 1fr;
      min-inline-size: calc(var(--lexxy-toolbar-button-size) + 1.2ch);
      padding-inline: 0.75ch;

      &:after {
        block-size: 0.3ch;
        border-block-end: 2px solid currentColor;
        border-inline-end: 2px solid currentColor;
        content: "";
        display: inline-block;
        inline-size: 0.3ch;
        transform: rotate(45deg);
      }
    }
  }

  > .lexxy-editor__toolbar-button[aria-expanded="true"] {
    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);
    }
  }

  [data-dropdown-panel] {
    background-color: var(--lexxy-color-canvas);
    border: 2px solid var(--lexxy-color-selected-hover);
    border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
    box-sizing: border-box;
    box-shadow: var(--lexxy-shadow);
    color: var(--lexxy-color-text);
    display: flex;
    gap: var(--lexxy-toolbar-gap);
    margin: 0;
    padding: var(--lexxy-toolbar-spacing);
    position: absolute;
    z-index: 3;

    &[hidden],
    [overflowing] &[hidden] {
      display: none;
    }
  }

  .lexxy-editor__toolbar-dropdown-list {
    border-start-start-radius: 0;
    flex-direction: column;
    padding: 0.1ch;

    button {
      align-items: center;
      color: var(--lexxy-color-text);
      display: flex;
      flex-direction: row;
      gap: 1ch;
      padding: 1ch;
      position: relative;

      &[aria-checked="true"] {
        background-color: var(--lexxy-color-selected);

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

      span {
        font-size: var(--lexxy-text-small);
      }

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

    .lexxy-editor__toolbar-separator {
      background: var(--lexxy-color-ink-lighter);
      block-size: 1px;
      inline-size: 100%;
    }

    [overflowing] & {
      display: grid;
      grid-template-columns: repeat(4, 1fr);

      button span { display: none; }

      .lexxy-editor__toolbar-separator {
        grid-column: 1 / -1;
      }
    }
  }


  /* --------------------------------------------------------------------------
  /* Overflow menu */

  &.lexxy-editor__toolbar-overflow {
    display: none;
    justify-self: flex-end;
    z-index: 1;

    [data-dropdown-panel] {
      border-start-end-radius: 0;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      inset-inline-end: var(--lexxy-toolbar-gap);
    }
  }


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

  &.lexxy-editor__toolbar-dropdown--link {
    [data-dropdown-panel] {
      font-size: var(--lexxy-text-small);
      gap: var(--lexxy-toolbar-spacing);
      inset-inline-start: var(--lexxy-toolbar-spacing);
      inset-inline-end: var(--lexxy-toolbar-spacing);

      [overflowing] & {
        flex-wrap: wrap;
      }

      .lexxy-editor__toolbar-dropdown-actions {
        display: flex;
        flex: 1;
        gap: var(--lexxy-toolbar-spacing);
      }

      input {
        background-color: var(--lexxy-color-canvas);
        border: 1px solid var(--lexxy-color-ink-lighter);
        border-radius: var(--lexxy-radius);
        color: var(--lexxy-color-text);
        block-size: var(--lexxy-toolbar-button-size);
        box-sizing: border-box;
        font-size: var(--lexxy-text-small);
        flex: 2;
        inline-size: 100%;
        line-height: inherit;
        padding-block: 0;
        padding-inline: 1ch;

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

      button {
        background-color: var(--lexxy-color-ink-lightest);
        inline-size: 100%;
        padding-inline: 2ch;
      }

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

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

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

  &.lexxy-editor__toolbar-dropdown--highlight {
    position: relative;

    [overflowing] & {
      position: static;
    }

    [data-dropdown-panel] {
      --max-inline-size: calc(var(--max-colors) * (var(--lexxy-toolbar-button-size) + var(--lexxy-toolbar-spacing)));
      border-start-start-radius: 0;
      gap: var(--lexxy-toolbar-spacing);
      flex-direction: column;
      font-size: var(--lexxy-text-small);
      inset-inline-start: 0;
      max-inline-size: var(--max-inline-size);

      [overflowing] & {
        border-start-start-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
        inset-inline-end: var(--lexxy-toolbar-spacing);
        inset-inline-start: var(--lexxy-toolbar-spacing);
      }

      button {
        position: relative;
      }

      .lexxy-highlight-colors {
        display: grid;
        gap: var(--lexxy-toolbar-gap);
        grid-template-columns: repeat(auto-fill, minmax(var(--lexxy-toolbar-button-size), 1fr));
        max-inline-size: var(--max-inline-size);

        .lexxy-highlight-colors__group {
          display: contents;
        }

        button {
          block-size: unset;
          inline-size: 100%;

          &:after {
            align-items: center;
            content: "Aa";
            display: flex;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            inset: 0;
            justify-content: center;
            position: absolute;
          }

          &[aria-checked="true"] {
            background-color: transparent;
            box-shadow: 0 0 0 2px currentColor inset;

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

      .lexxy-editor__toolbar-dropdown-reset {
        background-color: var(--lexxy-color-ink-lightest);

        &:is([disabled]) {
          display: none;
        }
      }
    }
  }
}

/* --------------------------------------------------------------------------
/* Floating controls */
:where(.lexxy-floating-controls) {
  --button-size: 2.3lh;
  --floating-tools-radius: calc(var(--lexxy-radius) * 1.5);

  color: var(--lexxy-color-ink-inverted);
  font-size: var(--lexxy-text-small);
  line-height: 1;
  position: absolute;
  z-index: 2;

  button {
    align-items: center;
    background: transparent;
    block-size: var(--button-size);
    color: var(--lexxy-color-ink-inverted);
    display: flex;
    justify-content: center;
    line-height: inherit;
    min-block-size: var(--button-size);
    min-inline-size: var(--button-size);
    -webkit-user-select: none;

    @supports (user-select: none) {
      user-select: none;
    }

    @media(any-hover: hover) {
      &:hover:not([aria-disabled="true"]),
      &.lexxy-table-control__more-menu-trigger[aria-expanded="true"] {
        background: var(--lexxy-color-ink-medium);

        svg {
          opacity: 1;
        }
      }

      &:focus-visible {
        outline-color: var(--lexxy-focus-ring-color);
      }
    }
  }

  button {
    aspect-ratio: 1 / 1;
    font-weight: bold;

    svg {
      block-size: 1.125em;
      inline-size: 1.125em;
      fill: currentColor;
      opacity: 0.8;
      padding: 1px; /* Fixes weird Safari SVG clipping issue */
    }

    span {
      display: none;
    }
  }

  .lexxy-table-control__more-menu-trigger {
    aspect-ratio: auto;
    box-shadow: 0 0 0 1px inset var(--lexxy-color-floating-controls-separator);
    font-weight: normal;
    padding: 0 1.25ch;
  }

  .lexxy-floating-controls__group {
    background-color: var(--lexxy-color-ink);
    border-radius: var(--floating-tools-radius);
    padding: 0.25ch;
  }


  /* --------------------------------------------------------------------------
  /* Table Tools */

  &:is(lexxy-table-tools) {
    flex-direction: row;
    gap: 0.25ch;
    inset-inline-start: var(--lexxy-editor-padding);
    transform: translate(-50%, -120%);

    .lexxy-table-control {
      align-items: stretch;
      display: flex;
      flex-direction: row;
      gap: 0.25ch;
      white-space: nowrap;

      .lexxy-table-control__more-menu {
        display: flex;
        gap: 0;
        position: relative;

        .lexxy-table-control__more-menu-details {
          background: var(--lexxy-color-ink);
          border-radius: var(--floating-tools-radius);
          display: flex;
          flex-direction: column;
          gap: 0.25ch;
          inset-block-start: 110%;
          inset-inline-start: 50%;
          padding: 0.25ch;
          position: absolute;
          transform: translateX(-50%);

          &[hidden] {
            display: none;
          }

          button {
            aspect-ratio: unset;
            flex-direction: row;
            font-weight: normal;
            gap: 1ch;
            justify-content: flex-start;
            padding: 0.75ch;
            padding-inline-end: 1.5ch;
            white-space: nowrap;

            span {
              display: inline-block;
            }

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

      .lexxy-table-control__button--delete-table {
        align-items: center;
        block-size: auto;
        font-weight: normal;
        justify-content: center;

        svg {
          block-size: 1.125em;
          inline-size: 1.125em;
          min-block-size: 1.125em;
          min-inline-size: 1.125em;
        }

        span {
          align-items: center;
          background: var(--lexxy-color-ink);
          border-radius: var(--floating-tools-radius);
          color: color-mix(in srgb, var(--lexxy-color-ink-inverted) 80%, transparent);
          display: flex;
          inset-inline-end: calc(var(--button-size) + 1ch);
          inset-block-start: 0;
          inset-block-end: 0;
          inset-inline-start: 0;
          justify-content: center;
          padding: 0.5ch 1ch;
          position: absolute;
          transition: all 0.2s ease-out;
          opacity: 0;
          pointer-events: none;
          white-space: nowrap;
        }

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

          svg { color: var(--lexxy-color-ink-inverted); }

          span {
            opacity: 1;
          }
        }
      }
    }
  }


  /* --------------------------------------------------------------------------
  /* Attachment toolbar */

  &:is(lexxy-attachment-toolbar) {
    display: flex;
    /* The anchor is measured in px from the editor's top-left, so these stay physical. */
    left: calc(var(--lexxy-anchor-left) + var(--lexxy-anchor-width));
    top: var(--lexxy-anchor-top);
    transform: translate(calc(-100% - 1.5ch), 1.5ch);

    &[hidden] {
      display: none;
    }

    /* The divider is thinner than the button. */
    &[data-node-type="horizontal_divider"] {
      --button-size: 1.8lh;

      top: calc(var(--lexxy-anchor-top) + var(--lexxy-anchor-height) / 2);
      transform: translate(calc(-100% - 0.5ch), -50%);
    }

    &[data-presentation="inline"] {
      --button-size: 1.6lh;

      top: calc(var(--lexxy-anchor-top) + var(--lexxy-anchor-height) / 2);
      transform: translate(0.5ch, -50%);

      &[data-overflow] {
        transform: translate(-100%, -50%);
      }
    }

    .lexxy-floating-controls__group {
      display: flex;
    }

    button[hidden] {
      display: none;
    }

    .lexxy-attachment-toolbar__alternative-text {
      aspect-ratio: auto;
      margin-inline-end: calc(var(--lexxy-toolbar-spacing) + 1px);
      padding-inline: 1ch;
      position: relative;

      span {
        display: inline-block;
        font-size: 0.9em;
      }

      &:after {
        background-color: var(--lexxy-color-floating-controls-separator);
        block-size: 1.125em;
        content: "";
        display: block;
        inline-size: 1px;
        inset-block: 0;
        inset-inline-end: calc(-1 * var(--lexxy-toolbar-spacing));
        margin: auto;
        pointer-events: none;
        position: absolute;
      }
    }

    .lexxy-attachment-toolbar__remove:hover,
    .lexxy-attachment-toolbar__remove:focus-visible {
      background-color: var(--lexxy-color-red);
    }
  }


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

  &:is(lexxy-code-language-picker) {
    inset-inline-end: var(--lexxy-editor-padding);

    select {
      -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;
      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-padding: 0.5ch;

  --lexxy-prompt-offset-x: 0;
  --lexxy-prompt-offset-y: 0;

  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;
  inset-block-start: var(--lexxy-prompt-offset-y);
  inset-inline-start: var(--lexxy-prompt-offset-x);
  margin: 0;
  max-block-size: 200px;
  max-inline-size: min(20ch, calc(100% - var(--lexxy-prompt-offset-x)));
  min-inline-size: 20ch;
  overflow: auto;
  padding: var(--lexxy-prompt-padding);
  position: absolute;
  scroll-padding-block: calc(var(--lexxy-prompt-avatar-size) + var(--lexxy-prompt-padding) * 3);
  /* eslint-disable-next-line css/use-baseline */
  scrollbar-color: var(--lexxy-color-ink-light) transparent;
  /* eslint-disable-next-line css/use-baseline */
  scrollbar-width: thin;
  visibility: hidden;
  z-index: var(--lexxy-z-popup);

  &[data-clipped-at-right] {
    inset-inline-start: unset;
    inset-inline-end: 1ch;
    max-inline-size: calc(100% - 1ch);
  }

  &[data-clipped-at-bottom] {
    inset-block-start: unset;
    inset-block-end: var(--lexxy-prompt-offset-y);
  }
}

:where(.lexxy-prompt-menu--visible[data-anchored]) {
  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);

  &: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);
}


/* --------------------------------------------------------------------------
/* Custom attachments */
action-text-attachment[content-type^="application/vnd.actiontext"] {
  &.node--selected {
    --lexxy-attachment-bg-color: var(--lexxy-color-accent-dark);
    --lexxy-attachment-text-color: var(--lexxy-color-ink-inverted);

    outline: none;
  }
}

/* --------------------------------------------------------------------------
/* Screen readers need access to announcements and selection labels. */
:where(lexxy-live-region, .lexxy-fake-selection) {
  block-size: 1px;
  border: 0;
  clip-path: inset(50%);
  inline-size: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

/* The DOM Selection API requires selectable text. */
.lexxy-fake-selection {
  -webkit-user-select: text;

  @supports (user-select: text) {
    user-select: text;
  }
}


/* Screen readers need the caption field outside the editor's textbox. */
:where(.lexxy-caption-editor) {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  background: var(--lexxy-color-canvas);
  border: 0;
  border-radius: var(--lexxy-radius);
  outline: 0;
  padding: 0;
  overflow: hidden;

  @supports (resize: none) {
    resize: none;
  }

  &[hidden] {
    display: none;
  }
}

.lexxy-alternative-text-dialog {
  background: var(--lexxy-color-canvas);
  border: 2px solid var(--lexxy-color-selected-hover);
  border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
  box-shadow: var(--lexxy-shadow);
  box-sizing: border-box;
  color: var(--lexxy-color-ink);
  font: inherit;
  inline-size: 60%;
  inset-block: calc(var(--lexxy-anchor-bottom) + var(--lexxy-toolbar-spacing)) auto;
  inset-inline: 0;
  margin-block: 0;
  margin-inline: auto;
  min-inline-size: min(20rem, 100%);
  overflow: auto;
  padding: var(--lexxy-toolbar-spacing);
  z-index: 3;

  h2 {
    font-size: inherit;
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
    padding-block-start: calc(0.25 * var(--lexxy-text-small));
    padding-inline: calc(0.5 * var(--lexxy-text-small));
    text-align: center;
  }

  .lexxy-alternative-text-dialog__controls {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-block-start: 0.5em;
  }

  textarea {
    background: var(--lexxy-color-canvas);
    border: 1px solid var(--lexxy-color-ink-lighter);
    border-radius: var(--lexxy-radius);
    box-sizing: border-box;
    color: inherit;
    display: block;
    font: inherit;
    font-size: var(--lexxy-text-small);
    font-weight: normal;
    min-block-size: calc(2lh + 1em + 2px);
    min-inline-size: 0;
    padding: 0.5em;

    @supports (field-sizing: content) {
      field-sizing: content;
    }

    @supports (resize: none) {
      resize: none;
    }
  }

  button {
    background-color: var(--lexxy-color-ink-lightest);
    block-size: var(--lexxy-toolbar-button-size);
    border: 0;
    border-radius: var(--lexxy-radius);
    color: currentColor;
    cursor: pointer;
    display: grid;
    font-size: var(--lexxy-text-small);
    inline-size: 100%;
    line-height: inherit;
    padding-inline: 2ch;
    place-items: center;

    &:hover {
      opacity: 0.8;
    }
  }

  .lexxy-alternative-text-dialog__save {
    background-color: var(--lexxy-color-accent-dark);
    color: var(--lexxy-color-ink-inverted);

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

  textarea:focus-visible {
    outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
    outline-offset: var(--lexxy-focus-ring-offset);
  }

  .lexxy-alternative-text-dialog__actions {
    display: flex;
    gap: 0.5em;

    button {
      flex: 1;
    }
  }
}
/*
 * Lexxy rich text editor (Action Text) styles: the editor toolbar and the
 * .lexxy-content class used both while editing and when displaying content.
 *



*/
body {
  direction: rtl;
  font-family: "Cairo", sans-serif;
}

/* h1 is treated always as page title */
h1 {
  text-align: center;
}

a {
  color: #000;
  text-decoration: none;
}

a:hover {
  color: #b12d37;
  text-decoration: none;
}

.make-space {
  height: 5px;
  clear: both;
}

.container, .container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  margin-bottom: 0.5rem;
}

select.form-control {
  height: 35px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.form-control {
  direction: rtl;
}

.page-title {
  text-align: center;
}

p {
  margin-bottom: 1px;
}

header {
  width: 100%;
}

.site-logo {
  width: 120px;
  height: inherit;
}

.nav-item:first-child {
  border-right: none;
}

.nav-item {
  padding: 6px 3px;
  border-right: 1px solid #a2a6a5;
}

.nav-item:hover {
  background-color: #fff;
  border: 1px solid #b12d37;
}
.nav-item:hover a.nav-link {
  color: #b12d37;
}
.nav-item:hover .new_orders-bubble {
  background-color: #b12d37;
  color: #fff;
}

.navbar-expand-lg .navbar-nav .nav-link {
  color: #fff;
  font-size: 18px;
}

.dropdown:hover .sub_categories_menu {
  display: block;
}

.dropdown-menu, .dropdown-menu[data-bs-popper] {
  border-radius: 0;
  top: 100%;
  margin-top: var(--bs-dropdown-spacer);
}
.dropdown-menu .dropdown-item, .dropdown-menu[data-bs-popper] .dropdown-item {
  color: #000;
}

.dropdown-menu li {
  position: relative;
}

.nav-item .submenu {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
}

.dropdown-menu > li:hover > .submenu {
  display: block;
}

.product-in-list {
  position: relative;
  border: 1px solid #b12d37;
  border-radius: 15px;
  padding: 5px;
  height: 310px;
  box-shadow: 0 1px 5px #aaa;
}

.product-list-img {
  max-height: 200px;
}

.product-details-img {
  position: relative;
}

.product-img {
  position: relative;
  height: 200px;
  line-height: 200px;
}

.brand-image-bottom-left {
  position: absolute;
  bottom: -75px;
  left: 1px;
}
.brand-image-bottom-left img {
  width: 50px;
}

.product-brand-image-bottom-left {
  position: absolute;
  bottom: 0;
  left: 12px;
}
.product-brand-image-bottom-left img {
  width: 70px;
}

.product-list-title {
  padding-top: 3px;
}

.product-list-price {
  color: #b12d37;
  padding-bottom: 5px;
  font-weight: 600;
}

.product-list-discount-price {
  color: #000;
  font-size: 15px;
  padding-left: 8px;
}

.product-img-thumb {
  width: 120px;
  height: 120px;
}

.product-price {
  padding: 10px 1px;
  color: white;
  font-weight: bold;
  background-color: #b12d37;
}

.product-discount-price {
  color: #000;
  font-size: 20px;
  padding-left: 8px;
}

.product-disount-price {
  color: red;
}

.in-cart-img {
  max-width: 100%;
  height: 100px;
}

.th-row {
  background-color: rgba(0, 0, 0, 0.05);
}

.th-col {
  padding: 0.75rem;
  vertical-align: top;
  border-right: 1px solid #dee2e6;
  font-weight: 700;
}

.td-col {
  padding: 0.75rem;
  vertical-align: top;
  border-right: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
}

/* Colors of statuses */
.initialized {
  --bs-table-bg: white;
  background-color: white;
}

.submitted {
  --bs-table-bg: palegreen;
  background-color: palegreen;
}

.verified {
  --bs-table-bg: darkseagreen;
  background-color: darkseagreen;
}

.packed {
  --bs-table-bg: cyan;
  background-color: cyan;
}

.ready_delivery {
  --bs-table-bg: lightsalmon;
  background-color: lightsalmon;
}

.in_delivery {
  --bs-table-bg: yellow;
  background-color: yellow;
}

.delivered {
  background-color: green;
  --bs-table-bg: green;
  color: white;
}
.delivered a {
  color: white;
}

.cancelled {
  background-color: dimgray;
  --bs-table-bg: dimgray;
}

.wrong {
  --bs-table-bg: Magenta;
  background-color: Magenta;
}

.no_stock {
  --bs-table-bg: Crimson;
  background-color: Crimson;
}

.returned {
  background-color: darkred;
  --bs-table-bg: darkred;
}

.followup {
  --bs-table-bg: violet;
  background-color: violet;
}

.text-direction {
  text-align: left;
}

.cart-bubble {
  font-size: 12px;
  font-weight: 600;
  color: white;
  background-color: #b12d37;
  border-radius: 10rem;
  padding-left: 0.6em;
  padding-right: 0.6em;
  top: 10px;
  left: 32px;
}

.fa-check {
  color: green;
}

.fa-times {
  color: red;
}

.width_90 {
  width: 90%;
}

.badge {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 5;
  line-height: 1.3;
  color: #fff;
  background-color: #b12d37;
  font-family: "Cairo", sans-serif;
}

.on-sales-badge {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 5px;
  line-height: 1.3;
  color: #fff;
  background-color: #b12d37;
  font-family: "Cairo", sans-serif;
  padding: 5px;
}

.hidden-msg {
  display: none;
  color: #dc3545;
}

.chosen-results {
  padding: 0px;
  display: list-item;
}

.chosen-container {
  font-size: 15px;
}

.chosen-container-single .chosen-single {
  border-top-right-radius: 4px;
  border-top-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
  display: block;
  height: 37px;
  overflow: hidden;
  line-height: 34px;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #dee2e6;
  height: 37px;
}

.carousel-item {
  float: right;
  margin-left: -100%;
  margin-right: 0;
}

.carousel-control-prev {
  left: 0;
  right: auto;
}

.carousel-inner img {
  width: 830px;
  height: 370px;
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") !important;
}

.float-whats {
  position: fixed;
  width: 60px;
  height: 60px;
  left: 20px;
  bottom: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
}

.fixed-button {
  margin-top: 16px;
}

.main-color-bg {
  background-color: #b12d37;
}

.main-color-text {
  color: #747574;
}

.white-bg {
  background-color: #fff;
}

.fa-user, .fa-shopping-cart {
  color: #747574;
}

.icons .fa-magnifying-glass {
  color: #747574;
}

.btn-danger {
  background-color: #b12d37;
}

.custom-btn {
  width: 100%;
  line-height: normal;
  font-weight: 600;
}

.breadcrumb {
  background-color: #ebe5de;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  text-transform: none;
  color: white;
}
.breadcrumb h4 {
  font-weight: 600;
  margin-top: 7px;
}
.breadcrumb a {
  color: #000;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb .page-heading {
  color: white;
  font-style: normal;
  font-weight: 500;
  text-transform: none;
}

.breadcrumb ol {
  margin-bottom: 0;
  display: flex;
}

.breadcrumb li {
  color: white;
  list-style: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item {
  padding-right: 0px;
  padding-left: 0px;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #747574;
}

.breadcrumb li:after {
  margin: 0 6px;
}

@media (max-width: 767.98px) {
  .breadcrumb {
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 8px;
  }
  .breadcrumb ol {
    display: block;
    padding: 0;
    line-height: 1.6;
  }
  .breadcrumb li {
    display: inline;
    font-size: 12px;
    white-space: normal;
  }
  .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    float: none;
    display: inline;
    padding-left: 4px;
    padding-right: 4px;
  }
}
.breadcrumb li:last-child:after {
  margin: 0;
}

.breadcrumb-item.active {
  color: #b12d37;
}

.product-section {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 5px;
}

.add-to-cart-btn {
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
}

.snap-carousel {
  --per-view: 1;
  --gap: 1rem;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.snap-carousel::-webkit-scrollbar {
  display: none;
}
.snap-carousel > .item {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  min-width: 0;
  scroll-snap-align: start;
}

.onsale-carousel,
.category-carousel {
  padding: 10px 0;
}

.cart-modal-fixed {
  position: absolute;
  top: -28px !important;
  left: 0;
  z-index: 10040;
  overflow: auto;
  overflow-y: auto;
}

.modal-content {
  border-radius: 0px;
}

.cart-panel-btn {
  position: fixed;
  left: 0;
  top: 40%;
  background-color: #b12d37;
  color: #fff;
  padding: 20px;
  border: none;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 99;
  cursor: pointer;
}
.cart-panel-btn .fa-shopping-cart {
  color: #fff;
}

footer {
  background-color: #ebe5de;
}
footer h5, footer p, footer a {
  color: #b12d37;
}
footer .note {
  background-color: #b12d37;
  color: #fff;
}

.section-title {
  background-color: #b12d37;
  color: white;
  padding: 10px;
}

.category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 767.98px) {
  .category-section-header {
    padding: 8px 10px;
  }
  .category-section-header h1 {
    font-size: 1.15rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .category-section-header .section-more-link {
    font-size: 0.8rem;
    padding: 3px 10px;
  }
}

.section-more-link {
  flex-shrink: 0;
  color: white;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s;
}
.section-more-link i {
  font-size: 0.75rem;
  margin-inline-start: 4px;
  transition: transform 0.2s;
}
.section-more-link:hover, .section-more-link:focus {
  background-color: white;
  color: #b12d37;
}
.section-more-link:hover i, .section-more-link:focus i {
  transform: translateX(-3px);
}

.brands-carousel .item img {
  display: inline;
  width: auto;
  max-width: 100%;
  height: 100px;
}

.lexxy-content ul {
  padding-right: 15px;
}

.pagination {
  justify-content: center;
}

.page-item:last-child .page-link, .page-item:first-child .page-link {
  border-radius: 0px;
}

.filter-name {
  font-weight: normal;
  border-bottom: solid thin #d3d3d3;
  text-align: center;
  margin-bottom: 5px;
  padding: 2px;
}

.new_orders-bubble {
  font-size: 12px;
  font-weight: 600;
  color: #b12d37;
  background-color: #fff;
  border-radius: 10rem;
  padding-left: 0.6em;
  padding-right: 0.6em;
  margin: 0em 30%;
}

.message {
  animation: appear-then-fade 10s both;
}

@keyframes appear-then-fade {
  0%, 100% {
    opacity: 0;
  }
  5%, 60% {
    opacity: 1;
  }
}
@media (max-width: 800px) {
  .dropdown-toggle::after {
    float: left;
    margin-top: 1em;
  }
  .mobile-menu {
    border-bottom: 2px solid #b12d37;
  }
  ol {
    padding: 0px;
  }
  ul {
    list-style: none;
    padding: 5px 10px;
  }
  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    padding: 0px 5px;
  }
  .site-logo {
    width: 100px;
    height: inherit;
  }
  .navbar-light .navbar-toggler {
    border: none;
  }
  .nav-item {
    padding: 0px;
    border: none;
  }
  .navbar-expand-lg .navbar-nav .nav-link {
    color: #747574;
    font-size: 16px;
  }
  .icons .fa-bars, .icons .fa-magnifying-glass, .icons .fa-user, .icons .fa-shopping-cart, .icons .fa-whatsapp {
    color: #747574;
  }
  .carousel-inner img {
    width: 400px;
    height: 250px;
  }
  .product-in-list {
    height: 330px;
  }
  .product-list-img {
    max-width: 100%;
    max-height: 160px;
  }
  .onsale-carousel .item img {
    display: inline;
    width: auto;
    max-width: 100%;
    max-height: 160px;
  }
  .sub_categories_ul {
    display: list-item;
  }
  .sub_categories_ul li {
    margin: 5px 15px;
  }
  .sub_categories_ul .title {
    font-weight: 700;
    border-bottom: 1px solid #dee2e6;
  }
  .product-price {
    text-align: center;
  }
  .breadcrumb ol {
    display: inline;
  }
  .add-to-cart-btn {
    right: 10%;
    left: 10%;
  }
  .brand-image-bottom-left img {
    width: 40px;
  }
  .cart-modal-fixed {
    top: 0px !important;
  }
  .in-cart-img {
    max-width: 100%;
  }
  .filters p {
    font-size: 15px;
  }
  .brands-carousel .item img {
    display: inline;
    width: auto;
    max-width: 100%;
    height: 75px;
  }
  div.scrollmenu {
    overflow-x: auto;
    white-space: nowrap;
  }
  div.scrollmenu .item {
    display: contents;
  }
  div.scrollmenu a {
    display: inline-block;
    float: none;
    font-size: 15px;
  }
}
.bg-blue {
  background-color: rgba(0, 0, 255, 0.1803921569);
}

.mobile-product-card {
  background: white;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 10px 12px;
  margin-bottom: 10px;
  text-align: start;
}

.mobile-product-body {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.mobile-product-info {
  flex: 1 1 55%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.mobile-product-part-no {
  display: inline-block;
  background: #efefef;
  color: #333;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-product-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.mobile-product-name a {
  color: #222;
  text-decoration: none;
}

.mobile-product-brand a {
  color: #1d5fbf;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-product-price {
  color: #b12d37;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.mobile-product-price .currency {
  font-size: 1.1rem;
}

.mobile-product-old-price {
  display: block;
  color: #747574;
  font-size: 0.8rem;
  font-weight: 400;
}

.mobile-product-media {
  flex: 0 0 42%;
  position: relative;
  min-height: 120px;
  overflow: hidden;
}
.mobile-product-media .mobile-product-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.mobile-product-media .mobile-product-img img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
}
.mobile-product-media .on-sales-badge {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
}

.mobile-product-brand-logo {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
}
.mobile-product-brand-logo img {
  max-width: 48px;
  max-height: 36px;
  object-fit: contain;
}

.mobile-product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border-top: 1px solid #eee;
  margin-top: 8px;
  padding-top: 8px;
}

.mobile-product-cart-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-product-add-btn {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-product-qty {
  display: flex;
  align-items: stretch;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  overflow: hidden;
  height: 34px;
  flex: 0 0 auto;
}
.mobile-product-qty button {
  width: 28px;
  border: 0;
  background: white;
  font-size: 1.1rem;
  line-height: 1;
}
.mobile-product-qty input {
  width: 34px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-inline: 1px solid #d5d5d5;
  text-align: center;
  -moz-appearance: textfield;
}
.mobile-product-qty input::-webkit-outer-spin-button, .mobile-product-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mobile-product-more {
  color: #1d5fbf;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-inline-start: auto;
}

.mobile-product-out-of-stock {
  color: #747574;
  font-weight: 600;
}

.grid-banners .grid-banner-img {
  display: block;
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}
.grid-banners a:hover .grid-banner-img {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.ph-header {
  background: #fff;
}

.ph-topbar {
  background: #fff;
  padding: 8px 12px 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  z-index: 1030;
}
.ph-topbar.fixed-top {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ph-topbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph-brand {
  display: flex;
  align-items: center;
  margin-inline-end: auto;
}

.ph-logo {
  height: 64px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

.ph-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ph-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f4f4f5;
  color: #333;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
}
.ph-icon-btn:hover, .ph-icon-btn:focus-visible {
  background: rgb(95.3497615262%, 81.7090620032%, 82.7424483307%);
  color: #b12d37;
}
.ph-icon-btn:active {
  transform: scale(0.94);
}
.ph-icon-btn i {
  color: inherit;
}

.ph-menu-btn[aria-expanded=true] {
  background: #b12d37;
  color: #fff;
}

.ph-whatsapp {
  color: #25d366;
  font-size: 1.2rem;
}

.ph-cart-badge {
  position: absolute;
  top: -3px;
  inset-inline-end: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b12d37;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.ph-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  background: #f7f7f8;
  color: #8a8a8a;
  font-size: 0.9rem;
  text-decoration: none;
}
.ph-search i {
  color: #b12d37;
}
.ph-search:hover {
  color: #666;
  border-color: rgb(89.2686804452%, 57.7901430843%, 60.1748807631%);
}

.ph-nav .ph-nav-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 6px 4px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eee;
  max-height: 70vh;
  overflow-y: auto;
}
.ph-nav .nav-item {
  padding: 0;
  border: 0;
  border-bottom: 1px solid #f1f1f1;
}
.ph-nav .nav-item:last-child {
  border-bottom: 0;
}
.ph-nav .nav-link {
  display: block;
  padding: 10px 12px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}
.ph-nav .nav-link:hover {
  color: #b12d37;
}
.ph-nav .sub_categories_ul a {
  color: #555;
  text-decoration: none;
}

.ph-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  scrollbar-width: none;
}
.ph-chips::-webkit-scrollbar {
  display: none;
}

.ph-chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.ph-chip:hover {
  border-color: #b12d37;
  color: #b12d37;
}
.ph-chip.active {
  background: #b12d37;
  border-color: #b12d37;
  color: #fff;
}

.category-carousel > .item > .mobile-product-card {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.show-more-card {
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: #b12d37;
  background: rgb(97.3767885533%, 89.6820349762%, 90.2649708532%);
  border: 2px dashed #b12d37;
  border-radius: 15px;
  transition: background-color 0.2s, color 0.2s;
}
.show-more-card .show-more-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #b12d37;
  color: white;
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.show-more-card .show-more-text {
  font-weight: 700;
  font-size: 1.1rem;
}
.show-more-card .show-more-category {
  font-size: 0.9rem;
  color: #747574;
}
.show-more-card:hover, .show-more-card:focus {
  background: #b12d37;
  color: white;
}
.show-more-card:hover .show-more-icon, .show-more-card:focus .show-more-icon {
  background: white;
  color: #b12d37;
  transform: translateX(-4px);
}
.show-more-card:hover .show-more-category, .show-more-card:focus .show-more-category {
  color: white;
}

.carousel-wrap {
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b12d37;
  border-radius: 50%;
  background: white;
  color: #b12d37;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}
.carousel-btn:hover, .carousel-btn:focus-visible {
  background: #b12d37;
  color: white;
}
.carousel-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.carousel-prev {
  inset-inline-start: -14px;
}

.carousel-next {
  inset-inline-end: -14px;
}

@media (hover: none), (pointer: coarse) {
  .carousel-btn {
    display: none;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS 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/SCSS
 * 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.
 *


 */
