/* Header */
.crud-panel {
  padding: 0.5rem 1rem;
  background-color: rgba(var(--bs-body-color-rgb), 0.03);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 767.98px) {
  .crud-panel {
    padding: 0.8rem 1rem;
  }
}
.crud-panel h2 {
  font-size: 0.875rem;
  font-weight: 700;
}
@media (max-width: 767.98px) {
  .crud-panel h2 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
}
.crud-panel .btn span {
  display: none;
}
.crud-panel .btn.btn-settings {
  background-color: var(--bs-body-bg);
  box-shadow: none;
  font-size: 1.313rem;
  margin: 0;
  line-height: 0;
}
.crud-panel .btn.btn-settings span {
  display: none;
}
.crud-panel .btn.btn-settings::after {
  display: none;
}
.crud-panel .options {
  display: flex;
  justify-content: center;
}
.crud-panel .options .btn {
  margin: 0.1rem;
}

.crud {
  margin: 1rem 0;
  /* List */
  /* View unique item */
}
.crud .card .crud-panel {
  width: 100%;
  border: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  min-height: 3rem;
}
.crud .dropdown-item {
  font-size: 0.875rem;
}
.crud.crud-table .bulk-edit {
  padding-bottom: 1rem;
}
.crud.crud-table .bulk-edit hr {
  margin-bottom: 0;
}
.crud.crud-table .crud-body {
  padding-top: 0;
}
.crud.crud-table .crud-body:only-child {
  margin-top: 1rem;
}
.crud.crud-table [colspan] {
  text-align: center;
}
.crud.crud-table table .table-actions {
  display: flex;
  justify-content: center;
}
.crud.crud-table table .table-actions .btn {
  margin: 0.1rem;
}
.crud.crud-table table thead {
  border-bottom: 1px solid var(--bs-border-color);
}
.crud.crud-table table tr {
  font-size: 0.875rem;
  line-height: normal;
}
.crud.crud-table table td {
  border: 0;
  font-size: 0.875rem;
  line-height: normal;
  font-weight: 500;
  max-height: 600px;
}
.crud.crud-table table td [target=_blank] {
  color: inherit !important;
}
.crud.crud-table table td [target=_blank] .icon {
  font-size: 0.75rem;
}
.crud.crud-table table td .media-list {
  width: max-content;
}
.crud.crud-table table td .media-list .media-more {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
}
.crud.crud-table table td .dropdown-toggle {
  display: flex;
  align-items: center;
}
.crud.crud-view .crud-body > * {
  margin-top: 5rem;
}
.crud.crud-view .crud-body > *:first-child {
  margin-top: 0;
}
.crud.crud-view .crud-body table thead {
  border-top-radius: var(--card-radius);
}
.crud.crud-view .crud-body table thead th {
  font-size: 1.2rem;
}
.crud.crud-view .crud-body table tr {
  font-size: 0.875rem;
}
.crud.crud-view .crud-body table tr td.title {
  font-weight: 600;
}
.crud.crud-view .crud-body table tr td.content {
  width: 85%;
}
.crud.crud-view tr .audio-player, .crud.crud-table tr .audio-player {
  margin-bottom: 0.5rem;
}
.crud.crud-view tr img,
.crud.crud-view tr video, .crud.crud-table tr img,
.crud.crud-table tr video {
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  height: 150px;
  max-height: 150px;
  border-radius: 1rem;
}
.crud.crud-view tr video, .crud.crud-table tr video {
  height: 200px;
  max-height: 200px;
}

.steps-form {
  color: var(--bs-body-color) !important;
}
.steps-form .carousel-inner {
  overflow: unset;
}
@media (max-width: 991.98px) {
  .steps-form .container {
    margin: 0;
    padding: 0;
  }
}
.steps-form .saving-step,
.steps-form .step-saved {
  margin-bottom: 1.2rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--bs-gray-600);
  opacity: 1;
  transition: opacity 0.3s ease-out;
}
.steps-form .step-saved.is-hiding {
  opacity: 0;
}
.steps-form .progress-content {
  margin-left: 0.313rem;
}
.steps-form .carousel-caption {
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  position: relative;
  text-align: left;
  padding: 0;
  color: var(--bs-body-color) !important;
}
.steps-form .carousel-inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--bs-body-color) !important;
}
.steps-form .step-description p {
  color: var(--bs-gray-700);
  font-size: 0.8rem;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}
.steps-form .form-pagination {
  padding: 0;
}
.steps-form .top-prev-button {
  display: none;
  color: var(--bs-gray-700) !important;
  padding: 0.313rem;
}
.steps-form .top-prev-button:disabled {
  border: none;
}
@media (max-width: 991.98px) {
  .steps-form .top-prev-button {
    display: block;
  }
}
.steps-form .step-controls {
  margin-top: 3.75rem;
  display: flex;
  justify-content: center;
  row-gap: 1rem;
}
.steps-form .step-controls .btn-group {
  width: fit-content;
}
@media (max-width: 991.98px) {
  .steps-form .step-controls .back {
    display: flex;
    justify-content: center;
    order: 3;
  }
}
.steps-form .step-controls .back button {
  color: var(--bs-body-color) !important;
  font-weight: 500;
}
.steps-form .step-controls .back button:disabled {
  border: none;
}

#crud-piece-modal .crud {
  margin-bottom: 0;
}
#crud-piece-modal .crud > *:first-child {
  border: none;
}
#crud-piece-modal .crud > *:first-child nav {
  display: none;
}
#crud-piece-modal .crud > *:first-child .crud-body {
  padding: 0;
}
#crud-piece-modal .crud > *:first-child .schedule-event ul {
  width: auto;
}
#crud-piece-modal .crud-panel {
  border-radius: var(--card-radius);
}

[data-table-loader] {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-table-loader] p {
  margin: 0 0.5rem;
}

.gridjs-header {
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .gridjs-length-selector {
    display: flex;
    justify-content: center;
    margin-right: auto !important;
    align-items: center;
    width: 100%;
  }
  .gridjs-search {
    display: flex;
    justify-content: center;
    margin-left: auto !important;
    align-items: center;
    width: 100%;
  }
  .gridjs-search-form {
    width: 75%;
  }
}
@media (min-width: 768px) {
  .gridjs-header,
  .gridjs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.gridjs-table-wrapper {
  overflow-x: auto;
}

@media (max-width: 767.98px) {
  .gridjs-pagination {
    display: flex;
    justify-content: center;
  }
  .gridjs-summary {
    width: 100% !important;
    text-align: center;
    margin-bottom: 0.313rem;
  }
  .gridjs-pages {
    width: 100% !important;
  }
}
.gridjs-footer {
  width: 100%;
}

/* A one-digit page button is under 24 px wide, the minimum target size (WCAG 2.2). */
.gridjs-pages .page-link {
  min-width: 2rem;
  text-align: center;
}
.gridjs-footer .gridjs-summary,
.gridjs-footer .gridjs-pages {
  width: fit-content;
}

.gridjs-th-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: fit-content;
}

th.gridjs-th-sort {
  cursor: pointer;
}

th.gridjs-th-sort .gridjs-th-content {
  margin-right: 0.315rem;
}

th.gridjs-th-sort:hover,
th.gridjs-th-sort:focus {
  background-color: var(--bs-tertiary-bg, var(--bs-light));
}

button.gridjs-sort {
  float: right;
  width: 13px;
  height: 16px;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  cursor: pointer;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position-x: center;
  background-size: 16px;
}
button.gridjs-sort:focus {
  outline: none;
}

.gridjs-search-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background-color: rgba(var(--bs-body-color-rgb), 0.5);
  color: #000;
  font-weight: 600;
  font-size: 20px;
}

button.gridjs-sort-neutral {
  opacity: 0.6;
  background-position-y: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3E%3Cpath d='M8 1l4 4H4l4-4zm0 14l-4-4h8l-4 4z'/%3E%3C/svg%3E");
}

button.gridjs-sort-asc {
  background-position-y: 35%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3E%3Cpath d='M8 4l6 6H2z'/%3E%3C/svg%3E");
}

button.gridjs-sort-desc {
  background-position-y: 65%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3E%3Cpath d='M8 12l-6-6h12z'/%3E%3C/svg%3E");
}

[data-bs-theme=dark] .gridjs-search-loading-overlay {
  color: #fff;
}
[data-bs-theme=dark] button.gridjs-sort-asc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFF'%3E%3Cpath d='M8 4l6 6H2z'/%3E%3C/svg%3E");
}
[data-bs-theme=dark] button.gridjs-sort-desc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFF'%3E%3Cpath d='M8 12l-6-6h12z'/%3E%3C/svg%3E");
}
