/**
 * @file contextual-fix.css
 * Restore core contextual link styling.
 *
 * Loads LAST to override our reset/forms styles on contextual elements.
 * This ensures core's contextual.module.css and contextual.theme.css
 * work as intended.
 */

/* Reset the trigger button to core defaults */
.contextual .trigger {
  display: block;
  width: auto;
  height: auto;
  padding: 0 2px;
  font-size: inherit;
  font-weight: normal;
  font-family: inherit;
  line-height: normal;
  border: 1px solid #ccc;
  border-radius: 13px;
  background-color: #fff;
  color: inherit;
  cursor: pointer;
  position: relative;
  float: right;
  overflow: hidden;
  margin: 0;
  appearance: auto;
  min-width: 0;
  white-space: normal;
  text-decoration: none;
  transition: none;
  box-shadow: none;
  align-items: initial;
  justify-content: initial;
  inline-size: auto;
  block-size: auto;
}

/* Reset links inside contextual dropdowns */
.contextual .contextual-links a {
  display: block;
  margin: 0.25em 0;
  padding: 0.4em 0.6em;
  color: #333;
  background-color: #fff;
  font-family: sans-serif;
  font-size: small;
  font-weight: normal;
  line-height: 0.8em;
  text-decoration: none;
  border: none;
  border-radius: 0;
  height: auto;
  min-width: 0;
  transition: none;
}

.contextual .contextual-links a:hover {
  color: #000;
  background: #f7fcff;
}

/* Ensure contextual-links list is properly hidden/shown */
.contextual .contextual-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.25em 0;
}

.contextual.open .contextual-links {
  display: block;
}

.contextual .contextual-links li {
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
}
