/* Administrator controls are added only after same-origin session and item checks. */
/* Keep each delete control in the same row, immediately before its own name. */
html body .a3-front-admin-wrap,
html body li.a3-front-admin-item {
  position: relative;
  display: inline-grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  column-gap: 4px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}
html body li.a3-front-admin-item { display: grid; min-height: 26px; }
html body .a3-front-admin-wrap > a,
html body li.a3-front-admin-item > a[data-managed-link-id] {
  grid-column: 2;
  grid-row: 1;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  overflow-wrap: anywhere;
}
html body li.a3-front-admin-item > .site-search-category,
html body li.a3-front-admin-item > .site-search-address { grid-column: 2; margin-inline-start: 0; }
html body button.a3-front-delete { position: static; grid-column: 1; grid-row: 1; z-index: 2; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 23px; min-width: 23px; height: 23px; min-height: 23px; margin: 1px 0 0; padding: 0; border: 1px solid #d92d20; border-radius: 5px; background: #fff; color: #b42318 !important; font: 700 19px/1 Arial, sans-serif; text-indent: 0; cursor: pointer; touch-action: manipulation; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
/* Image banners keep their full width and their existing corner control. */
html body .a3-front-admin-wrap.is-banner { display: block; width: 100%; padding: 0; line-height: 0; }
html body .a3-front-admin-wrap.is-banner > button.a3-front-delete { position: absolute; inset-block-start: 3px; inset-inline-end: 3px; margin: 0; }
html body button.a3-front-delete:hover { background: #fee4e2; }
html body button.a3-front-delete:focus-visible { outline: 3px solid #ffae4d; outline-offset: 2px; }
html body button.a3-front-delete:disabled { opacity: .55; cursor: wait; }
html body .a3-front-admin-notice { position: fixed; z-index: 20000; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); box-sizing: border-box; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid #85c99a; border-radius: 8px; background: #f0fdf4; color: #14532d; font: 14px/1.6 system-ui, sans-serif; overflow-wrap: anywhere; box-shadow: 0 4px 20px rgba(0, 0, 0, .18); }
html body .a3-front-admin-notice.is-error { border-color: #f6a7a0; background: #fff1f0; color: #912018; }
html body .a3-front-admin-notice[hidden] { display: none; }
html[data-theme="dark"] body button.a3-front-delete { background: #302126; border-color: #ef8f85; color: #ffb4ab !important; }
html[data-theme="dark"] body button.a3-front-delete:hover { background: #542a30; }
html[data-theme="dark"] body .a3-front-admin-notice { background: #153526; border-color: #3c7950; color: #c1f3cc; }
html[data-theme="dark"] body .a3-front-admin-notice.is-error { background: #41272b; border-color: #9c5a5a; color: #ffd1cb; }

/* Preserve a3's native link columns when a control wraps a managed anchor. */
html body .card-body1 > .a3-front-admin-wrap { width: 10%; padding: 8px 3px; font-size: 14px; }
html body .card-body1 > .a3-front-admin-wrap > a { width: 100%; float: none; height: auto; padding: 0; line-height: 1.6; overflow-wrap: anywhere; }
html body .a3-front-admin-wrap.is-site-item { float: left; width: 10%; padding: 8px 3px; font-size: 14px; }
html body .a3-front-admin-wrap.is-site-item > a.site-item { width: 100%; float: none; padding: 0; }
html body .a3-front-admin-wrap.is-top { width: 8.333333%; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
html body .a3-front-admin-wrap.is-top > button { align-self: flex-start; }
html body .section-header__content .a3-front-admin-wrap { align-items: center; font-weight: 400; }
@media (min-width: 768px) and (max-width: 999px) {
  html body .a3-front-admin-wrap.is-site-item:not(.is-top) { width: 16.666667%; }
}
@media (max-width: 797px) {
  html body .card-body1 > .a3-front-admin-wrap { float: left; width: 25%; min-height: 35px; padding: 5px 2px; font-size: 13px; }
}
@media (max-width: 767px) {
  html body .a3-front-admin-wrap.is-site-item { width: 25%; font-size: 13px; }
  html body .a3-front-admin-wrap.is-top { width: 20%; }
}
@media (max-width: 480px) { html body .a3-front-admin-wrap.is-top { width: 25%; } }
@media (prefers-color-scheme: dark) {
  html body button.a3-front-delete { background: #302126; border-color: #ef8f85; color: #ffb4ab !important; }
  html body button.a3-front-delete:hover { background: #542a30; }
  html body .a3-front-admin-notice { background: #153526; border-color: #3c7950; color: #c1f3cc; }
  html body .a3-front-admin-notice.is-error { background: #41272b; border-color: #9c5a5a; color: #ffd1cb; }
}

html body .a3-front-admin-wrap[hidden] { display: none !important; }
