/* Find functionality matches */
.code-input_find-and-replace_find-match {
  color: inherit;
  text-shadow: none!important;
  background-color: #ffff00!important;
}
.code-input_find-and-replace_find-match-focused, .code-input_find-and-replace_find-match-focused * {
  background-color: #ff8800!important;
  color: black!important;
}
.code-input_find-and-replace_start-newline::before {
  content: "⤶";
}

/* Find-and-replace dialog */

@keyframes code-input_find-and-replace_roll-in {
    0% {opacity: 0; transform: translateY(-34px);}
    100% {opacity: 1; transform: translateY(0px);}
}

@keyframes code-input_find-and-replace_roll-out {
    0% {opacity: 1;top: 0;}
    100% {opacity: 0;top: -34px;}
}

.code-input_find-and-replace_dialog {
  position: absolute;
  top: 0;
  right: 14px;
  padding: 6px;
  padding-top: 8px;
  border: solid 1px #00000044;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 .2em 1em .2em rgba(0, 0, 0, 0.16);
}

.code-input_find-and-replace_dialog:not(.code-input_find-and-replace_hidden-dialog) {
  animation: code-input_find-and-replace_roll-in .2s;
  opacity: 1;
  pointer-events: all;
}

.code-input_find-and-replace_dialog.code-input_find-and-replace_hidden-dialog {
  animation: code-input_find-and-replace_roll-out .2s;
  opacity: 0;
  pointer-events: none;
}

.code-input_find-and-replace_dialog input::placeholder {
  font-size: 80%;
}

.code-input_find-and-replace_dialog input {
  position: relative;
  width: 240px; height: 32px; top: -3px;
  font-size: large;
  color: #000000aa;
  border: 0;
}

.code-input_find-and-replace_dialog input:hover {
  outline: none;
}

.code-input_find-and-replace_dialog input.code-input_find-and-replace_error {
  color: #ff0000aa;
}

.code-input_find-and-replace_dialog button, .code-input_find-and-replace_dialog input[type="checkbox"] {
  display: inline-block;
  line-height: 24px;
  font-size: 22px;
  cursor: pointer;
  appearance: none;
  width: min-content;
  
  margin: 5px;
  padding: 5px;
  border: 0;
  background-color: #dddddd;
  
  text-align: center;
  color: black;
  vertical-align: top;
}

.code-input_find-and-replace_dialog input[type="checkbox"].code-input_find-and-replace_case-sensitive-checkbox::before {
  content: "Aa";
}
.code-input_find-and-replace_dialog input[type="checkbox"].code-input_find-and-replace_reg-exp-checkbox::before {
  content: ".*";
}

.code-input_find-and-replace_dialog button:hover, .code-input_find-and-replace_dialog input[type="checkbox"]:hover {
  background-color: #bbbbbb;
}

.code-input_find-and-replace_dialog input[type="checkbox"]:checked {
  background-color: #222222;
  color: white;
}

.code-input_find-and-replace_match-description {
  display: block; /* So not on same line as other */
  color: #444444;
}

.code-input_find-and-replace_dialog details summary, .code-input_find-and-replace_dialog button {
  cursor: pointer;
}


.code-input_find-and-replace_dialog button.code-input_find-and-replace_button-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Cancel icon */
.code-input_find-and-replace_dialog span {
  display: block;
  float: right;
  margin: 5px;
  padding: 5px;

  width: 24px;
  line-height: 24px;
  font-family: system-ui;
  font-size: 22px;
  font-weight: 500;
  text-align: center;
  border-radius: 50%;
  color: black;
  opacity: 0.6;
}

.code-input_find-and-replace_dialog span:before {
  content: "\00d7";
}

.code-input_find-and-replace_dialog span:hover {
  opacity: .8;
  background-color: #00000018;
}
