/* Standalone body portal: selectors intentionally do not depend on .mv-blog-admin. */
.mao-blog-selection-tools {
  --selection-ink: #3c3c3c;
  --selection-yellow: #f8b22c;
  --selection-paper: #f3f1ea;
  --selection-white: #fffefa;
  --selection-line: rgba(60, 60, 60, .22);
  position: fixed;
  z-index: 9990;
  display: grid;
  width: max-content;
  max-width: calc(100vw - 16px);
  gap: 0;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid var(--selection-line);
  border-radius: 8px;
  background: var(--selection-white);
  color: var(--selection-ink);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 6px 24px rgba(60, 60, 60, .18), 0 1px 3px rgba(60, 60, 60, .1);
  isolation: isolate;
}
.mao-blog-selection-tools[hidden],
.mao-blog-selection-tools [hidden] { display: none !important; }
.mao-blog-selection-tools *,
.mao-blog-selection-tools *::before,
.mao-blog-selection-tools *::after { box-sizing: border-box; }
.mao-blog-selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
}
.mao-blog-selection-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--selection-ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mao-blog-selection-tools .mao-blog-selection-button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 9px;
  font-size: 17px;
  user-select: none;
}
.mao-blog-selection-tools button:hover:not(:disabled),
.mao-blog-selection-tools button[aria-pressed="true"] {
  border-color: var(--selection-ink);
  background: var(--selection-yellow);
}
.mao-blog-selection-tools button:active:not(:disabled) { background: var(--selection-paper); }
.mao-blog-selection-tools button:disabled { opacity: .4; cursor: default; }
.mao-blog-selection-tools button:focus-visible,
.mao-blog-selection-tools input:focus-visible {
  outline: 2px solid var(--selection-ink);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px var(--selection-yellow);
}
.mao-blog-selection-tools svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.mao-blog-selection-underline { text-decoration: underline; text-underline-offset: 3px; }
.mao-blog-selection-link {
  display: grid;
  gap: 7px;
  width: clamp(240px, 76vw, 370px);
  max-width: 100%;
  margin-top: 5px;
  padding: 11px 6px 5px;
  border-top: 1px solid var(--selection-line);
}
.mao-blog-selection-link label { margin: 0; font: inherit; font-weight: 700; }
.mao-blog-selection-link input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--selection-line);
  border-radius: 4px;
  background: var(--selection-paper);
  color: var(--selection-ink);
  font: inherit;
  font-size: 16px; /* Prevent iOS input-focus zoom. */
  line-height: 1.5;
}
.mao-blog-selection-link input::placeholder { color: rgba(60, 60, 60, .7); }
.mao-blog-selection-link input[aria-invalid="true"] { border: 2px solid var(--selection-ink); }
.mao-blog-selection-tools .mao-blog-selection-hint,
.mao-blog-selection-tools .mao-blog-selection-error {
  margin: 0;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.mao-blog-selection-hint { color: rgba(60, 60, 60, .85); }
.mao-blog-selection-tools .mao-blog-selection-error {
  max-width: 370px;
  margin: 6px;
  padding: 7px 9px;
  border-left: 3px solid var(--selection-yellow);
  background: var(--selection-paper);
  color: var(--selection-ink);
}
.mao-blog-selection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.mao-blog-selection-actions button { min-height: 44px; border-color: var(--selection-line); font-size: 11px; }
.mao-blog-selection-actions button[data-selection-action="save"] { background: var(--selection-yellow); }
@media (pointer: coarse) {
  .mao-blog-selection-tools .mao-blog-selection-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-basis: 44px; }
}
@media (max-width: 360px) {
  .mao-blog-selection-toolbar { gap: 1px; }
  .mao-blog-selection-link { width: min(282px, calc(100vw - 40px)); padding-inline: 4px; }
  .mao-blog-selection-actions button { flex: 1 1 auto; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .mao-blog-selection-tools *, .mao-blog-selection-tools { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .mao-blog-selection-tools { border-color: CanvasText; }
  .mao-blog-selection-tools button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
