/*
    forgejo:buttons
    Copyright 2014-2022 Mark Otto
    Copyright 2024 Tuxilio

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

:root {
  --background: #eee;
  --backgroundGradient: #fcfcfc;
  --border: #d5d5d5;
  --focusBackground: #ddd;
  --focusBorder: #ccc;
  --activeBackground: #dcdcdc;
  --activeBorder: #b5b5b5;
  --count: #333;
  --countBackground: #fafafa;
  --countBorder: #d4d4d4;
  --countFocusBackground: #0366d6;
}

body[data-theme="dark"] {
  --background: #0d0d0d;
  --backgroundGradient: #000000;
  --border: #404040;
  --focusBackground: #262626;
  --focusBorder: #333333;
  --activeBackground: #262626;
  --activeBorder: #4d4d4d;
  --count: #ffffff;
  --countBackground: #000000;
  --countBorder: #404040;
  --countFocusBackground: #1d85fc;
}

body {
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  background-color : transparent;
}
.forgejo-btn {
  height: 20px;
  overflow: hidden;
}
.f-btn,
.f-count,
.f-ico {
  float: left;
}
.f-btn,
.f-count {
  padding: 2px 5px 2px 4px;
  color: var(--count);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 3px;
}
.f-btn {
  background-color: var(--background);
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, var(--backgroundGradient)), to(var(--background)));
  background-image: linear-gradient(to bottom, var(--backgroundGradient) 0, var(--background) 100%);
  background-repeat: no-repeat;
  border: 1px solid var(--border);
}
.f-btn:hover,
.f-btn:focus {
  text-decoration: none;
  background-color: var(--focusBackground);
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, var(--background)), to(var(--focusBackground)));
  background-image: linear-gradient(to bottom, var(--background) 0,  100%);
  border-color: var(--focusBorder);
}
.f-btn:active {
  background-color: var(--activeBackground);
  background-image: none;
  border-color: var(--activeBorder);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15);
}
.f-ico {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  background: var(--icon-url) 0 0 / 100% 100% no-repeat;
}
.f-count {
  position: relative;
  display: none; /* hidden to start */
  margin-left: 4px;
  background-color: var(--countBackground);
  border: 1px solid var(--countBorder);
}
.f-count:hover,
.f-count:focus {
  color: var(--countFocusBackground);
}
.f-count::before,
.f-count::after {
  position: absolute;
  display: inline-block;
  width: 0;
  height: 0;
  content: "";
  border-color: transparent;
  border-style: solid;
}
.f-count::before {
  top: 50%;
  left: -3px;
  margin-top: -4px;
  border-width: 4px 4px 4px 0;
  border-right-color: var(--countBackground);
}
.f-count::after {
  top: 50%;
  left: -4px;
  z-index: -1;
  margin-top: -5px;
  border-width: 5px 5px 5px 0;
  border-right-color: var(--countBorder);
}
.forgejo-btn-large {
  height: 30px;
}
.forgejo-btn-large .f-btn,
.forgejo-btn-large .f-count {
  padding: 3px 10px 3px 8px;
  font-size: 16px;
  line-height: 22px;
  border-radius: 4px;
}
.forgejo-btn-large .f-ico {
  width: 20px;
  height: 20px;
}
.forgejo-btn-large .f-count {
  margin-left: 6px;
}
.forgejo-btn-large .f-count::before {
  left: -5px;
  margin-top: -6px;
  border-width: 6px 6px 6px 0;
}
.forgejo-btn-large .f-count::after {
  left: -6px;
  margin-top: -7px;
  border-width: 7px 7px 7px 0;
}
.no-text .f-ico {
  margin-right: 0;
}

.iframe {
  border: 'none';
}
