/**
 * Restrictly™ Block Visibility – Editor Overlay Badge
 *
 * @package    Restrictly
 * @since      0.1.0
 */

/* stylelint-disable selector-class-pattern */

/* The Gutenberg class uses underscores by design — safe to ignore. */

.block-editor-block-list__block.strictly-has-restrictly-vis {
  position: relative;
}

/* Tiny badge chip. */
.block-editor-block-list__block.strictly-has-restrictly-vis::after {
  content: attr(data-restrictly-short);
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 10.5px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  background-color: rgb(0 0 0 / 65%);
  color: #fff;
  pointer-events: none;
  z-index: 2;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Color coding. */
.strictly-vis-logged_in::after {
  background-color: rgb(25 113 194 / 90%);
}

.strictly-vis-logged_out::after {
  background-color: rgb(217 45 32 / 90%);
}

.strictly-vis-role_admin::after,
.strictly-vis-role_editor::after,
.strictly-vis-role_author::after,
.strictly-vis-role_contributor::after,
.strictly-vis-role_subscriber::after {
  background-color: rgb(88 80 236 / 90%);
}

.strictly-vis-everyone::after {
  display: none;
}
/* stylelint-enable selector-class-pattern */
