/* teal custom css */

/* per tag */

body:not(.modal-open) {
  padding-right: 0 !important;
  overflow: auto !important;
}

/* teal_data_module modal styling */
body > div:has(~ #shiny-modal-wrapper .fade .blur_background) {
  transition: filter 0.3s;
}

body > div:has(~ #shiny-modal-wrapper .blur_background) {
  filter: blur(5px);
}

#shiny-modal.fade.in:has(.hide_background) {
  transition: background-color 0.3s;
}

#shiny-modal:has(.hide_background) {
  background-color: var(--bs-white);
}

.btn {
  --bs-btn-padding-x: 0.7em;
  --bs-btn-padding-y: 0.4em;
}

.accordion-button {
  font-size: var(--bs-body-font-size);
  font-weight: bold;
}

.teal-body .tabbable > .nav-pills {
  width: calc(100% - 5rem);
}

.teal.bookmark-popup .modal-body {
  padding: 0 1.5rem;
}

.modal-dialog:has(.teal-filter-manager-modal) {
  width: fit-content;
}

.teal-body .bslib-mb-spacing {
  --bslib-mb-spacer: 0;
}

.teal-data-module-popup .modal-dialog {
  --bs-modal-margin: 20px;
}

.teal-data-module-popup .modal-content {
  overflow: auto;
  max-height: 90vh;
  height: 90vh;
}

@media (min-width: 576px) {
  .teal-data-module-popup .modal-dialog {
    --bs-modal-width: 500px;
  }
}

@media (min-width: 992px) {
  .teal-data-module-popup .modal-dialog {
    --bs-modal-width: 90vw;
  }
}

.teal.expand-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
  max-width: 40px;
  transition: max-width 0.3s ease;
}

.teal.expand-button button {
  color: var(--bs-primary);
  background-color: transparent;
  border: 2px solid transparent;
  padding: 0.5rem;
}

.teal.expand-button button:disabled {
  color: var(--bs-dark-text-emphasis);
}

.teal.expand-button:hover button:disabled {
  border-bottom: 2px solid var(--bs-dark-bg-subtle);
}

.teal.expand-button .label {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.teal.expand-button:hover {
  max-width: 200px;
}

.teal.expand-button:hover button {
  border-bottom: 2px solid var(--bs-primary-border-subtle);
}

.teal.expand-button:hover .label {
  opacity: 1;
}

.teal.primary-button {
  border: solid 1px var(--bs-primary);
  padding: 0.3em;
  border-radius: 5px;
}

.teal.primary-button.disabled {
  color: var(--bs-primary);
  pointer-events: none;
  opacity: 0.65;
}

.teal.primary-button:not(.disabled):hover {
  background: var(--bs-primary-bg-subtle);
}

[data-bs-toggle="tooltip"].disabled {
  cursor: not-allowed;
  color: var(--bs-gray);
}
