/** common definitions **/
:root {
  --darkglass-gradient-dark: repeating-linear-gradient(80deg,
      hsla(0, 0%, 0%, 0.4) 0% 5%,
      hsla(0, 0%, 15%, 0.5) 7%,
      hsla(0, 0%, 5%, 0.5) 9% 13%,
      hsla(0, 0%, 20%, 0.8) 16%,
      hsla(0, 0%, 0%, 0.4) 20% 25%,
      hsla(0, 0%, 15%, 0.6) 38%,
      hsla(0, 0%, 5%, 0.5) 42%,
      hsla(0, 0%, 0%, 0.4) 50%);
  --darkglass-gradient-gold: repeating-linear-gradient(120deg,
      hsla(40, 50%, 50%, 0.7),
      hsla(55, 92%, 86%, 0.7),
      hsla(41, 63%, 70%, 0.7),
      hsla(55, 92%, 86%, 0.7),
      hsla(41, 63%, 60%, 0.7),
      hsla(55, 89%, 85%, 0.7),
      hsla(38, 72%, 39%, 0.7));
  --darkglass-gradient-gold-dark: repeating-linear-gradient(100deg,
      hsla(40, 50%, 40%, 0.5) 0% 25%,
      hsla(55, 92%, 76%, 0.5) 35%,
      hsla(41, 63%, 33%, 0.5) 45% 55%,
      hsla(55, 89%, 75%, 0.5) 65%,
      hsla(38, 72%, 29%, 0.5) 75% 100%);
  --darkglass-gradient-silver: linear-gradient(110deg,
      hsla(249, 26%, 29%, 0.7),
      hsla(237, 13%, 73%, 0.7),
      hsla(195, 3%, 24%, 0.7),
      hsla(43, 7%, 79%, 0.7),
      hsla(348, 14%, 21%, 0.7));

  --darkglass-controls: hsla(200, 20%, 40%, 0.7);

  --darkglass-background: var(--darkglass-gradient-dark);
  --darkglass-background-attributes: var(--darkglass-gradient-gold);
  --darkglass-background-secondary-attributes: var(--darkglass-gradient-gold
      /*-dark*/
    );
  --darkglass-background-item-major: hsla(0, 0%, 5%, 1);
  --darkglass-background-item: hsla(230, 30%, 15%, 1);
  --darkglass-background-item-img: var(--darkglass-controls);
  --darkglass-background-select: hsla(0, 0%, 10%, 1);
  --darkglass-background-positive: hsla(160, 50%, 20%, 0.5);
  --darkglass-background-negative: hsla(300, 50%, 20%, 0.5);

  --darkglass-background-lighter: hsla(0, 0%, 100%, 0.2);
  --darkglass-background-input: hsla(230, 100%, 20%, 0.25);

  --darkglass-background-tooltip: hsla(207, 40%, 70%, 1);
  --darkglass-background-button: var(--darkglass-background-attributes);
  --darkglass-background-chat-button: hsla(47, 100%, 50%, 0.7);
  --darkglass-background-weapon: hsla(0, 0%, 80%, 0.3);

  --darkglass-tint-weapon-odd: hsla(230, 15%, 25%, 0.3);
  --darkglass-tint-weapon-even: hsla(230, 15%, 50%, 0.3);
  --darkglass-tint-weapon-hover: hsla(230, 40%, 50%, 0.4);
  --darkglass-tint-npc: hsla(90, 30%, 30%, 0.1);
  --darkglass-tint-hover: hsla(187, 100%, 80%, 0.9);

  --darkglass-color-highlight: hsla(210, 90%, 50%, 0.9);
  --darkglass-color-header: hsla(230, 50%, 70%, 0.7);
  --darkglass-color-font: hsla(40, 90%, 95%, 1);
  --darkglass-color-button: hsla(0, 90%, 10%, 1);
  --darkglass-color-border: var(--darkglass-controls);
  --darkglass-color-attribute:hsla(160, 80%, 20%, 1);
  --darkglass-color-secondary-attribute: hsla(160, 60%, 20%, 1);
  --darkglass-color-button-border: hsla(187, 70%, 50%, 0.5);
  --darkglass-color-border-light: hsla(0, 0%, 100%, 0.3);

  --darkglass-color-controls: hsla(200, 50%, 30%, 0.9);
  --darkglass-color-controls-disconnected: hsla(210, 10%, 50%, 0.5);
  --darkglass-color-controls-augmented: hsla(210, 90%, 60%, 1);
  --darkglass-color-controls-virtual: hsla(210, 90%, 90%, 1);
  --darkglass-shadow-section: inset 0px 12px 12px -8px var(--darkglass-color-border);
  --darkglass-shadow-anarchy-button: 3px -3px 6px -3px var(--darkglass-color-button-button);
  --darkglass-shadow-anarchy-input: 3px -3px 6px -3px var(--darkglass-color-button-button);
  --darkglass-shadow-button: 0px 0px 2px inset var(--darkglass-color-border);

  --darkglass-color-resource-checked: hsla(230, 60%, 60%, 0.8);
  --darkglass-color-monitor-checked: hsla(9, 60%, 50%, 0.8);
  --darkglass-color-unchecked: var(--darkglass-controls);
}

#gm-manager.style-darkglass {
  background: var(--darkglass-background);
  color: var(--darkglass-color-font);
}

.window-app .anarchy-dialog.style-darkglass::after,
.style-darkglass .window-content::after,
#gm-manager.style-darkglass::after {
  content: "";
  background: repeat center/50% url("background-texture.webp");
  opacity: 0.2;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;
}

#gm-manager.style-darkglass header {
  border-bottom: 1px solid var(--darkglass-color-border-light);
  color: var(--darkglass-color-font);
}

#gm-manager.style-darkglass label {
  color: var(--darkglass-color-font);
}

#gm-manager.style-darkglass .gm-difficulty-bar label {
  color: var(--darkglass-color-attribute);
}

#gm-manager.style-darkglass a:hover,
#gm-manager.style-darkglass a:hover label,
.style-darkglass :is(.anarchy-button, a.item-control, a.view-mode-control, .attribute-box, .a.click-checkbar-element):hover,
.style-darkglass :is(.anarchy-button, a.item-control, a.view-mode-control, .attribute-box, .a.click-checkbar-element):hover :is(i, label, a, img),
.style-darkglass .item :is(a:hover, a.item-controls:hover i, a:hover label) {
  color: var(--darkglass-color-highlight);
  text-shadow: 0 0 1px var(--darkglass-tint-hover);
}

.style-darkglass .window-content {
  background: var(--darkglass-background);
  color: var(--darkglass-color-font);
}

.style-darkglass .window-content form.npc-sheet {
  background: var(--darkglass-tint-npc);
}

.style-darkglass .vehicle-sheet .passport-img img {
  background-color: var(--darkglass-background-item-img);
}

.style-darkglass .device-sheet .passport-img img {
  background-color: var(--darkglass-background-item-img);
}


.style-darkglass nav.sheet-tabs .sheet-tab:not(.active) {
  color: var(--darkglass-color-header);
}

.style-darkglass nav.sheet-tabs .sheet-tab.active {
  background-color: var(--darkglass-shadow-section);
  border-bottom: none !important;
}


.style-darkglass nav.sheet-tabs .sheet-tab {
  border-top: 1px solid var(--darkglass-color-border);
  border-left: 1px solid var(--darkglass-color-border);
  border-right: 1px solid var(--darkglass-color-border);
  box-shadow: var(--darkglass-shadow-section);
}

.style-darkglass :is(.section-group, .roll-dialog div.roll-parameters div.parameter-category) {
  border-top: 1px solid var(--darkglass-color-border);
  box-shadow: var(--darkglass-shadow-section);
}

.style-darkglass .section-group h3,
.style-darkglass .section-group h2 {
  border-bottom: none;
  color: var(--darkglass-color-header);
}

.style-darkglass .attribute-box {
  background: var(--darkglass-background-attributes);
}

.style-darkglass .attribute-box :is(input, select, label, button) {
  color: var(--darkglass-color-attribute);
}

.style-darkglass .attribute-box input {
  background: var(--darkglass-background-lighter);
}

.style-darkglass .attribute-box.secondary-attribute :is(input, select, label, button) {
  color: var(--darkglass-color-secondary-attribute);
}

.style-darkglass .attribute-box.secondary-attribute {
  background: var(--darkglass-background-secondary-attributes);
}


.style-darkglass .anarchy-words {
  border-style: none;
}

.style-darkglass .anarchy-words input {
  background: var(--darkglass-background-item);
  border-style: none;
}

.style-darkglass div:is(.anarchy-keywords, .anarchy-dispositions, .anarchy-cues) {
  border: none;
  background-color: var(--transparent);
}

.style-darkglass .items-group div.item:is(.anarchy-skill, .anarchy-cyberdeck, .anarchy-shadowamp, .anarchy-quality) {
  background: var(--darkglass-background-item-major);
  border-style: none;
}

.style-darkglass .items-group div.item:is(.anarchy-gear, .anarchy-contact) {
  background: var(--darkglass-background-item);
  border-style: none;
}


/* Weapons lists */
.style-darkglass .weapon-list .weapon-header {
  background: var(--darkglass-background-item);
}

.style-darkglass .weapon-list .item:nth-child(even) {
  background: var(--darkglass-tint-weapon-even);
}

.style-darkglass .weapon-list .item:nth-child(odd) {
  background: var(--darkglass-tint-weapon-odd);
}

.style-darkglass .weapon-list .item:hover {
  background: var(--darkglass-tint-weapon-hover);
}

.style-darkglass div.anarchy-shortcut-button img,
.style-darkglass :is(div, li).item img {
  background: var(--darkglass-background-item-img);
}

.style-darkglass .items-group div.item.anarchy-quality.negative {
  background: var(--darkglass-background-negative);
}

.style-darkglass .items-group div.item.anarchy-quality.positive {
  background: var(--darkglass-background-positive);
}

.style-darkglass :is(input, select, label, button) {
  color: var(--darkglass-color-font);
}

.style-darkglass .window-content select option {
  background: var(--darkglass-background-select);
  color: var(--darkglass-color-font);
}

.style-darkglass .anarchy-button {
  background: var(--darkglass-background-button);
  color: var(--darkglass-color-button);
  border: 1px outset var(--darkglass-color-button-border);
  box-shadow: var(--darkglass-shadow-anarchy-button);
}

.style-darkglass a.anarchy-button,
.style-darkglass .anarchy-button label {
  color: var(--darkglass-color-font);
}

.style-darkglass .anarchy-button:active {
  border: 1px inset var(--darkglass-color-button-border);
  position: relative;
  top: -1px;
  left: -1px;
}

.chat-message .style-darkglass .anarchy-button {
  background: var(--darkglass-color-highlight);
  border: 1px outset var(--darkglass-color-button-border);
  box-shadow: var(--darkglass-shadow-button);
}

.chat-message .style-darkglass a.anarchy-button,
.chat-message .style-darkglass .anarchy-button label {
  color: var(--darkglass-color-button);
}

.chat-message .style-darkglass .anarchy-button:active {
  border: 1px inset var(--darkglass-color-button-border);
  position: relative;
  top: -1px;
  left: -1px;
}

.style-darkglass .tooltip .tooltip-roll-parameters {
  background: var(--darkglass-background-tooltip);
}

.style-darkglass a.favorite-control i {
  color: var(--darkglass-color-highlight);
}

.style-darkglass a.view-mode-control i,
.style-darkglass a.item-control i,
.style-darkglass a.item-control img {
  color: var(--darkglass-color-controls);
}
.style-darkglass a.item-control i.matrix-connectionMode-augmented {
  color: var(--darkglass-color-controls-augmented);
}
.style-darkglass a.item-control i.matrix-connectionMode-virtual {
  color: var(--darkglass-color-controls-virtual);
}
.style-darkglass a.item-control i.matrix-connectionMode-disconnected  {
  color: var(--darkglass-color-controls-disconnected);
}

.style-darkglass :is(div.checkbar-root[data-monitor-code='edge'],
  div.checkbar-root[data-monitor-code='credibility'],
  div.checkbar-root[data-monitor-code='rumor']) a.click-checkbar-element[data-checked=true] i {
  color: var(--darkglass-color-resource-checked);
}

.style-darkglass a.click-checkbar-element[data-checked=true] i {
  color: var(--darkglass-color-monitor-checked);
}

.style-darkglass a.click-checkbar-element[data-checked=false] i {
  color: var(--darkglass-color-unchecked);
}

.style-darkglass .roll-dialog div.roll-parameters div.parameter :is(select, input) {
  height: calc(100% - 2px);
  text-align: center;
  border: 1px inset var(--darkglass-color-border-light);
}  
.style-darkglass .roll-dialog div.roll-parameters div.parameter :is(select, input):not(:disabled) {
  border: 1px inset var(--darkglass-color-border);
  box-shadow: var(--darkglass-shadow-anarchy-input);
  background-color: var(--darkglass-background-input);
}

.style-darkglass .roll-dialog a.variable-dice-malus.active i {
  color: hsla(0, 100%, 50%, 0.9);
}
.style-darkglass .roll-dialog a.variable-dice-malus.inactive i {
  color: hsla(0, 60%, 50%, 0.8);
}
.style-darkglass .roll-dialog a.fixed-dice-malus.active i {
  color: hsla(20, 100%, 70%, 0.9);
}
.style-darkglass .roll-dialog a.fixed-dice-malus.inactive i {
  color: hsla(20, 60%, 50%, 0.8);
}
.style-darkglass .roll-dialog a.fixed-dice-bonus.active i {
  color: hsla(80, 100%, 70%, 0.9);
}
.style-darkglass .roll-dialog a.fixed-dice-bonus.inactive i {
  color: hsla(80, 60%, 50%, 0.8);
}
.style-darkglass .roll-dialog a.variable-dice-bonus.active i {
  color: hsla(100, 100%, 50%, 0.9);
}
.style-darkglass .roll-dialog a.variable-dice-bonus.inactive i {
  color: hsla(100, 60%, 50%, 0.8);
}
