/**
 * @file
 * Styles for dropbuttons in the off-canvas dialog.
 */

#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-wrapper,
#drupal-off-canvas-wrapper .dropbutton-wrapper,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-widget,
#drupal-off-canvas-wrapper .dropbutton-widget {
  position: static;
  display: block;
  transition: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-widget,
#drupal-off-canvas-wrapper .dropbutton-widget {
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.5s ease;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  color: #fff;
  border: 0;
  border-radius: 1em;
  background: #277abd;
  font-weight: 600;
  line-height: normal;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-widget:hover,
#drupal-off-canvas-wrapper .dropbutton-widget:hover {
  background: #2b8bd8;
}

/*
 * Style dropbutton single.
 */

#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-single .dropbutton-action a,
#drupal-off-canvas-wrapper .dropbutton-single .dropbutton-action a {
  height: 2.2em;
  /* Overlap icon for trigger. */
  margin-top: -2em;
  padding: 0;
  cursor: pointer;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-single .dropbutton-action:hover,
#drupal-off-canvas-wrapper .dropbutton-single .dropbutton-action:hover,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-single .dropbutton-action:focus,
#drupal-off-canvas-wrapper .dropbutton-single .dropbutton-action:focus,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-single .dropbutton-action a:hover,
#drupal-off-canvas-wrapper .dropbutton-single .dropbutton-action a:hover,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-single .dropbutton-action a:focus,
#drupal-off-canvas-wrapper .dropbutton-single .dropbutton-action a:focus {
  text-decoration: none;
  outline: none;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-widget .dropbutton,
#drupal-off-canvas-wrapper .dropbutton-widget .dropbutton {
  overflow: hidden;
  margin: 0;
  padding: 0;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton li,
#drupal-off-canvas-wrapper .dropbutton li,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton a,
#drupal-off-canvas-wrapper .dropbutton a {
  display: block;
  width: auto;
  padding: 4px 0;
  text-align: left;
  color: #555;
  outline: none;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton li:hover,
#drupal-off-canvas-wrapper .dropbutton li:hover,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton li:focus,
#drupal-off-canvas-wrapper .dropbutton li:focus,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton a:hover,
#drupal-off-canvas-wrapper .dropbutton a:hover,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton a:focus,
#drupal-off-canvas-wrapper .dropbutton a:focus {
  color: #333;
  outline: none;
  background: transparent;
}

/*
 * Style dropbutton multiple.
 */

#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple .dropbutton-widget,
#drupal-off-canvas-wrapper .dropbutton-multiple .dropbutton-widget {
  width: 2em;
  height: 2em;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple .dropbutton-widget:hover,
#drupal-off-canvas-wrapper .dropbutton-multiple .dropbutton-widget:hover {
  background-color: #2b8bd8;
}

/* Hide the other actions until the dropbutton is triggered. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple .dropbutton .secondary-action,
#drupal-off-canvas-wrapper .dropbutton-multiple .dropbutton .secondary-action {
  display: none;
}

/* The toggle to expand the button. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-toggle,
#drupal-off-canvas-wrapper .dropbutton-toggle {
  position: absolute;
  top: 0;
  right: 0; /* LTR */
  bottom: 0;
  display: block;
  width: 2em;
  white-space: nowrap;
  text-indent: 110%;
  color: #fff;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-toggle button,
#drupal-off-canvas-wrapper .dropbutton-toggle button {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border: 0 solid transparent;
  border-top-right-radius: 1em; /* LTR */
  border-bottom-right-radius: 1em; /* LTR */
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-toggle button:hover,
#drupal-off-canvas-wrapper .dropbutton-toggle button:hover,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-toggle button:focus,
#drupal-off-canvas-wrapper .dropbutton-toggle button:focus {
  outline: none;
}

/* The toggle arrow. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-arrow,
#drupal-off-canvas-wrapper .dropbutton-arrow {
  position: absolute;
  display: block;
  overflow: hidden;
  width: 0;
  height: 0;
  margin-top: 0;
  color: #fff;
  border-width: 0.3333em 0.3333em 0;
  border-style: solid;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  line-height: 0;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) span.dropbutton-arrow,
#drupal-off-canvas-wrapper span.dropbutton-arrow {
  top: 7px;
  right: 7px; /* LTR */
  background: transparent;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) span.dropbutton-arrow:hover,
#drupal-off-canvas-wrapper span.dropbutton-arrow:hover {
  background: transparent;
}

#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-action > .js-form-submit.form-submit,
#drupal-off-canvas-wrapper .dropbutton-action > .js-form-submit.form-submit,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-toggle button,
#drupal-off-canvas-wrapper .dropbutton-toggle button {
  position: relative;
  text-shadow: none;
}

/*
 * Dropbuttons when in a table cell.
 */

/* Make sure table cell doesn't collapse around absolute positioned dropbutton. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-single,
#drupal-off-canvas-wrapper td .dropbutton-single {
  min-width: 2em;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple,
#drupal-off-canvas-wrapper td .dropbutton-multiple {
  min-width: 2em;
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  border: 0;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple .dropbutton-action a,
#drupal-off-canvas-wrapper td .dropbutton-multiple .dropbutton-action a,
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple .dropbutton-action input,
#drupal-off-canvas-wrapper td .dropbutton-multiple .dropbutton-action input,
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple .dropbutton-action button,
#drupal-off-canvas-wrapper td .dropbutton-multiple .dropbutton-action button {
  width: auto;
  padding: 0;
  font-size: inherit;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-wrapper,
#drupal-off-canvas-wrapper td .dropbutton-wrapper {
  margin-bottom: 0;
}

/* Push the widget to the right so text expands left. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-widget,
#drupal-off-canvas-wrapper td .dropbutton-widget {
  position: absolute;
  right: 12px; /* LTR */
  padding: 0;
  background: #277abd none;
}

/* Push the wrapper to the right edge of the td. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-single,
#drupal-off-canvas-wrapper td .dropbutton-single,
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple,
#drupal-off-canvas-wrapper td .dropbutton-multiple {
  position: relative;
  float: right; /* LTR */
  min-width: initial;
  max-width: initial;
  margin-right: 0;
  padding-right: 0;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-widget .dropbutton,
#drupal-off-canvas-wrapper td .dropbutton-widget .dropbutton {
  overflow: hidden;
  width: 2em;
  height: 2em;
  margin: 0;
  background: transparent;
}

/* Push text out of the way. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple li,
#drupal-off-canvas-wrapper td .dropbutton-multiple li,
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple a,
#drupal-off-canvas-wrapper td .dropbutton-multiple a {
  margin-left: -9999px;
  background: transparent;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple.open .dropbutton li,
#drupal-off-canvas-wrapper td .dropbutton-multiple.open .dropbutton li,
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple.open .dropbutton a,
#drupal-off-canvas-wrapper td .dropbutton-multiple.open .dropbutton a {
  width: auto;
  margin-left: 0;
  color: #fff;
}

/* Collapse the button to a circle. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-toggle,
#drupal-off-canvas-wrapper td .dropbutton-toggle {
  width: 2em;
  height: 2em;
  border-radius: 1em;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button,
#drupal-off-canvas-wrapper td .dropbutton-wrapper .dropbutton-widget .dropbutton-toggle button {
  border: 0;
  background: transparent;
}

/* Prevent list item from expanding its container. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td ul.dropbutton li.edit,
#drupal-off-canvas-wrapper td ul.dropbutton li.edit {
  width: 2em;
  height: 2em;
}

/* Make li text transparent above icon so it's clickable. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-single li.edit.dropbutton-action > a,
#drupal-off-canvas-wrapper td .dropbutton-single li.edit.dropbutton-action > a {
  z-index: 1;
  color: transparent;
}

/* Put pencil icon in place of hidden 'edit' text on single buttons. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-single .edit:before,
#drupal-off-canvas-wrapper td .dropbutton-single .edit:before {
  display: block;
  content: ".";
  color: transparent;
  background: transparent url(../../../images/core/icons/ffffff/pencil.svg) no-repeat center;
  background-size: 14px;
}

/* Dropbutton when triggered expands to show secondary items. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open,
#drupal-off-canvas-wrapper .dropbutton-multiple.open {
  z-index: 100;
}

/* Create visual separation if there is an adjacent button. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open .dropbutton-widget,
#drupal-off-canvas-wrapper .dropbutton-multiple.open .dropbutton-widget {
  box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.5);
}

/* Triggered dropbutton expands to show secondary items. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open,
#drupal-off-canvas-wrapper .dropbutton-multiple.open,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open .dropbutton-widget,
#drupal-off-canvas-wrapper .dropbutton-multiple.open .dropbutton-widget {
  display: block;
  overflow: visible;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 0;
}

/* Triggered dropbutton in td expands to show secondary items. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple.open .dropbutton,
#drupal-off-canvas-wrapper td .dropbutton-multiple.open .dropbutton,
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open .dropbutton .secondary-action,
#drupal-off-canvas-wrapper .dropbutton-multiple.open .dropbutton .secondary-action {
  display: block;
  width: auto;
  height: auto;
  padding-right: 1em; /* LTR */
}
[dir="rtl"] #drupal-off-canvas:not(.drupal-off-canvas-reset) td .dropbutton-multiple.open .dropbutton,
#drupal-off-canvas-wrapper td .dropbutton-multiple.open .dropbutton {
  padding-right: inherit;
  padding-left: 1em;
}
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open .dropbutton li a,
#drupal-off-canvas-wrapper .dropbutton-multiple.open .dropbutton li a {
  padding: 2px 1em;
}

/* When open, the toggle arrow points upward. */
#drupal-off-canvas:not(.drupal-off-canvas-reset) .dropbutton-multiple.open span.dropbutton-arrow,
#drupal-off-canvas-wrapper .dropbutton-multiple.open span.dropbutton-arrow {
  top: 2px;
  border-top-color: transparent;
  border-bottom: 0.3333em solid;
}
