@layer components {
.attachment__attribute, .attachment__name {
    font-size: var(--font-size-sm);
    a {
        text-decoration: underline;
    }
}

lexxy-editor {
    min-height: 30vh;
}

/* Normalize dropdown toggle size to match regular toolbar buttons.
   <summary> inherits body line-height:1.5 while <button> gets UA normal,
   causing lexxy's block-size:2lh to differ (45px vs 34px).
   !important needed: unlayered lexxy CSS beats @layer components. */
lexxy-toolbar .lexxy-editor__toolbar-dropdown > summary {
    block-size: 34px !important;
    inline-size: 34px !important;
}

/* Reset our .btn overrides on lexxy dropdown action buttons.
   Lexxy doesn't set font-size/padding/etc on these, so our layered .btn leaks in. */
lexxy-link-dropdown .btn {
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    line-height: inherit;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    gap: normal;
    white-space: normal;
    transition: none;
    border: none;
}


@media (max-width: 768px) {
  lexxy-toolbar {
    flex-wrap: wrap;
    max-width: 100%;
  }
}
}

/* Lexxy prompt menu sizes are rem-based, but Metro UI sets html font-size:10px,
   so 0.875rem computes to 8.75px instead of the intended 14px.
   Fix by overriding the relevant CSS variables on the editor. */
lexxy-editor {
  --lexxy-radius: 4px;
  --lexxy-text-small: 0.875rem;
  --lexxy-prompt-min-width: 40ch;
  --lexxy-prompt-padding: 0.5em;
}
