/*
 * Copyright (C) 2013 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#sources-panel-sources-view {
  flex: auto;
  position: relative;
}

#sources-panel-sources-view .sources-toolbar {
  display: flex;
  flex: 0 0 27px;
  background-color: var(--toolbar-bg-color);
  border-top: var(--divider-border);
  overflow: hidden;
  z-index: 0;
}

.sources-toolbar .toolbar {
  cursor: default;
}

.source-frame-debugger-script {
  background-color: rgb(255 255 194 / 50%); /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.-theme-with-dark-background .source-frame-debugger-script {
  background-color: #444;
}

@keyframes source-frame-value-update-highlight-animation {
  from {
    background-color: inherit;
    color: inherit;
  }

  10% {
    background-color: rgb(158 54 153); /* stylelint-disable-line plugin/use_theme_colors */
    /* See: crbug.com/1152736 for color variable migration. */
    color: #fff; /* stylelint-disable-line plugin/use_theme_colors */
    /* See: crbug.com/1152736 for color variable migration. */
  }

  to {
    background-color: inherit;
    color: inherit;
  }
}

.source-frame-value-update-highlight {
  animation: source-frame-value-update-highlight-animation 0.8s 1 cubic-bezier(0, 0, 0.2, 1);
  border-radius: 2px;
}

.diff-entry-insert .diff-marker {
  border-left: 4px solid hsl(144deg 55% 37% / 100%); /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.diff-entry-insert .CodeMirror-gutter-background {
  background-color: hsl(144deg 55% 49% / 20%); /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.diff-entry-modify .diff-marker {
  border-left: 4px solid #9c27b0; /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.diff-entry-modify .CodeMirror-gutter-background {
  background-color: rgb(186 104 200 / 20%); /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.diff-entry-delete .diff-marker {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #d32f2f; /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
  position: relative;
  top: 6px;
  cursor: pointer;
  left: 0;
}

.diff-entry-delete .CodeMirror-gutter-background {
  border-bottom: 2px solid #d32f2f; /* stylelint-disable-line plugin/use_theme_colors */
  /* See: crbug.com/1152736 for color variable migration. */
}

.CodeMirror-gutter-diff {
  width: 4px;
}

.highlight-line-modification {
  animation: source-line-modification-background-fadeout 0.4s 0s;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.highlight-line-modification span {
  animation: source-line-modification-foreground-fadeout 0.4s 0s;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

@keyframes source-line-modification-background-fadeout {
  from {
    background-color: rgb(158 54 153 / 50%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
  }

  50% {
    background-color: rgb(158 54 153 / 50%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
  }

  90% {
    background-color: rgb(158 54 153 / 0%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
  }
  to { background-color: transparent; }
}

@keyframes source-line-modification-foreground-fadeout {
  from {
    color: #fff; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
  }

  50% {
    color: #fff; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
  }
  90% { color: initial; }
  to { color: initial; }
}
