:root {
  --sb-main-font-family: "Source Sans Pro", sans-serif;
  --sb-main-bg-color: #222;
  --sb-main-fg-color: #fff;
  --sb-grey-bg-color: #333;
  --sb-grey-bg-active-color: #444;
  --sb-grey-fg-color: #999;
  --sb-red-bg-color: #cc1717;
  --sb-red-bg-active-color: #ec1c1c;
  --sb-skip-profile-bg: #292828;
  --sb-skip-profile-disabled: #808080;
  --sb-skip-profile-option-bg: #222;
  --sb-skip-profile-highlighted: rgb(127, 0, 0);
}

.prideTheme {
  --sb-main-fg-color: #fff;
  --sb-grey-bg-color: #008026;
  --sb-grey-bg-active-color: #FF8C00;
  --sb-grey-fg-color: #FFED00;
  --sb-red-bg-color: #732982;
  --sb-red-bg-active-color: #004CFF;
  --sb-skip-profile-bg: #FFAFC8;
  --sb-skip-profile-disabled: #74D7EE;
  --sb-skip-profile-option-bg: #f687aa;
  --sb-skip-profile-highlighted: #38153f;

  background: url("icons/pride.svg");
}

/*
 * Generic utilities
 */
.grey-text {
  color: var(--sb-grey-fg-color);
}
.white-text {
  color: var(--sb-main-fg-color);
}
.sbHeader {
  font-size: 20px;
  font-weight: bold;
  text-align: left;
  margin: 0;
}
#sponsorBlockPopupBody .u-mZ {
  margin: 0 !important;
  position: relative;
}

#sponsorBlockPopupBody .hidden, #sponsorBlockPopupBody .sbhidden {
  display: none !important;
}

/*
 * <button> elements that have icons
 */
 #setUsernameButton,
 #copyUserID,
 #submitUsername {
   color: var(--sb-main-fg-color);
   background: transparent;
   width: fit-content;
   padding: 0;
   border: none;
 }

/*
 * Main containers
 */
#sponsorBlockPopupHTML {
  color-scheme: dark;
  max-height: 600px;
  overflow-y: auto;
}

#sponsorBlockPopupBody {
  margin: 0;
  width: 374px;
  max-width: 100%; /* NOTE: Ensures content doesn't exceed restricted popup widths in Firefox */
  font-size: 14px;
  font-family: var(--sb-main-font-family);
  background-color: var(--sb-main-bg-color);
  color: var(--sb-main-fg-color);
  color-scheme: dark;
}

#sponsorblockPopup {
  text-align: center;
}

#sponsorblockPopup a,
#sponsorblockPopup button {
  cursor: pointer;
}

/*
 * Disable transition on all elements until the extension has loaded
 */
.sb-preload * {
  transition: none !important;
}

/*
 * Alert indicating that Beta server is enabled
 */
#sbBetaServerWarning {
  padding: 8px;
  font-size: 1em;
  font-weight: 700;
  color: var(--sb-main-fg-color);
  background-color: var(--sb-red-bg-color);
  cursor: pointer;
}

/*
 * Container when popup displayed in-page (content.ts)
 */
#sponsorBlockPopupContainer {
  position: relative;
  margin-bottom: 16px;
}

#sponsorBlockPopupContainer iframe {
  width: 100%;
}

/*
 * Disable popup max height when displayed in-page (content.ts)
 */
#sponsorBlockPopupContainer #sponsorBlockPopupHTML {
  max-height: none;
}

/*
 * Disable fixed popup width when displayed in-page (content.ts)
 */
#sponsorBlockPopupBody.is-embedded {
  width: auto;
}

/*
 * Close popup button when displayed in-page (top-right corner)
 */
.sbCloseButton {
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  position: absolute;
  top: 5px;
  right: 5px;
  opacity: 0.5;
  z-index: 1;
}

.sbCloseButton:hover {
  opacity: 1;
}

/*
 * Header logo
 */
.sbPopupLogo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  user-select: none;
  padding: 10px 0px 0px;
  font-size: 32px;
}
.sbPopupLogo img {
  margin: 8px;
}

#refreshSegmentsButton {
  display: flex;
  align-items: center;
  padding: 5px;
  margin: 5px auto;
}

#issueReporterImportExport {
  position: relative;
}

#refreshSegmentsButton, #issueReporterImportExport button {
  background: transparent;
  border-radius: 50%;
  border: none;
}

#refreshSegmentsButton:hover, #issueReporterImportExport button:hover {
  background-color: var(--sb-grey-bg-color);
}

#issueReporterImportExport button {
  padding: 5px;
  margin-right: 15px;
  margin-left: 15px;
}

#issueReporterImportExport img {
  width: 24px;
  display: block;
}

#importSegmentsText {
  margin-top: 7px;
}

#importSegmentsMenu button {
  padding: 10px;
}

/*
 * <details> wrapper around each segment
 */
.votingButtons {
  border-radius: 8px;
}
.votingButtons[open] {
  padding-bottom: 5px;
}
.votingButtons:hover {
  background-color: var(--sb-grey-bg-color);
}

/*
 * Nested chapters
 */ 
.innerChapterList {
  border-radius: 8px;
}

.innerChapterList > summary {
  font-weight: bold;
  padding: 4px;
  cursor: pointer;
}

.segmentWrapper:has(> .innerChapterList > summary:hover) {
  background-color: var(--sb-grey-bg-color);
}

.segmentWrapper{
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 8px;
  margin: 4px 16px;
}

/*
 * Individual segments summaries (clickable <summary>)
 */
.segmentSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  font-weight: bold;
  list-style: none;
  cursor: pointer;
  padding: 4px 8px;
}
.segmentSummary > div {
  text-align: left;
}

.segmentSummary::-webkit-details-marker {
  display: none !important;
}

.segmentActive {
  color: #bdfffb;
}

.segmentPassed {
  color: #adadad;
}

/*
 * Category dot in segment
 */
.sponsorTimesCategoryColorCircle {
  margin-right: 8px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
/*
 * Category name in segment
 */
.summaryLabel {
  overflow-wrap: break-word;
  white-space: normal;
}

.sbVoteButtonsContainer {
  text-align: right;
}

/*
 * "Voted!" text that appears after voting on a segment
 */
.sponsorTimesThanksForVotingText {
  font-size: large;
}

/*
 * Main controls menu
 */
.sbControlsMenu {
  margin: 16px;
  margin-top: 6px;
  border-radius: 8px;
  background-color: var(--sb-grey-bg-color);
  justify-content: space-evenly;
  display: flex;
  position: relative;
}
.sbControlsMenu-item {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background: transparent;
  user-select: none;
  cursor: pointer;
  border: none;
  flex: 1;
  padding: 10px 15px;
  transition: background-color 0.2s ease-in-out;
}
.sbControlsMenu-item:first-child {
  border-radius: 8px 0px 0px 8px;
}
.sbControlsMenu-item:last-child {
  border-radius: 0px 8px 8px 0px;
}
.sbControlsMenu-item:hover, .sbControlsMenu-item:focus {
  background-color: var(--sb-grey-bg-active-color) !important;
}
.sbControlsMenu-itemIcon {
  margin-bottom: 6px;
}

.prideTheme .sbControlsMenu-item:nth-child(1) {
  background-color: #750787;
}
.prideTheme .sbControlsMenu-item:nth-child(3) {
  background-color: #0035b1;
}
.prideTheme .sbControlsMenu-item:nth-child(4) {
  background-color: #008026;
}

/*
 * Whitelist add/remove icon
 */
.SBWhitelistIcon > path {
  fill: var(--sb-main-fg-color);
}
.SBWhitelistIcon.rotated {
  transform: rotate(45deg);
}
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/*
 * "Skipping is enabled" toggle
 */
.toggleSwitchContainer {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.toggleSwitchContainer-switch {
  display: flex;
  margin-bottom: 6px;
}
.switchBg {
  width: 50px;
  height: 23px;
  display: block;
  border-radius: 18.5px;
}
.switchBg.shadow {
  box-shadow: 0.75px 0.75px 10px 0px rgba(50, 50, 50, 0.5);
  opacity: 1;
}
.switchBg.white {
  opacity: 1;
  position: absolute;
  background-color: #ccc;
}
.switchBg.green {
  opacity: 0;
  position: absolute;
  background-color: #00a205;
  transition: opacity 0.2s ease-out;
}
.switchDot {
  width: 15px;
  margin: 4px;
  height: 15px;
  border-radius: 50%;
  position: absolute;
  transition: transform 0.2s ease-out;
  background-color: var(--sb-main-fg-color);
  box-shadow: 0.75px 0.75px 3.8px 0px rgba(50, 50, 50, 0.45);
}
#toggleSwitch:checked ~ .switchDot {
  transform: translateX(27px);
}
#toggleSwitch:checked ~ .switchBg.green {
  opacity: 1;
}
#toggleSwitch:checked ~ .switchBg.white {
  transition: opacity 0.2s step-end;
  opacity: 0;
}

/*
 * Notice that appears when whitelisting a channel, that recommends
 * enabling the "Force Channel Check Before Skipping" option
 */
#whitelistForceCheck {
  background-color: #fff3cd;
  padding: 10px 15px;
  display: block;
  color: #664d03;
}
#whitelistForceCheck:hover {
  background-color: #f2e4b7;
}

/*
 * Submit box
 */
#mainControls {
  margin: 16px;
  padding: 8px 14px;
  text-align: left;
  border-radius: 8px;
  border: 2px solid var(--sb-grey-bg-color);
}
.sponsorStartHint {
  display: block;
  text-align: left;
  padding-top: 3px;
}

/*
 * Generic red buttons used for "Start Segment Now", "Submit Times" etc.
 */
.sbMediumButton {
  border: none;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 28px;
  display: inline-block;
  -moz-border-radius: 28px;
  -webkit-border-radius: 28px;
  color: var(--sb-main-fg-color);
  transition: 0.01s background-color;
  font-family: var(--sb-main-font-family);
  background-color: var(--sb-red-bg-color);
}
.sbMediumButton:hover,
.sbMediumButton:focus {
  background-color: var(--sb-red-bg-active-color);
  outline: none;
}
.sbMediumButton:active {
  position: relative;
  top: 1px;
}
/*
 * "Submit Times" button
 */
#submitTimes {
  margin-top: 12px;
}

/*
 * Your Work box
 */
.sbYourWorkBox {
  margin: 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 2px solid var(--sb-grey-bg-color);
}
.sbYourWorkCols {
  display: flex;
  border-top: 2px solid var(--sb-grey-bg-color);
  border-bottom: 2px solid var(--sb-grey-bg-color);
}

.sbStatsSentence {
  padding: 6px 14px;
}

.sbExtraInfo {
  display: inline-block;
}

/*
 * Increase font size of username input and display
 */
#usernameValue,
#usernameInput {
  font-size: 16px;
  flex: 1 0;
}
#sponsorTimesContributionsDisplay {
  font-size: 16px;
}
 /*
 * Improve alignment of username and submissions
 */
#usernameElement > p,
#sponsorTimesContributionsContainer {
  text-align: left;
}

/*
 * Username
 */
#usernameElement {
  padding: 8px 14px;
  min-width: 50%;
  width: 100%;
}
#setUsernameContainer {
  display: flex;
  align-items: center;
  width: fit-content;
}
#setUsernameContainer > button {
  display: flex;
}
#setUsernameButton {
  margin-right: 5px;
  flex: 0 1;
}
#submitUsername {
  padding-left: 16px;
}
#copyUserID {
  width: 100%;
  flex: 0 1;
}
/*
 * Truncate username display
 */
#usernameValue {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  margin: 0 8px 0 0;
  max-width: 165px;
}
/*
 * Set username form container with "expanded" state
 */
#setUsername.SBExpanded {
  text-align: left;
}
/*
 * Set username input
 */
#usernameInput {
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  width: calc(100% - 68px);
  text-overflow: ellipsis;
  color: var(--sb-main-fg-color);
  background-color: var(--sb-grey-bg-color);
}

/*
 * Submissions
*/
#sponsorTimesContributionsContainer {
  padding: 8px 14px;
  border-left: 2px solid var(--sb-grey-bg-color);
}

/*
 * Footer
 */
#sbFooter {
  padding: 8px 0;
}
#sbFooter a {
  transition: background 0.3s ease !important;
  color: var(--sb-main-fg-color);
  display: inline-block;
  text-decoration: none;
  border-radius: 4px;
  background-color: #333;
  padding: 4px 8px;
  font-weight: 500;
  margin: 2px 1px;
}
#sbFooter a:hover {
  background-color: var(--sb-grey-bg-active-color) !important;
}

.prideTheme #sbFooter a:nth-of-type(1) {
  background-color: #E40303;
}
.prideTheme #sbFooter a:nth-of-type(2) {
  background-color: #FF8C00;
}
.prideTheme #sbFooter a:nth-of-type(3) {
  background-color: #b9ad00;
}
.prideTheme #sbFooter a:nth-of-type(4) {
  background-color: #008026;
}
.prideTheme #sbFooter a:nth-of-type(5) {
  background-color: #004DFF;
}
.prideTheme #sbFooter a:nth-of-type(6) {
  background-color: #750787;
}
.prideTheme #sbFooter a:nth-of-type(7) {
  background-color: #c7899d;
}
.prideTheme #sbFooter a:nth-of-type(8) {
  background-color: #65b8cb;
}
.prideTheme #sbFooter a:nth-of-type(9) {
  background-color: #613915;
}

#sponsorTimesDonateContainer a {
  color: var(--sb-main-fg-color);
  text-decoration: none;

  padding-left: 5px;
}

/*
 * "Show Notice Again" button
 */
#showNoticeAgain {
  background: transparent;
  border: 1px solid #fff;
  border-radius: 5px;
  color: var(--sb-main-fg-color);
  margin-bottom: 20px;
  padding: 5px;
}

#sponsorBlockPopupBody .u-mZ {
  margin: 0 !important;
}

#sponsorBlockPopupBody .u-mZ.cleanPopupMargin {
  margin-top: 10px !important;
}

#sponsorBlockPopupBody .hidden {
  display: none !important;
}

#issueReporterTabs {
  margin: 5px;
}

#issueReporterTabs > span {
  padding: 2px 4px;
  margin: 0 3px;
  cursor: pointer;
  background-color: #444848;
  border-radius: 10px;
}

#issueReporterTabs > span > span {
  position: relative;
  padding: 0.2em 0;
}

#issueReporterTabs > span > span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.1em;
  background-color: rgb(145, 0, 0);
  transition: transform 300ms;
  transform: scaleX(0);
  transform-origin: center;
}

#issueReporterTabs > span.sbSelected > span::after {
  transform: scaleX(0.8);
}

.sbPopupButton {
  width: 16px;
  fill: var(--sb-main-fg-color);
}

#skipProfileMenu {
  position: absolute;
  top: 80px;
  left: 50%;

  background-color: var(--sb-skip-profile-bg);
  border-radius: 10px;
  padding: 10px;

  transform: translateX(-50%);
}

#skipProfileActions {
  padding-top: 10px;
}

.skipOptionAction {
  transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
  font-size: 14px;
  padding: 5px;
  margin: 5px;

  background-color: var(--sb-skip-profile-option-bg);
  border-radius: 5px;

  cursor: help;
  user-select: none;

  border-color: transparent;
  border-width: 2px;
  border-style: solid;
}
.skipOptionAction:not(.highlighted, .disabled):hover {
  background-color: var(--sb-grey-bg-color);
}
.skipOptionAction.selected {
  border-color: var(--sb-red-bg-color);
}
.skipOptionAction.highlighted {
  border-color: var(--sb-skip-profile-highlighted);
}
.skipOptionAction:not(.highlighted, .disabled) {
  cursor: pointer;
}
.skipOptionAction.disabled {
  color: var(--sb-skip-profile-disabled);
}

.optionsSelector {
    background-color: #c00000;
    color: white;
    
    border: none;
    font-size: 14px;
    padding: 5px;
    border-radius: 5px;
}