$enable-rounded: false;

// @import "~bootstrap/scss/bootstrap"; // node_modules bootstrap
@import "./custom-bootstrap.scss"; // using custom version instead so we can point to modified versions that are tracked in our repo

$fa-font-path: "~@fortawesome/fontawesome-free/webfonts/";
@import "~@fortawesome/fontawesome-free/scss/fontawesome.scss";
@import "~@fortawesome/fontawesome-free/scss/solid.scss";

$blue-lighter-1: #0f5c9e;
$blue-lighter-2: #237cca;
$blue-lighter-3: #3394ea;

// legacy
// .main-container {
//   height: calc(100vh - 85px);
//   display: flex;
//   // margin-top: 85px;
// }

// #dynamic-xbrl-form {
//   content-visibility: auto;
//   height: 100%;
//   overflow: auto;
//   padding: 0 15px !important;
// }

// #fact-table-container {
//   height: calc(100vh - 85px);
//   z-index: 100;
// }

// #facts-breakdown-container {
//   height: calc(100vh - 85px);
//   z-index: 100;
// }

// reset
*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .collapsing {
      transition-property: height, visibility;
      transition-duration: .6s;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .collapsing {
      transition-property: height, visibility;
      transition-duration: .6s;
  }
}

b, strong {
  font-weight: bold;
}
.ix-medium-heading {
  font-size: 1.25rem;
}
.h5-override {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 500;
}
.h6-override {
  // font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 500;
}

hr {
  opacity: 1;
}
.py-dot-7 {
  padding-top: .7rem;
  padding-bottom: .7rem;
}

#menuContents a:active {
  background-color: #bbe6ff;
}

#sections-menu * {
  font-size: .9rem;
}
#sections-menu .sections-header-label {
  font-size: 1.2rem;
}
h5.sections-header-label {
  margin: .5rem 0;
}
.sections-settings-btn {
  padding: 4px 10px;
  margin-left: 10px;
}
.sections-settings-btn.show {
  padding: 4px 10px;
  margin-left: 10px;
  border-color: rgba(0, 0, 0, 0.176)
}
.sections-header {
  padding-bottom: 0.5rem;
}
.menu-cat-header * {
  border: none !important;
}
.no-border {
  border: none !important;
}
.menu-cat {
  position: relative;
}
.menu-cat:not(:last-child) > .menu-cat-header:before {
  content: "";
  position: absolute;
  left: 2.5%;
  top: 36px;
  height: 1px;
  width: 95%;
  border-bottom: 1px solid #d8dac8;
}
.menu-cat:last-child > .menu-cat-body:before {
  content: "";
  position: absolute;
  left: 2.5%;
  top: 36px;
  height: 1px;
  width: 95%;
  border-bottom: 1px solid #d8dac8;
}
.menu-cat:hover {
  background-color: #f6f9e8;
}
.menu-cat-name {
  font-weight: bold;
}
.menu-cat, .menu-cat-header button {
  width: 100%;
  text-align: left;
}
span.open-indicator {
  color: #979797;
  margin-right: 10px;
}
.menu-cat-header:hover span.open-indicator {
  color: #777;
}
.menu-cat-body {
  padding: 4px 24px;
  width: 100%;
  text-align: left;
}
.section-active {
  box-shadow: rgba(0,0,0,.3) 2px 2px 4px;
  transition: all .5s;
  border: 1px solid #2e88d9;
  border-top: 1px solid #2e88d9 !important;
}
.section-not-active {
  box-shadow: rgba(0,0,0,.3) 0px 0px 0px;
  transition: all .5s;
}
.section-link {
  margin-bottom: 10px;
}
.section-link:hover {
  // background-color: #eee;
  text-decoration: underline;
}
.section-instance-header .badge {
  color: #427ab1;
  font-size: 14px;
  font-weight: 400;
}
div#tagged-sections button.section-instance-header {
  background-color: #cef3ff;
}
div#tagged-sections .section-active button.section-instance-header {
  background-color: #cef3ff;
  font-weight: 700;
}

.sections-hr, #sections-menu > div.offcanvas-body > hr {
  width: 89%;
  margin: 3px auto 16px;
  color: #ccc;
}
.accordion-body {
  padding: 0;
}
.accordion-button, .menu-cat-header > h6 > button {
  padding: 4px 12px;
}
// hide the rotating chevron on accordions like in sections
.accordion-button::after {
  display: none;
}

.accordion-button, .accordion-button:not(.collapsed), .accordion-button:focus {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

#menu-dropdown-link,
#sections-dropdown-link,
#nav-filter-data,
#nav-filter-tags,
#nav-filter-more,
a#facts-menu-button
{
  border-radius: 3px;
}

#menu-dropdown-link:hover,
#sections-dropdown-link:hover,
#nav-filter-data:hover,
#nav-filter-tags:hover,
#nav-filter-more:hover,
button.nav-search-btn:hover,
a#facts-menu-button:hover
{
  color: white !important;
  background-color: $blue-lighter-1 !important;
}

#menu-dropdown-link:active,
#sections-dropdown-link:active,
#nav-filter-data:active,
#nav-filter-tags:active,
#nav-filter-more:active,
button.nav-search-btn:active,
a#facts-menu-button:active
{
  color: white !important;
  background-color: $blue-lighter-2 !important;
}

#menu-dropdown-link:focus-visible,
#sections-dropdown-link:focus-visible,
button.nav-search-btn:focus-visible,
#nav-filter-data:focus-visible,
#nav-filter-tags:focus-visible,
#nav-filter-more:focus-visible,
#current-filters-reset-all:focus-visible,
a#facts-menu-button:focus-visible
{
  box-shadow: inset 0 0 0 2px rgb(89 156 255 / 50%);
  outline: none;
}
#submit-search {
  width: 42px;
}
#global-search-options.show {
  color: white !important;
  background-color: $blue-lighter-3 !important;
}
#global-search-options {
  border-radius: 4px 0 0 4px;
}
#global-search-options:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: none;
}

button.nav-search-btn:focus-visible
{
  box-shadow: 0 0 2px 2px rgb(151 203 255 / 50%);
  color: rgb(248, 249, 250);
  background-color: rgb(0, 55, 104);
}


#submit-search {
  border-radius: 0 4px 4px 0;
}
.focus-inner:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
}
.ix-focus:focus-visible {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
  outline: none;
}
.ix-focus-inset:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
  outline: none;
}

.modal-title-btn {
  padding: 3px;
  border-radius: 3px;
  margin-top: 3px;
  margin-right: 0;
  margin-bottom: 4px;
  margin-left: 2px;
}
.modal-title-btn:focus-visible {
  box-shadow: 0 0 0 2px rgb(13 110 253 / 60%);
  outline: none;
}

.dropdown-menu, 
.sidebar-fact,
.dialog-box {
  font-size: .9rem;
}

.dropdown-menu
{
  z-index: 9001;
}

.lead {
  font-size: 1.1rem;
}

body {
  overflow: hidden;
}

.main-container {
  height: calc(100vh - 85px);
  overflow: hidden; // needed to prevent scrollIntoView from pushing nav out of viewport
}

textarea.form-control {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#dynamic-xbrl-form {
  content-visibility: auto;
  // content-visibility: visible;
  height: 100%;
  overflow: auto;
  padding: 0 15px !important;
}
#dynamic-xbrl-form * {
  box-sizing: initial;
}

#fact-table-container {
  height: calc(100vh - 85px);
  z-index: 100;
}

#facts-breakdown-container {
  height: calc(100vh - 85px);
  z-index: 100;
}

.sidebar-container {
  height: 100vw;
  box-shadow: inset 2px -1px 8px -1px rgba(0, 0, 0, 0.2);
}
.sidebar-container-left {
  border-right-width: var(--bs-border-width);
  border-right-style: var(--bs-border-style);
  border-right-color: var(--bs-border-color);
}
.sidebar-container-right {
  // border-left: var(--bs-border-width), var(--bs-border-style), var(--bs-border-color);
  border-left-width: var(--bs-border-width);
  border-left-style: var(--bs-border-style);
  border-left-color: var(--bs-border-color);
}


.tabs-container {
  height: 41.8px;
}

// deprecated but might use to scroll facts list instead of whole side bar
.auto-scroll-y-facts {
  overflow-y: auto !important;
  height: calc(100vh - 217px) !important;
}

.sidebar {
  min-width: 350px;
  width: 23vw;
  max-width: 600px;
  // transition causes jerky animation
  // transition: all 0.6s cubic-bezier(0.1, 0.29, 0, 0.99) 0s;
}
.sidebar-scrollable {
  height: calc(100vh - 85px);
  overflow-y: auto;
}
.facts-scrollable {
  height: calc(100vh - 206.6px);
  overflow-y: auto;
}

.sidebar > * {
  padding-right: .75rem;
  padding-left: .75rem;
}
.sidebar > :first-child {
  padding-top: .75rem;
}
.sidebar > :last-child {
  padding-bottom: .75rem;
}

.hide {
  visibility: hidden;
}
.d-none {
  display: none;
}

.hover-dim:hover {
  background-color: #f8f9fa;
}

// css reset 'fixes' to overwrite bootstrap stuff
#dynamic-xbrl-form section {
  all: initial;
  // all: revert-layer;
  padding: 0 5px;
  table {
    p {
      margin-top: 0;
      margin-bottom: 0;
    }
  };
  * {
    font-weight: revert-layer;
  }
}

h1, h2, h3, h4, h5, h6 {
  all: revert-layer;
}

#dynamic-xbrl-form hr {
  margin-top: revert-layer;
  margin-bottom: revert-layer;
  margin-left: revert-layer;
  margin-right: revert-layer;
}

#dynamic-xbrl-form a {
  color: revert-layer;
}

kbd {
  background-color: inherit;
  color: inherit;
  padding: inherit;
  font-size: inherit;
  border-radius: inherit;
}

.bg-inherit {
  background-color: inherit;
}

.elevated,
.popover 
{
  box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 4px;
}
.main-navbar {
  z-index: 11; // at smaller screen widths nav dropdown is under inline doc
}
.nav-item {
  cursor: pointer;
}

.space-between {
  justify-content: space-between;
}

.overflow-hidden {
  overflow: hidden; // required on ancestors of scrollIntoView scrollbar elements
}

.doc-pagination {
  display: flex;
  position: sticky;
  bottom: 18px;
  align-self: end;
  justify-content: start;
  pointer-events: none;
}
#html-pagination {
  pointer-events: auto;
  box-shadow: -3px 3px 4px 1px rgba(100, 100, 100, .2);
  .page-link i {
    margin-top: 0;
  }
}

.navbar {
  z-index: 9500;
}
.navbar-dark .navbar-nav .nav-link {
  color: #fff;
}

// nav font color during load
.btn-outline-light.disabled {
  color: #487fab;
}
.navbar-dark .navbar-nav .nav-link.disabled {
  color: #487fab;
}

a.disabled, button.disabled {
  color: #cccccc;
  cursor: not-allowed; 
}

.nav-link.not-ready {
  color: #cccccc !important;
  cursor: not-allowed, auto !important;
}
.not-ready {
  cursor: not-allowed !important; // hourglass would be better
}

.ix-btn-link {
  font-size: .9rem;
  color: rgb(13, 110, 253) !important;
}
.ix-btn-link:focus-visible {
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

#dynamic-xbrl-form [hover-fact="true"],
#dynamic-xbrl-form [continued-main-fact-id],
#dynamic-xbrl-form [contextref]:hover
{
  cursor: pointer;
}

#dynamic-xbrl-form [inside-table="true"] {
  text-indent: initial;
}

#dynamic-xbrl-form [redline="true"] {
  color: #ff0099;
  text-decoration: underline;
}

#dynamic-xbrl-form [redact="true"] {
  color: #c0c0c0;
  text-decoration: underline;
}

#sections-menu [selected-fact="true"] {
  border: 3px solid #003768;
}

#facts-menu-list-pagination #sidebar-page-select {
  font-size: 14px;
}
#facts-menu-list-pagination [selected-fact="true"] {
  border: 3px solid #003768 !important;
}
#facts-menu-page-select {
  padding: 2px;
}

#dynamic-xbrl-form .text-block-fact-hover {
  background-color: rgba(249, 237, 237);
  cursor: pointer;
}

#dynamic-xbrl-form .nested-continued-fact {
  background-color: white !important;
}

#dynamic-xbrl-form .continued-fact {
  background-color: rgba(249, 237, 237);
  cursor: pointer;
}

#dynamic-xbrl-form .continued-fact > * {
  background-color: rgba(249, 237, 237);
  cursor: pointer;
}

#back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
}

.break-all {
  word-break: break-all;
}
.break-word {
  word-break: break-word;
}

.font-size-1 {
  font-size: 1rem;
}

.navbar-height {
  height: 45px;
}

.alert-height {
  --bs-alert-padding-y: 0.5rem;
}

.dropdown-menu-width {
  width: 20rem;
}
.more-filters-dropdown-menu-width {
  width: 24rem;
}

.blank-table-row {
  background-color: #fff;
  height: 2rem;
}

.click {
  cursor: pointer;
}
.not-click {
  cursor: default !important;
}

.height-200 {
  max-height: 200px;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

.carousel-indicators [data-bs-target] {
  border: 1px solid #003768;
}

.carousel-indicators .active {
  background-color: #003768;
}

.fact-value-modal.collapse {
  display: block;
  min-height: 33px;
  height: 0;
  overflow: hidden;
}

.fact-value-modal.collapse.show {
  display: block;
  height: 100%;
  overflow: auto;
}

.color-inherit {
  color: inherit;
}

.lighter-text {
  color: #777777;
}

.d-inherit {
  display: inherit;
}

.b-0 {
  bottom: 0;
}

.p-initial {
  position: initial !important;
}

.dropdown-toggle::after {
  display: none;
}

.bg-sec {
  background-color: #003768;
}

.btn-sec {
  background-color: #003768;
  color: #fff;
  background-image: none;
  border-color: #003768;
}

.btn-sec:hover {
  color: #003768;
  background-color: #fff;
  border-color: #003768;
}

.nav-pills .nav-link.active {
  background-color: #003768;
  color: #fff;
  font-weight: var(--bs-nav-link-font-weight);
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.btn-link {
  color: #003768;
}

#settings-modal {
  top: 55px !important;
  height: calc(100vh - 55px) !important;
}

.expand-modal {
  top: 55px !important;
  left: 0px !important;
  right: 0px !important;
  bottom: 0px !important;
  width: 100% !important;
  height: calc(100vh - 55px) !important;
}
.settings-height {
  height: 30px;
}
.dialog-box {
  top: 55px;
  left: 5%;
  width: 90%;
  height: calc(100vh - 55px);
  background-color: white;
  z-index: 100;
  color: #666;
  border: 2px solid #003768;
  border-radius: 0.3rem;
}

@media (min-width: 576px) {
  .dialog-box {
    top: 18%;
    left: 30vw;
    width: 40vw;
    height: 60vh;
    background-color: white;
    z-index: 9000;
    color: #666;
    border: 2px solid #003768;
    border-radius: 0.3rem;
  }
}

.drag-icon {
  cursor: move;
}

.dialog-header-actions {
  cursor: auto;
}

.dialog-content {
  position: absolute;
  top: 46px;
  right: 0;
  bottom: 39px;
  left: 0;
  overflow: auto;
  padding: 1rem;
}

.dialog-footer {
  height: 39px;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #eee;
  border-top: 1px solid #ccc;
}

.dialog-box .dialog-action .btn {
  text-decoration: none;
  border: none;
  outline: none;
  color: inherit;
  font-weight: bold;
  background-color: white;
  border: 1px solid #ccc;
  -webkit-border-radius: 0.2em;
  -moz-border-radius: 0.2em;
  border-radius: 0.2em;
  padding: 0.4em 1em;
  margin-left: 0.2em;
  line-height: 2em;
  cursor: pointer;
}

.text-center {
  text-align: center;
}

.dialog-box .dialog-close,
.dialog-box .dialog-minmax {
  border: none;
  outline: none;
  background: none;
  line-height: 1.4em;
  color: #aaa;
  text-decoration: none;
  position: absolute;
  top: 0;
  right: 0.3em;
  text-align: center;
  cursor: pointer;
}

.dialog-box .dialog-minmax {
  right: 1.5em;
}

.dialog-box.fixed-dialog-box {
  position: fixed;
}

.dialog-box.minimize .dialog-title {
  color: transparent;
  text-shadow: none;
  text-indent: -9999px;
}

.text-popover-clamp-1 {
  line-height: 1.4em;
  max-height: 1.4em;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

.text-popover-clamp-2 {
  line-height: 1.4em;
  max-height: 2.8em;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

.no-hover:hover {
  cursor: initial;
}

.mr-auto {
  margin-right: auto;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.btn:not(.btn-sm) {
  height: 38px;
}

.flip-x {
  transform: scaleX(-1);
}

.page-link {
  i {
    margin-top: 12px;
  }
}

.suggestions {
  z-index: 9999;
  margin-top: 38px;
  width: 332px;
  max-height: 50vh;
  overflow: auto;
}

.form-pages {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
}

.not-numbered {
  list-style-type: none;
}

// span:has(> [text-block-fact="true"]) {
//   // box-shadow: inset 0px 2px 0px black, inset 0px -2px 0px black;
//   box-shadow: inset -2px 0px 0px 0px orange, inset 2px 0px 0px 0px orange;
//   display: inline-block;
// }
// box-shadow: -2px 0px 0px 0px orange, 2px 0px 0px 0px orange;

.pagination-border {
  border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);
}

.up-15 {
	transform: translateY(-15px);
}

.center-align-items {
  display: flex;
	align-items: center;
}

.opacity-10 {
  opacity: .1;
}


//doc tabs
#tabs-container a.nav-link
{
    span.badge.fact-file-total-count
    {
        @extend .bg-sec;
    }

    &.active span.badge.fact-file-total-count
    {
        @extend .text-bg-light;
    }
}

//circular progress bar: https://www.30secondsofcode.org/css/s/circular-progress-bar/
svg text
{
    font-size: 18px;
    font-family: var(--bs-body-font-family);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--bs-body-color);
}

.circular-progress
{
    --size: 250px;
    --half-size: calc(var(--size) / 2);
    --stroke-width: 20px;
    --radius: calc((var(--size) - var(--stroke-width)) / 2);
    --circumference: calc(var(--radius) * pi * 2);
    --dash: calc((var(--progress) * var(--circumference)) / 100);
    animation: progress-animation 5s linear 0s 1 forwards;
}

.circular-progress circle
{
    cx: var(--half-size);
    cy: var(--half-size);
    r: var(--radius);
    stroke-width: var(--stroke-width);
    fill: none;
    stroke-linecap: round;

    &.bg
    {
        stroke: #EEE;
    }

    &.fg
    {
        transform: rotate(-90deg);
        transform-origin: var(--half-size) var(--half-size);
        stroke-dasharray: var(--dash) calc(var(--circumference) - var(--dash));
        transition: stroke-dasharray 0.3s linear 0s;
        stroke: #003768;
    }
}

//TODO: do this same thing for hidden fact styles
@property --progress
{
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}
