@import "../bulma/css/bulma.min.css";

:root {
  --bulma-body-size: .9em;
  --bulma-navbar-height: 40px;
  --bulma-menu-item-selected-h: var(--bulma-primary-h);
  --accrete-detail-width: 38em;
  --accrete-action-panel-width: 20em;
  --bulma-primary-h: 153.28deg;
  --bulma-primary-s: 52.89%;
  --bulma-primary-l: 52.55%;
  --bulma-input-arrow: var(--bulma-primary);
  --bulma-arrow-color: var(--bulma-primary);
  --accrete-hover-color: #F0F2F4;
  --accrete-table-header-color: #F0F2F4;
  --accrete-table-footer-color: #F0F2F4;
}

// html[data-theme='light'] {}

html[data-theme='dark'] {
  --accrete-hover-color: #1E2128;
  --accrete-table-header-color: #1E2128;
  --accrete-table-footer-color: #1E2128;

  .button.is-light {
    --bulma-button-background-l: var(--bulma-dark-l);
    --bulma-button-border-l: var(--bulma-dark-l);
    --bulma-button-border-width: 0px;
    --bulma-button-color-l: var(--bulma-dark-invert-l);
    --bulma-button-outer-shadow-a: 0;
  }

  .button.is-light:not(.is-success, .is-danger, .is-primary, .is-info, .is-warning, .is-link) {
    --bulma-button-h: var(--bulma-dark-h);
    --bulma-button-s: var(--bulma-dark-s);
    --bulma-button-l: var(--bulma-dark-l);
  }

  .tag > .button.is-light {
    --bulma-button-background-l: var(--bulma-background-l);
  }
}

[x-cloak] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: inherit;
}

.tabs * a {
  cursor: default;
}

.label {
  font-weight: normal;
}


.navbar-burger {
  color: black;
}

.button {
  box-shadow: none;
  cursor: default;
}

.button.is-subtle {
  box-shadow: none;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
}

.button.is-static.is-primary {
  background-color: var(--bulma-primary);
  color: var(--bulma-button-disabled-border-color);
}

.dropdown-item {
  cursor: default;
}

.input {
  border-width: 2px 2px 2px 2px;
}

.input:focus, .input:focus-within {
  box-shadow: none;
  border-color: var(--bulma-primary);
  border-style: solid;
}

input[disabled] {
  cursor: default !important;
}

input[disabled] ~ .helptext {
  font-weight: normal !important;
}

select {
  cursor: default !important;
}

textarea {
    box-shadow: none!important;
}

textarea:focus {
    border-color: var(--bulma-primary) !important;
}

.is-small.textarea, .is-small.input {
  border-radius: 0;
  font-size: var(--bulma-size-small);
}

td > .input, td * .input, td * select, td * .select {
  border-radius: 0!important;
}

select {
  box-shadow: none !important;
  border-width: 2px 2px 2px 2px!important;
}

select:focus {
  box-shadow: none;
  border-style: solid;
  border-color: var(--bulma-primary)!important;
}

#detail-container {
  flex-shrink: 0;
  width: var(--accrete-detail-width);
  box-shadow: -2px 0 20px 0 var(--bulma-grey-light);
  z-index: 20;
}

.responsive-heading {
  display: none;
}

#overview-container {
  container-name: overview-container;
  container-type: inline-size;
}

.htmx-indicator{
    transition: opacity 200ms ease-in;
}

.modal-request-overlay {
    pointer-events: none;
}

.modal-request-overlay.htmx-request {
    pointer-events: auto;
}

#detail-indicator {
  position: fixed;
  background: rgba(47, 47, 62, 0.2);
  height: calc(100% - var(--bulma-navbar-height));
  width: 100%;
  z-index: -100;
}

#detail-indicator.htmx-request {
  z-index: 999;
  transition-delay: 300ms;
  transition-property: opacity;
}

#detail-indicator > .progress {
  position: fixed;
  top: 50%;
  margin-left: 3%;
  max-width: calc(var(--accrete-detail-width) - 6%);
}

.list-entry > .box:hover, .box.selected {
  box-shadow: 0 0 5px 2px var(--bulma-primary);
}

.helptext {
  font-style: italic !important;
  font-size: 1rem !important;
  margin-bottom: 0 !important;
  color: var(--bulma-text);
  font-weight: var(--bulma-weight-normal);
  line-height: 1.25;
}

.container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

table.can-compact {
  white-space: nowrap;
}

fieldset{
  background-color: var(--bulma-scheme-main);
  border-radius: var(--bulma-radius);
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--bulma-grey-lighter);
}

fieldset  > legend{
  display: block;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 5px;
  width: max-content;
  border: 0 none
}

@container overview-container (max-width: 768px) {
  table.can-compact {
    white-space: wrap;
  }

  table.can-compact * td {
    width: 100%;
    float: left;
    text-align: left !important;
    border: transparent !important;
    font-size: 1em;
    padding-left: 1rem !important;
  }

  table.can-compact * tr {
    display: inline-block;
    width: 100%;
    padding-top: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bulma-grey-light)
  }

  table.can-compact * tr:first-child {
    border-top: 1px solid var(--bulma-grey-light);
  }

  table.can-compact * tr.is-primary {
    background-color: var(--bulma-primary);
  }

  table.can-compact * tr.is-primary:hover {
    background-color: var(--bulma-primary)!important;
  }

  table.can-compact > thead {
    display: none;
  }

  table.can-compact * .responsive-heading {
    display: inline-block;
  }

  .list-entry {
    height: fit-content!important;
  }
}

@media screen and (min-width: 769px) {
  .modal-card {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  #detail-container {
    flex-grow: 1;
    flex-shrink: 1;
    width: auto;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .level > .level-item.box {
    width: 100%
  }

  .modal-card {
    width: 100%!important;
    max-height: 100svh;
  }
}

#action-panel {
  max-width: var(--accrete-action-panel-width);
  min-width: var(--accrete-action-panel-width);
  height: 100%;
  overflow-y: auto;
}

@media screen and (max-width: 1215px) {
  #action-panel {
    position: absolute;
    background: var(--bulma-scheme-main);
    z-index: 40;
    box-shadow: 2px 0 20px 0 var(--bulma-grey-light);
  }
}

.hoverable *:hover {
    background-color: var(--accrete-hover-color);
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.query-group-container .query-tag-container:first-child .query-operator {
  display: none;
}

.query-group-container .query-tag-container:first-child .query-operator-group {
  display: none!important;
}

#query-tags > .query-group-container > .query-operator:first-child {
  display: none;
}

#query-tags > .query-group-container > .query-operator-group:first-child {
  display: none!important;
}

.query-group {
  padding-left: 4px;
  border-left: 1px solid var(--bulma-grey-light);
  border-top: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  margin-bottom: 5px;
}

#query-tags > .query-group-container > .query-group {
  padding-left: 0;
  border-left: none!important;
}

.header-items > * {
  margin-right: 0.4rem;
  margin-bottom: 0.5rem;
  margin-left: 0.4rem;
}

.delete:hover {
  background-color: var(--bulma-danger);
}