/* ============================================================================
   BASE STYLES
   ============================================================================ */

body {
  font-family: "Barlow", sans-serif;
}


/* ============================================================================
   LAYOUT & NAVIGATION
   ============================================================================ */

/* Sidebar */
.sidebar-nav {
  background-color: #f3f0eb;
  padding: 16px 0;
}

.sidebar-brand {
  background-color: white;
  height: 150px;
  padding: 16px;
}

.structure-logo {
  max-height: 130px;
  width: auto;
  max-width: 200px;
  margin: 0 auto;
}

.sidebar-link {
  background: #f3f0eb !important;
}

.sidebar-item.active a i,
.sidebar-item.active a span {
  color: #86c609 !important;
  font-weight: bold;
}

.sidebar-item:hover a i,
.sidebar-item:hover a span {
  color: #86c609 !important;
}

/* Navbar */
.navbar-bg {
  background: linear-gradient(to right, #f3f0eb, #cbdbb2);
  height: 150px;
}

.navbar-title {
  color: #86c609;
  margin-bottom: 0;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 36px;
}


/* ============================================================================
   BOOTSTRAP OVERRIDES
   ============================================================================ */

/* Alerts */
.alert-danger:not(.alert-outline):not(.alert-outline-coloured) {
  background: #f8d7da;
}

.alert {
  color: #212529;
  display: flex;
  padding: 0;
  --bs-alert-bg: transparent;
  --bs-alert-padding-x: 0.95rem;
  --bs-alert-padding-y: 0.95rem;
  --bs-alert-margin-bottom: 1rem;
  --bs-alert-color: inherit;
  --bs-alert-border-color: transparent;
  --bs-alert-border: 0 solid var(--bs-alert-border-color);
  --bs-alert-border-radius: var(--bs-border-radius);
  --bs-alert-link-color: inherit;
  background-color: var(--bs-alert-bg);
  border: var(--bs-alert-border);
  border-radius: var(--bs-alert-border-radius);
  margin-bottom: var(--bs-alert-margin-bottom);
  position: relative;
}

.alert-dismissible {
  padding-right: 2.85rem;
}

.alert-icon {
  background: rgba(0, 0, 0, .05);
  padding: .95rem;
}

.alert-dismissible .btn-close {
  padding: 1.1875rem .95rem;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.alert-message {
  box-sizing: border-box;
  padding: .95rem;
  width: 100%;
}

.alert-danger {
  --bs-alert-color: var(--bs-danger-text-emphasis);
  --bs-alert-bg: var(--bs-danger-bg-subtle);
  --bs-alert-border-color: var(--bs-danger-border-subtle);
  --bs-alert-link-color: var(--bs-danger-text-emphasis);
}

.alert-warning {
  --bs-alert-color: var(--bs-warning-text-emphasis);
  --bs-alert-bg: var(--bs-warning-bg-subtle);
  --bs-alert-border-color: var(--bs-warning-border-subtle);
  --bs-alert-link-color: var(--bs-warning-text-emphasis);
}

.alert-success {
  --bs-alert-color: var(--bs-success-text-emphasis);
  --bs-alert-bg: var(--bs-success-bg-subtle);
  --bs-alert-border-color: var(--bs-success-border-subtle);
  --bs-alert-link-color: var(--bs-success-text-emphasis);
}

.alert-info {
  --bs-alert-color: var(--bs-info-text-emphasis);
  --bs-alert-bg: var(--bs-info-bg-subtle);
  --bs-alert-border-color: var(--bs-info-border-subtle);
  --bs-alert-link-color: var(--bs-info-text-emphasis);
}

/* Pagination */
.active > .page-link,
.page-link.active {
  background-color: #86c609;
  border-color: #86c609;
}

/* Cards */
a.card-body:hover p {
  text-decoration: underline;
}

/* Tables */
.table-compact th,
.table-compact td {
  padding: 2px;
  font-size: 0.8rem;
}

/* Form Elements */
select.hide-first:focus > option:first-child {
  display: none;
}


/* ============================================================================
   THIRD-PARTY LIBRARY OVERRIDES
   ============================================================================ */

/* Select2 Bootstrap 5 Theme */
.select2-container--bootstrap-5 .select2-selection--single:focus,
.select2-container--bootstrap-5 .select2-selection--multiple:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #86c609 !important;
  box-shadow: 0 0 0 0.25rem rgba(134, 198, 9, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #86c609 !important;
  color: #fff !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
  background-color: #86c609 !important;
  color: #fff !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background-color: #86c609 !important;
  border-color: #86c609 !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: #86c609 !important;
  box-shadow: 0 0 0 0.25rem rgba(134, 198, 9, 0.25) !important;
}

/* DataTables */
div.dt-container div.dt-paging ul.pagination li.dt-paging-button a {
  justify-content: flex-end !important;
  margin: 2px 0 !important;
  white-space: nowrap !important;
  font-size: 0.75rem !important;
}

/* FullCalendar */
.fc-button-primary {
  background-color: #86c609 !important;
  border-color: #86c609 !important;
}

.fc-daygrid-day-number {
  color: black;
}

.bg-danger .fc-daygrid-day-number {
  color: white;
}

.fc-daygrid-day:hover .fc-daygrid-day-number {
  color: #86c609;
}


/* ============================================================================
   CUSTOM COMPONENTS
   ============================================================================ */

/* Star Rating */
.stars-input-icon {
  cursor: pointer;
  transition: color 200ms ease;
}

.stars-input-input {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

.stars-input-input + .stars-input-icon {
  color: rgb(156, 156, 156);
}

.stars-input-input:checked + .stars-input-icon:not(.empty) {
  color: #86c609;
}

.stars-input-input:checked ~ .stars-input-icon:not(.empty) {
  color: #86c609;
}

.stars-input-icon:hover:not(:checked) {
  color: #a8e045;
}

/* Image Upload Box */
.img-upload-box {
  background-color: #cacaca;
  position: relative;
  width: 100%;
  padding-bottom: 80%;
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: zoom-in;
}

.img-upload-box[role="button"] {
  cursor: pointer;
}

.img-upload-box::after {
  content: '\f030';
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  font-family: "Font Awesome 7 Free";
  font-weight: 900;
  display: block;
  transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 10vmin;
}

.img-upload-box[style*="background-image"] {
  background-color: transparent;
  border: 1px solid #cacaca;
}

.img-upload-box[style*="background-image"]::after {
  display: none;
}

.img-upload-box > button {
  display: none;
}

.img-upload-box[style*="background-image"] > button {
  display: block;
}

.img-upload-box-file-input {
  display: none;
}

/* Structure Images */
.structure-image {
  width: auto;
  height: 80px;
}

/* Calendar Day Cell */
.day-cell-infobox {
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 100%;
  max-width: 100%;
  white-space: pre-line;
  height: 100%;
  height: calc(100% - 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 14px;
}

/* File Manager UI States */
#file-list-container[data-move-file-index] #new-file-button {
  display: none;
}

#file-list-container[data-move-file-index] .open-folder {
  display: none;
}

#file-list-container[data-move-file-index] .download-button,
#file-list-container[data-move-file-index] .move-button,
#file-list-container[data-move-file-index] .edit-button,
#file-list-container[data-move-file-index] .delete-button {
  display: none;
}

#file-list-container:not([data-move-file-index]) #cancel-file-move-button {
  display: none;
}

#file-list-container:not([data-move-file-index]) .choose-target-folder {
  display: none;
}

#file-list-container[data-move-file-index] .list-group-item.file[data-move-target] {
  opacity: 1;
}

#file-list-container[data-move-file-index] .list-group-item.file:not([data-move-target]) {
  opacity: .5;
}


/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.gap-inside > :not(:first-child) {
  margin-left: 0.25rem;
}
