/* ----------------------------------------- */
/* General??                                 */
/* ----------------------------------------- */
[data-theme] {
  &.monks-active-tiles.sheet .items-list .item-header {
    border: none;
    background: none;
  }
}

/* ----------------------------------------- */
/* Monk's Common Display                     */
/* ----------------------------------------- */

#common-display-toolbar.dorako-ui {
  @include glass;
  .move-handle {
    @include glass;
    border-radius: 5px 0px 0px 5px;
  }
  .common-display-button.small {
    @include glass;
    @include quick-transition;
    text-shadow: 0px 0px 3px black;

    &:hover {
      background-color: var(--primary);
    }
  }

  .common-display-button.toggle {
    @include glass;
    @include quick-transition;
    background-color: var(--secondary-dark);
    text-shadow: 0px 0px 3px black;
    &:hover,
    &.active {
      @include glass;
      background-color: var(--secondary-light);
    }
  }
}

/* ----------------------------------------- */
/* Monk's Player Settings                    */
/* ----------------------------------------- */

#client-settings.dorako-ui.dark-theme #mps-view-group {
  border-bottom: 1px solid var(--tertiary);
}

/* ----------------------------------------- */
/* Monk's tokenbar                           */
/* ----------------------------------------- */

[data-theme].chat-message {
  .monks-tokenbar.chat-card .card-header,
  .monks-tokenbar.chat-card .card-footer {
    border: none;
  }
}

#tokenbar[data-theme] {
  .bar-controls {
    @include dui-app;
    div#tokenbar-move-handle {
      background: unset;
    }
  }
  .token-list {
    border: unset;
    gap: 5px;
    .token {
      @include dui-app;
      .tooltip {
        background: var(--app-background);
        border: 1px solid var(--color-primary-1);
        box-shadow: 0px 0px 6px var(--color-primary-2), 0px 2px 8px 1px var(--color-primary-3);
        backdrop-filter: blur(5px);
        border-radius: var(--border-radius);
        -webkit-backdrop-filter: blur(5px);
        font-size: var(--font-size-16);
        line-height: var(--font-size-16);
        text-shadow: 0px 1px 2px black;
        padding: 0.3em 0.6em;
      }
      .token-stats {
        background: unset;
      }
      .token-icon {
        box-shadow: unset;
      }
    }
  }
}

[data-theme] {
  &#requestsavingthrow .request-grid > div {
    @include dui-button;
    text-align: center;
  }
  &#requestsavingthrow .request-grid {
    gap: 6px;
    grid-template-columns: 31% 31% 31%;
  }
  .monks-tokenbar .sheet .items-list .items-header {
    background: unset;
    border: unset;
  }
  .monks-tokenbar .sheet .items-list .item {
    border: unset;
  }
  .monks-tokenbar:not(.editstats) .sheet input[type="text"],
  .monks-tokenbar .sheet input[type="number"] {
    @include dui-input;
  }
  &#assignexperience .sheet .sheet-navigation {
    margin: unset;
    font-family: var(--sans-serif);
    font-weight: unset;
  }
  .request-roll {
    padding-left: 2px;
  }
}

/* ----------------------------------------- */
/* Monk's little details                     */
/* ----------------------------------------- */

#chat-log .message.round-marker {
  border-bottom: 1px solid var(--tertiary) !important; // is 'important' in source
}

#darkness-progress > div > div {
  background-color: var(--primary-light);
}

.dorako-ui {
  &#token-hud.monks-little-details .status-effects .effect-control,
  &#token-hud.monks-little-details .status-effects .pf2e-effect-control {
    border-radius: unset;
  }

  #token-hud.placeable-hud.monks-little-details .status-effects {
    grid-template-columns: 90px 90px 90px 90px !important;
    background: none;

    .effect-control {
      border: none;
      opacity: unset;

      &.active {
        border: none;
        opacity: 1;
        background-color: var(--secondary-light);

        .effect-name {
          color: white;
          opacity: unset;
        }
      }

      img {
        border-radius: 4px 0px 0px 4px;

        &::before {
          @include quick-transition;
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          box-shadow: 0px 0px 1px var(--tertiary);
          border-radius: 4px 0px 0px 4px;
          overflow: hidden;
          pointer-events: none;
        }
      }
    }

    .effect-name {
      opacity: unset;
      padding-right: 4px;
      color: var(--color-text-light-heading);
      font-size: var(--font-size-12);
    }
  }
}

[data-theme] {
  &#token-hud.monks-little-details .status-effects {
    gap: 5px;
  }

  &#token-hud.monks-little-details .status-effects .effect-control.active,
  &#token-hud.monks-little-details .status-effects .pf2e-effect-control.active {
    border: unset;
  }

  picture {
    opacity: 1 !important;
    left: -1px;
    top: -1px;
    position: relative;
  }

  #token-hud .status-effects .effect-control .badge {
    border-top: unset;
    border-right: unset;
    width: 18px;
    right: 0px;
  }
}

body.system-pf2e #token-hud.monks-little-details[data-theme] .status-effects .effect-control {
  @include dui-button;
}

/* ----------------------------------------- */
/* Monk's hotbar expansion                   */
/* ----------------------------------------- */

#hotbar .action-bar.no-arrows + .bar-controls span.page-number,
#hotbar .hotbar-page .hotbar-page-row .bar-controls span.page-number,
#hotbar .hotbar-page .hotbar-page-row .bar-controls i {
  line-height: 52px;
}

#hotbar .hotbar-page .hotbar-page-row.selected .bar-controls .page-number {
  color: var(--tertiary-dark);
}

[data-tooltip="MonksHotbarExpansion.clear-row"] {
  @include quick-transition;
  &:hover {
    i {
      text-shadow: 0 0 8px var(--color-shadow-primary);
    }
  }
}

.hotbar-page .page-number {
  @include quick-transition;
  &:hover {
    text-shadow: 0 0 8px var(--color-shadow-primary);
  }
}

#hotbar[data-theme] {
  // width: 647px;

  .hotbar-page {
    overflow: visible;
    gap: 4px;
    bottom: 56px;

    .macro-list {
      gap: 7px;
      border: none;
    }

    .action-bar {
      margin: 0px 5px 0px 3px;
    }
  }
}

/* ----------------------------------------- */
/* Monk's Sound Enhancements                 */
/* ----------------------------------------- */
[data-theme] {
  &.sheet .sound-sheet .items-list .items-header {
    border: unset;
  }
  &.sheet .sound-sheet .items-list .item {
    border-bottom: 1px solid var(--color-secondary-4);
  }
  &.sheet .sound-sheet .items-list .item .item-name {
    color: var(--text-color-3);
  }
}

/* ----------------------------------------- */
/* Monk's Enhanced Journal                   */
/* ----------------------------------------- */

// .dorako-ui.dark-theme {
//   &.monks-journal-sheet.sheet .items-list .item .item-name,
//   .monks-journal-sheet.sheet .items-list .item .item-name {
//     color: var(--body);
//   }
//   &.monks-journal-sheet.sheet .items-list,
//   .monks-journal-sheet.sheet .items-list {
//     color: var(--color-text-light-heading-highlight);
//   }
//   &.monks-journal-sheet.sheet .items-list .items-header,
//   .monks-journal-sheet.sheet .items-list .items-header {
//     @include glass;
//     background: var(--glass-bg-light);
//     color: var(--tertiary);
//   }
//   &.monks-journal-sheet.sheet .sheet-navigation,
//   .monks-journal-sheet.sheet .sheet-navigation {
//     @include glass;
//     background: var(--glass-bg-light);
//     // color: var(--tertiary);
//     // text-shadow: 0px 0px 10px var(--tertiary);
//   }
//   &.monks-enhanced-journal footer,
//   &.monks-enhanced-journal .mainbar .navigation {
//     @include glass;
//     background: var(--glass-bg-light);
//   }
//   &.monks-enhanced-journal .mainbar .navigation .nav-button,
//   &.monks-enhanced-journal footer.navigation .nav-button {
//     @include glass;
//     @include quick-transition;
//     text-shadow: 0px 0px 3px black;
//     color: var(--color-text-light-heading);
//     &:hover {
//       background-color: var(--primary);
//       color: var(--color-text-light-highlight);
//     }
//   }

//   .monks-enhanced-journal.request-item .request-buttons {
//     gap: 5px;
//     button {
//       @include glass;
//       @include quick-transition;
//       text-shadow: 0px 0px 3px black;
//       color: var(--color-text-light-heading);
//       &:hover {
//         background-color: var(--primary);
//         color: var(--color-text-light-highlight);
//       }
//       &.request-accept:hover {
//         background-color: green;
//       }
//     }
//   }
// }

// .system-pf2e .monks-enhanced-journal.request-item.item-card {
//   height: unset;
//   padding: unset;
// }

// // Player point-of-view
// .monks-journal-sheet.sheet .person-container,
// .monks-journal-sheet.sheet .place-container,
// .monks-journal-sheet.sheet .quest-container,
// .monks-journal-sheet.sheet .organization-container,
// .monks-journal-sheet.sheet .shop-container,
// .monks-journal-sheet.sheet .loot-container,
// .monks-journal-sheet.sheet .poi-container,
// .monks-journal-sheet.sheet .event-container {
//   @include sheet;
//   box-shadow: 0 0 0 1px var(--gold-brown) inset, 0 0 0 2px var(--tertiary) inset;
// }

// .monks-enhanced-journal.request-item img {
//   @include gold-border;
//   border-radius: 3px;
//   object-fit: contain;
//   background-color: white;
// }

// .monks-journal-sheet.sheet .sheet-navigation,
// .monks-journal-sheet.sheet .sheet-header .header-details {
//   font-family: var(--font-primary);
//   font-size: var(--font-size-14);
// }

// .monks-journal-sheet.sheet .editor  {
//   padding: 5px;
// }

// .monks-journal-sheet.sheet .editor-parent {
//   padding: 5px;
// }

// #MonksEnhancedJournal.window-app .window-content {
//   // The div only affects the 'GM' view with all the chrome, the class would also remove the background when a non-GM accesses the journal
//   padding: 0px;
//   background: none;
//   box-shadow: none;
//   border-radius: 0px 0px 0px 5px;
// }
// .monks-enhanced-journal .directory-sidebar {
//   background: var(--glass-bg);
//   background: none;
//   border: none;
//   box-shadow: 0px 0px 2px 1px rgb(0 0 0), 0px 0px 5px 0px rgb(0 0 0 / 50%);
//   box-shadow: none;
//   color: var(--color-text-light-highlight);
// }

// #journal-directory .noborder,
// #journal-directory .document-name {
//   font-weight: 400;
// }

// .monks-enhanced-journal .body {
//   @include sheet;
//   margin: unset; // messes with box-sizing
//   border-radius: 0px 10px 0px 0px;
//   box-shadow: 0 0 0 1px var(--gold-brown) inset, 0 0 0 2px var(--tertiary) inset;
// }

// .monks-enhanced-journal .collapse {
//   .body {
//     border-radius: 0px;
//   }
//   .directory-sidebar {
//     box-shadow: none;
//   }
// }

// .monks-enhanced-journal .collapse .tab-bar .tab-button.sidebar-toggle {
//   color: var(--color-text-dark-primary);
// }

// .monks-enhanced-journal .tab-bar .tab-button.sidebar-toggle {
//   color: var(--color-text-light-highlight);
//   padding-top: 5px;
// }

// #journal-directory .directory-header {
//   padding-top: 5px;
// }

// #MonksEnhancedJournal .sheet.journal-entry:not(.premium) .journal-entry-content {
//   @include sheet;
//   box-shadow: var(--gold-and-glow), 0px 5px 6px rgba(0, 0, 0, 0.5);
// }

// #MonksEnhancedJournal .sheet.journal-entry:not(.premium).dark-theme .journal-entry-content {
//   --sheet: var(--sheet-dark);
// }

// #MonksEnhancedJournal .journal-entry:not(.premium) .journal-sheet-container .sidebar.directory {
//   background: var(--glass-bg);
//   box-shadow: var(--glassy);
// }

// #journal-directory li.folder.collapsed > .folder-header:not(.customcolor),
// #journal-directory li.folder.collapsed > .folder-header .create-folder,
// #journal-directory li.folder.collapsed > .folder-header .create-document {
//   color: var(--color-text-light-highlight);
// }

// #journal-directory li.folder.collapsed .folder-header.customcolor {
//   color: var(--color-text-light-highlight);
// }

// #journal-directory li.document .document-name {
//   color: var(--color-text-light-highlight);
// }

// #MonksEnhancedJournal .sheet.journal-entry:not(.premium) .journal-entry-content {
//   border-radius: 10px;
//   margin: 10px 12px;
//   height: calc(100% - 20px);
// }

// #journal-directory li.journalentry,
// #journal-directory li.journalentrypage {
//   border-left: none;
// }

// #MonksEnhancedJournal .sheet.journal-entry .scrollable {
//   padding-right: unset;
// }

// .monks-enhanced-journal .content {
//   margin-left: 2px;
// }

// .monks-enhanced-journal.dorako-ui.dark-theme.window-app .window-content {
//   background: unset;
//   box-shadow: unset;
// }

// .dorako-ui.dark-theme.monks-enhanced-journal footer,
// .dorako-ui.dark-theme.monks-enhanced-journal .mainbar .navigation {
//   margin: 0px 3px;
//   padding-left: 4px;
//   margin-bottom: 3px;
//   border-radius: 0px;
// }
// .dorako-ui.dark-theme.monks-enhanced-journal footer {
//   margin-bottom: 3px;
// }

// .monks-enhanced-journal footer,
// .monks-enhanced-journal .mainbar .navigation {
//   background-color: var(--bg);
//   box-shadow: 0 2px 4px rgb(0 0 0 / 18%);
//   border: 1px solid var(--color-border-light-primary);
//   border-left: none;
//   border-right: none;
//   margin-left: 1px;
//   margin-right: 1px;
// }

// .monks-enhanced-journal footer {
//   box-shadow: 0 -2px 4px rgb(0 0 0 / 18%);
//   border-bottom: none;
//   margin-bottom: 1px;
//   border-radius: 0px 0px 0px 5px;
// }

// .monks-journal-sheet.sheet .sheet-navigation {
//   background-color: var(--bg);
//   box-shadow: 0 2px 4px rgb(0 0 0 / 18%);
//   border: 1px solid var(--color-border-light-primary);
//   border-radius: 3px;
//   margin: 5px;
//   margin-left: 0px;
//   margin-right: 8px;
// }

// .monks-journal-sheet.sheet .sheet-navigation .item {
//   @include quick-transition;
//   border: none;
//   &:hover,
//   &.active {
//     border: none;
//     color: var(--secondary-light);
//     text-shadow: 0px 0px 10px;
//   }
// }

// .dorako-ui.dark-theme .monks-journal-sheet.sheet .sheet-navigation .item {
//   &:hover,
//   &.active {
//     color: var(--tertiary);
//     text-shadow: 0px 0px 10px;
//   }
// }

// .monks-journal-sheet.sheet .items-list .item .item-name .item-image {
//   @include gold-border;
//   background-color: var(--bg);
//   border-radius: 3px;
//   margin-right: 5px;
// }

// .monks-enhanced-journal .mainbar > div {
//   border: none;
// }

// .monks-enhanced-journal .tab-bar .journal-tab {
//   border-top-left-radius: 3px;
//   border-top-right-radius: 3px;
// }

// .monks-enhanced-journal .bookmark-bar .bookmark-button.add-bookmark {
//   @include glass;
//   @include quick-transition;
//   color: var(--color-text-light-heading);
//   text-shadow: 0px 0px 3px black;
//   &:hover {
//     background: var(--primary);
//     color: var(--color-text-light-heading);
//   }
// }

// .monks-enhanced-journal .mainbar .bookmark-bar {
//   margin-left: 8px;
//   margin-bottom: 5px;
//   column-gap: 8px;
//   row-gap: 4px;
//   .bookmark-button {
//     margin-left: unset;
//     padding: unset;
//     text-align: center;

//     > div {
//       @include glass;
//       @include quick-transition;
//       padding: 0px 5px;
//       color: var(--color-text-light-heading);
//       text-shadow: 0px 0px 3px black;
//       &:hover {
//         background: var(--primary);
//         color: var(--color-text-light-highlight);
//       }
//     }
//   }
// }

// .monks-enhanced-journal .mainbar .tab-row {
//   margin: 5px;
//   gap: 10px;

//   .tab-button {
//     @include glass;
//     @include quick-transition;
//     opacity: unset;
//     color: var(--color-text-light-heading);
//     text-shadow: 0px 0px 3px black;
//     &:hover {
//       background: var(--primary);
//       color: var(--color-text-light-highlight);
//     }
//   }
//   .close {
//     margin-left: 5px;
//   }
//   .journal-tab {
//     @include glass;
//     @include quick-transition;
//     text-shadow: 0px 0px 3px black;
//     color: var(--color-text-light-heading);
//     background-color: var(--secondary);
//     padding: 5px 10px;

//     &.active,
//     &:hover {
//       background: var(--secondary-light);
//       color: white;
//     }

//     &.active {
//       box-shadow: var(--gold-and-glow), var(--glassy);
//     }
//   }
// }

// section.readaloud {
//   background: var(--tertiary);
//   color: var(--color-text-dark-primary);
// }

// .monks-journal-sheet.sheet .sheet-header .sheet-image,
// .monks-journal-sheet.sheet header.sheet-header {
//   border: none;
// }

// .monks-journal-sheet.sheet .sheet-header .sheet-image {
//   @include gold-border-shadow;
//   background-color: var(--bg);
//   margin-right: 10px;
//   border-radius: 5px;
//   img {
//     border-radius: 5px;
//   }
// }

// .monks-journal-sheet.sheet .items-list .item {
//   border: solid transparent;
//   border-image: linear-gradient(90deg, #f1edea, #d5cac1) 1 repeat;
//   border-width: 0 0 1px;
// }
// .dorako-ui.dark-theme .monks-journal-sheet.sheet .items-list .item {
//   border-image: linear-gradient(90deg, rgba(241, 237, 234, 0), black) 1;
// }

// #journal-directory .directory-item.journalentry .permissions {
//   background-color: var(--glass-bg-light);
//   box-shadow: var(--glassy);
//   > div {
//     color: var(--tertiary);
//     box-shadow: var(--gold-and-glow), 0px 1px 3px black;
//     margin-top: 1px;
//   }
// }

/* ----------------------------------------- */
/* Monk's Scene Navigation                   */
/* ----------------------------------------- */

body.compact-ui #navigation[data-theme] .monks-scene-navigation #nav-toggle {
  display: unset;
}

[data-theme] {
  &#navigation .nav-item-container {
    @include dui-app;
    #nav-toggle {
      box-shadow: unset;
      border: unset;
      background: unset;
      height: unset;
      flex: unset;
    }
  }

  &#navigation .monks-scene-navigation .scene-list > li {
    a {
      @include dui-button;
    }

    &.gm a {
      @include dui-button-toggle;
    }

    a.folder-name {
      --app-border-width: 2px;
    }

    &.view a {
      --dui-button-background: var(--color-primary-2);
      --dui-button-border-color: var(--color-primary-1);
    }
  }

  &#navigation .monks-scene-navigation .scene-list > li.active a {
    outline: 1px solid var(--tertiary);
  }

  &#navigation.background .monks-scene-navigation .scene-list {
    @include dui-app;
    --app-border-width: 2px;
    gap: 5px;
  }
}

/* ----------------------------------------- */
/* Monk's Active Tile Triggers               */
/* ----------------------------------------- */
[data-theme] {
  .monks-active-tiles.sheet .items-list .items-header,
  &.monks-active-tiles.sheet .items-list .items-header {
    background: unset;
    border: unset;
    // @include dui-app;
    // border-color: var(--color-secondary-3);
    .item-controls {
      color: var(--text-color-3);
    }
  }

  .monks-active-tiles.sheet .items-list .items-header h3,
  &.monks-active-tiles.sheet .items-list .items-header h3 {
    font-family: Signika, sans-serif;
  }

  &#trigger-action .files-list .items-header .item-controls,
  &#trigger-action .buttons-list .items-header .item-controls,
  &.monks-active-tiles .files-list .items-header .item-controls {
    color: var(--text-color-2);
  }

  &.monks-active-tiles .file-list {
    color: var(--text-color-3);
  }

  &.monks-active-tiles.sheet .items-list,
  &#trigger-action .items-list li a,
  &.monks-active-tiles .file-list li a {
    color: var(--text-color-3);
  }
  &#trigger-action .file-list li,
  &.monks-active-tiles.sheet .file-list li.item {
    border-color: var(--color-secondary-3);
  }

  &.action-sheet .display-value {
    @include dui-input;
  }

  &.monks-active-tiles.sheet .items-list .item-controls a {
    @include dui-button;
  }

  &.monks-active-tiles.sheet .items-list .item .item-name {
    color: var(--text-color-3);
  }
}

[data-theme]:not([data-color-scheme="light"]) {
  &.monks-active-tiles div[data-tab="triggers"] .action-items .action-style {
    color: #fafafa;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .filter-style {
    color: #f73458;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .logic-style {
    color: #2b40f8;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .entity-style {
    color: #a9a9a9;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .details-style {
    color: #a326fc;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .value-style {
    color: #515151;
  }

  &.monks-active-tiles div[data-tab="triggers"] .action-items .tag-style {
    color: #063d68;
  }
}
