/* General Styling */
html,
body {
  z-index: -1;
}

body {
  background-color: #f8f9fa;
}

body.noscroll {
  overflow: hidden;
}

main {
  padding: 20px;
}

hr {
  border-top: 1px solid rgba(0, 0, 0, 0.5);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

.record-template-error-alert {
  text-align: center;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  background-color: #674cb1;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  color: #fff;
}

header.main-header {
  padding: 10px 20px;
  text-align: center;
}

header.main-header h1 {
  margin: 0;
}

header .main-header {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

header .main-header button {
  color: inherit;
  font-size: 1.4rem;
  border: unset;
  cursor: pointer;
  border-radius: 50%;
}

header .main-header button:hover,
header .main-header button:focus,
header .main-header button:active {
  background: rgba(0, 0, 0, 0.1);
  border: unset;
}

header .nav-header {
  display: flex;
  align-items: stretch;
  background-color: #906fd4;
  overflow-y: hidden;
}

header .nav-header h1 {
  font-weight: 400;
  margin: 0;
  font-size: 1.7rem;
  color: #fff;
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}

header .nav-header > div {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

header .nav-header > div.selected,
header .nav-header > div.selected:hover {
  background-color: #674cb1;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

header .nav-header > div:hover {
  background-color: rgba(0, 0, 0, 0.15);
}

header .nav-header a,
header .nav-header a:hover,
header .nav-header a:focus,
header .nav-header a:active,
header .nav-header .nav-header div > h1 {
  padding: 10px 20px;
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: inherit;
  align-items: center;
}

header .main-header .dropdown-menu {
  z-index: 1000;
}

header .dropdown-item.logout,
header .dropdown-item.logout:hover,
header .dropdown-item.logout:focus {
  color: #dc3545;
}

header .dropdown-item.logout:hover:active,
header .dropdown-item.logout:focus:active {
  color: #fff;
}

h1 {
  margin-bottom: 20px;
}

/* Field Group (Dynamic Fields for Create Template) */
.field-group {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background-color: #f7f7ff;
  position: relative;
  transition: transform 0.3s ease-in-out;
}

.field-group-header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 10px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

.field-group-header input {
  margin: 0;
}

.remove-field-btn {
  background: none;
  border: none;
  color: #6c757d; /* Gray color */
  font-size: 1rem;
  cursor: pointer;
}

/* Button Groups */
.button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.btn-add-field {
  margin-right: 10px;
}

textarea.description-textarea {
  min-height: 85px;
  max-height: 250px;
}
.parameters-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 15px;
}

.field-group .form-label,
.fields-container .form-label {
  margin-bottom: 0.3rem;
}

.field-card {
  display: flex;
  gap: 12px;
}

.field-card .field-card-content {
  flex: 1;
}

.field-card-content select {
  cursor: pointer;
}

.field-card-content select:hover,
.field-card-content select:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

.field-group:first-child .move-up-btn {
  display: none;
}

.field-group:last-child .move-down-btn {
  display: none;
}

.field-group .move-down-btn {
  visibility: hidden;
}

/* Templates Page Styling */
#searchForm,
#searchForm .search-div,
#searchForm .dropdown-div {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

#searchForm .search-div {
  flex-basis: 150%;
}

#searchForm .dropdown-div {
  flex-basis: 100%;
}

#searchForm #openFiltersBtn {
  background: #fff;
  color: inherit;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

#searchForm #openFiltersBtn:hover,
#searchForm #openFiltersBtn:active,
#searchForm #openFiltersBtn:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

#searchForm .input-group {
  width: auto;
  flex: 1;
}

@media (max-width: 500px) {
  #searchForm .input-group + div label {
    display: none;
  }
}

@media (max-width: 700px) {
  #searchForm {
    gap: 10px;
    flex-wrap: wrap;
  }
}

#searchForm .pagination-limit {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-group button {
  border: 1px solid #dee2e6;
}

.input-group button:hover,
.input-group button:focus {
  background-color: rgba(0, 0, 0, 0.05);
}

.input-group button:active {
  background-color: #007bff;
  color: #fff;
}

.card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  overflow: visible; /* Allow dropdown to extend beyond card */
  transition: none; /* Removed hover effect */
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  /*background-color: lightblue;*/
}

.card .img-clip {
  width: 100px;
  height: auto;
  border-radius: 9px 0 0 9px;
  overflow: hidden;
  flex-shrink: 0;
}

.child-records-list .card img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  flex-shrink: 0;
}

.child-records-list .card .img-clip {
  width: 75px;
  height: auto;
  border-radius: 9px 0 0 9px;
  overflow: hidden;
  flex-shrink: 0;
}

.card button,
.card .button {
  z-index: 1;
  position: relative;
  color: #212529;
}

.card .location-tree-btn {
  background: none;
  border-left: 1px solid #e0e0e0;
  width: 75px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border-radius: unset;
  color: #906fd4;
}

.card .location-tree-btn i {
  font-size: 1.75rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px;
  flex-grow: 1;
}

h5 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.card .card-body a {
  z-index: 1;
  position: relative;
  display: inline-block;
  align-self: start;
}

p,
.template-header a,
.card-body a {
  margin: 5px 0 0;
  font-size: 0.875rem;
}

p {
  color: #6c757d;
}

p.error-alert {
  color: #ff8e98;
}

a {
  color: #906fd4;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #674cb1;
  text-decoration: none;
}

.template-row:last-child .card {
  margin-bottom: 0 !important;
}

/* Options Icon in Card */
.options-container {
  display: flex;
  align-items: flex-start;
  padding: 5px;
  padding-bottom: 0;
}

.button {
  background: none;
  border: none;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button:focus,
.button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.button:active,
.button.show {
  background: rgba(0, 0, 0, 0.1);
}

/* Dropdown menu */
.dropdown-menu {
  z-index: 900; /* Ensure dropdown appears above other elements */
}

.dropdown-item {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.dropdown-item-create,
.dropdown-item-create:hover,
.dropdown-item-create:focus {
  color: #007bff;
}

.dropdown-item-create:hover:active,
.dropdown-item-create:focus:active {
  color: #fff;
}

.dropdown-item-delete,
.dropdown-item-delete:hover,
.dropdown-item-delete:focus {
  color: #dc3545;
}

.dropdown-item-delete:hover:active,
.dropdown-item-delete:focus:active {
  color: #fff;
}

/* Floating Action Button */
.fab-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #007bff;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 20px;
  border: none;
  z-index: 800;
  transition: background-color 0.15s ease-in-out;
}

.fab-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.fab-stack + .fab-button,
.fab-button + .fab-button {
  bottom: 85px;
}

.fab-stack .fab-button {
  transition: all 0.3s ease;
  opacity: 0;
}

.fab-stack.move-left .fab-button {
  transform: translateX(-65px);
  opacity: 1;
}

.fab-stack.move-left .fab-button.fab-delete {
  transform: translateX(-130px);
}

.fab-stack.move-left .fab-button:last-child {
  transform: none;
}

.fab-stack .fab-button + .fab-button {
  bottom: 20px;
}

.fab-stack .fab-button:last-child {
  z-index: 801;
  opacity: 1;
}

.fab-button.fab-close,
.fab-stack .fab-button:last-child {
  background-color: #6c757d;
}

.fab-button.fab-close:focus,
.fab-button.fab-close:hover,
.fab-stack .fab-button:last-child:focus,
.fab-stack .fab-button:last-child:hover {
  background-color: #5c636a;
}

.fab-button:focus,
.fab-button:hover {
  background-color: #0056b3;
}

.fab-button.fab-delete {
  background-color: #c9190b;
}

.fab-button.fab-delete:focus,
.fab-button.fab-delete:hover {
  background-color: #a30000;
}

/* Pagination Styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 25px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  margin: 0 5px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  color: #333;
  font-size: 1rem;
  text-decoration: none;
  background-color: #ffffff;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.pagination a:hover {
  background-color: #f0f0f0;
}

.pagination .active {
  background-color: #4285f4;
  color: white;
  border: none;
  font-weight: bold;
  cursor: default;
}

.pagination .active:hover {
  background-color: #4285f4;
  color: white;
  border: none;
  font-weight: bold;
}

.pagination .dots {
  pointer-events: none;
  cursor: default;
}

.current-items {
  margin-top: 25px;
  font-size: 1rem;
  text-align: center;
}

.pagination + .current-items {
  margin-top: 10px;
}

.filters-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

.no-results {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin: 20px 0;
}

.template-header {
  margin-bottom: 10px;
  display: grid;
  grid-gap: 20px;
  grid-template-columns: auto 1fr;
}

.template-header img {
  max-width: 125px;
  border-radius: 10px;
}

.template-description {
  white-space: pre-wrap;
  margin: 0;
  margin-top: 5px;
  color: #000;
}

.field-header {
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}

.fields > div {
  margin-bottom: 20px;
}

.fields div:last-child {
  margin-bottom: 0;
}

.text-divider {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.text-divider p {
  margin: 0;
}

.text-divider div {
  border-radius: 50%;
  height: 1px;
  background-color: #cccccc;
  flex: 1;
}

.template-title {
  margin: 0;
}

.field-header .bi-asterisk,
.field-required-label-container .bi-asterisk {
  font-size: 0.65rem;
  color: red;
}

.field-header > div {
  display: flex;
  gap: 3px;
}

.field-required-label-container {
  display: flex;
  gap: 3px;
  flex: 1;
}

.field-parameters {
  margin-left: 1.5rem;
}

.location-field {
  display: block;
  font-size: 1.25em;
  margin-top: 0;
  margin-bottom: 20px;
  color: #6c757d;
  line-height: 1.2;
}

.location-field strong {
  font-size: 1em;
  color: #212529;
}

button.form-control {
  background-color: #f8f9fa;
  transition: background-color 0.15s ease-in-out;
}

button.form-control:hover,
button.form-control:active {
  background-color: #e9ecef;
}

.checkbox-div {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  overflow: hidden;
}

.checkbox-div label {
  display: flex;
  margin: 0 !important;
  background-color: #f8f9fa;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.checkbox-div label:hover {
  background-color: #e9ecef;
}

.checkbox-div p {
  flex: 1;
  margin: 0.375rem 0.75rem;
  font-size: 1rem;
  color: inherit;
}

.checkbox-div input {
  display: none;
}

.checkbox-div span {
  padding: 0 10px;
  display: flex; /* Ensure the span stretches */
  align-items: center; /* Center text vertically */
  justify-content: center; /* Center text horizontally */
  border-left: 1px solid #ced4da;
  color: #66b0ff;
  background-color: white;
  transition:
    background-color 0.15s ease-in-out,
    color 0.15s ease-in-out;
}

.checkbox-div input:checked + label span:first-of-type,
.checkbox-div input:not(:checked) + label span + span {
  background-color: #66b0ff;
  color: white;
}

.dropdown-option-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dropdown-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dropdown-options > button {
  align-self: center;
}

.field-parameters .option {
  margin-left: 1.2rem;
}

.dropdown-option-row > div {
  display: flex;
  gap: 5px;
  flex-direction: column;
}

.dropdown-options .dropdown-option-item:first-child button {
  visibility: hidden;
}

.fields-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fields-container .image-field-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}

.fields-container .image-field-preview {
  display: none;
  gap: 6px;
  padding: 10px;
  border: 1px solid #007bff;
  border-radius: 0.375rem;
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, 120px);
}

.fields-container .doc-field-preview p,
.fields-container .location-field-preview p {
  padding: 0.65rem 0;
  border-bottom: 1px solid #cccccc;
  margin: 0;
}

.fields-container .doc-field-preview p:last-child,
.fields-container .location-field-preview p:last-child {
  border-bottom: none;
}

.fields-container .doc-field-preview,
.fields-container .location-field-preview {
  display: none;
  flex-direction: column;
  padding: 0 10px;
  border: 1px solid #007bff;
  border-radius: 0.375rem;
  margin-top: 10px;
}

.create-location-field .location-field-buttons {
  display: flex;
  gap: 15px;
}

.create-location-field .location-field-buttons #clearLocationBtn {
  display: none;
}

/* Popup styling */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1003;
  padding: 20px;
}

.popup-content {
  background-color: white;
  border-radius: 0.375rem;
  max-width: 760px;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  max-height: 100%;
  transition: height 0.5s ease-in-out;
  min-height: min(500px, 100%);
}

.popup-content > div {
  padding: 0 20px;
}

.popup-content .popup-header {
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #cccccc;
}

.popup-content .popup-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: end;
  padding-top: 20px;
  border-top: 1px solid #cccccc;
}

.popup-header-buttons {
  display: flex;
  justify-content: end;
}

.popup-content .record-item {
  display: flex;
  align-items: stretch;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  overflow: hidden;
}

.popup-content .record-item button {
  border: none;
  background-color: unset;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content .record-item label + button {
  border-left: 1px solid #dee2e6;
}

.popup-content .record-item label {
  cursor: pointer;
  padding: 10px;
  flex: 1;
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
  display: flex;
  align-items: center;
}

.popup-content .record-item label:hover,
.popup-content .record-item button:hover,
.popup-content .record-item label:hover,
.popup-content .record-item button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.popup-content .record-item button:active {
  background-color: #007bff;
  color: #fff;
}

.popup-content .record-item input[type="radio"]:checked + label {
  background-color: #007bff;
  color: #fff;
}

.popup-content .record-item input {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.popup-content .records-container {
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  flex: 1;
}

.clear-btn {
  background-color: unset;
  border: none;
}

.popup #selectLocationBtn {
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}

/* width */
.popup ::-webkit-scrollbar {
  width: 10px;
}

/* Track */
.popup ::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Handle */
.popup ::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 5px;
}

/* Handle on hover */
.popup ::-webkit-scrollbar-thumb:hover {
  background: #aaaaaa;
}

#popup-no-records-notice {
  display: none;
  align-self: center;
  margin: 20px;
  flex: 1;
}

.popup .popup-navigation {
  display: none;
  border-bottom: 1px solid #cccccc;
  align-items: stretch;
  padding: 0;
}

.popup .popup-navigation button {
  background-color: unset;
  border: none;
  border-right: 1px solid #cccccc;
  padding: 10px 13px;
}

.popup .popup-navigation button:hover,
.popup .popup-navigation button:focus {
  background-color: rgba(0, 0, 0, 0.05);
}
.popup .popup-navigation button:active {
  background-color: #007bff;
  color: #fff;
}

.popup .popup-navigation #popupNavigationTitle {
  padding: 0.375rem 0.75rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.select-template-row {
  display: block;
  color: inherit;
  text-decoration: none;
  margin: 0 20px;
  padding: 10px 5px;
  border-bottom: 1px solid #cccccc;
}

.select-template-row:last-child {
  border-bottom: none;
}

.select-template-row h6 {
  margin: 0;
}

.records-template-select {
  display: flex;
  flex: 1;
  align-items: center;
}

.records-template-select select {
  flex: 1;
}

.filters-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  max-width: 300px;
  background-color: #fff;
  transition: width 0.15s ease-in-out;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 375px) {
  /* 80% of 500px is 400px */
  .filters-menu {
    max-width: 100%;
  }
}

.filters-menu.open {
  width: 100%;
}

.filters-menu .filters-header,
.filters-menu .filters-submit,
.filters-menu .clear-filters-btn {
  margin: 0;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #674cb1;
  color: #fff;
  text-decoration: none;
}

.filters-menu .filters-header {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.filters-menu .filter-field h6 {
  font-weight: 700;
  /*font-size: 1rem;*/
}

.filters-menu .filters-submit,
.filters-menu .clear-filters-btn {
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  justify-content: center;
  border: none;
}

.filters-menu .clear-filters-btn {
  background-color: salmon;
  border-bottom: 1px solid #333333;
}

.filters-menu .clear-filters-btn + .filters-submit {
  box-shadow: none;
}

.filters-menu .filters-header button {
  color: inherit;
}

.filters-menu .filters-content {
  flex: 1;
  overflow-y: scroll;
}

.filters-menu .no-template-text {
  text-align: center;
  padding: 20px;
}

.filters-menu .filter-field {
  padding: 10px 20px;
  border-bottom: 1px solid #cccccc;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filters-menu .filter-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filters-menu .filter-checkbox * {
  margin: 0;
}

.filters-menu .filter-field .min-max-field-row {
  display: flex;
  gap: 20px;
  margin-bottom: 5px;
}

.filters-menu .filter-field .min-max-field-row > div {
  display: flex;
  gap: 5px;
  align-items: center;
}

.filters-menu .filter-field .min-max-field-row > div input {
  width: 100%;
}

.link-button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.375rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  margin: 0;
  padding: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  transition: background-color 0.15s ease-in-out;
}

.link-button:focus,
.link-button:active,
.link-button:hover,
.direct-input-number-field button:focus,
.direct-input-number-field button:active,
.direct-input-number-field button:hover {
  background-color: #0056b3;
  color: #fff;
  text-decoration: none;
}

@keyframes flash-red {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: #f8d7da;
  }
  100% {
    background-color: transparent;
  }
}

@keyframes flash-green {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: #d4edda;
  }
  100% {
    background-color: transparent;
  }
}

.direct-input-number-field {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.direct-input-flash-success-save {
  animation: flash-green 0.5s ease-in-out;
}

.direct-input-flash-error {
  animation: flash-red 0.5s ease-in-out;
}

.direct-input-number-field button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.375rem;
  background-color: #007bff;
  color: #fff;
  border: unset;
  margin: 0;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.15s ease-in-out;
}

.direct-input-number-field button:disabled {
  background-color: gray;
}

.direct-input-number-field .number-units {
  background-color: #f8f9fa;
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0.375rem 0.75rem;
}

.direct-input-number-field .number-value {
  width: 100%;
  text-align: center;
  margin: 0;
}

.direct-input-number-field input {
  text-align: center;
}

.field-row .carousel img {
  object-fit: contain;
  max-height: 60vh;
  background-color: #f7f7ff;
  border-radius: 0.375rem;
}

.carousel {
  border-radius: 0.375rem;
  background-color: #f7f7ff;
}

.carousel-control-prev-icon::after {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -45%;
  right: -55%;
  background-color: #f7f7ff;
  z-index: -1;
  border-radius: 50%;
}

.carousel-control-next-icon::after {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -55%;
  right: -45%;
  background-color: #f7f7ff;
  z-index: -1;
  border-radius: 50%;
}

.carousel-control-prev-icon {
  position: relative;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E") !important;
}

.carousel-control-next-icon {
  position: relative;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E") !important;
}

.doc-field-preview,
.dropdown-field-preview {
  flex-direction: column;
  padding: 0 10px;
  border: 1px solid #007bff;
  border-radius: 0.375rem;
  margin-top: 10px;
}

.doc-field-preview .file-row,
.dropdown-field-preview > p {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #cccccc;
  margin: 0;
  cursor: pointer;
}

.doc-field-preview .file-row:last-child,
.dropdown-field-preview > p:last-child {
  border-bottom: none;
}

.doc-field-preview .file-row p {
  margin: 0;
  text-decoration: none;
}

.doc-field-preview .file-row:hover {
  text-decoration: none;
}

.doc-field-preview .file-row img {
  width: 25px;
  aspect-ratio: 1;
}

#searchForm #templateSelect.active {
  background-color: #007bff;
  color: #fff;
}

#searchForm #openFiltersBtn.active {
  background-color: #007bff;
  color: #fff;
}

select + .select-preview {
  margin-top: 10px;
}

.location-tree .fields div.card {
  margin-top: 15px;
}

.location-tree .fields div.card:first-child {
  margin-top: 0;
}

.location-tree .fields div.card:last-child {
  border: 3px solid #007bff;
  pointer-events: none;
}

.location-tree .fields div.card:last-child a {
  color: #6c757d;
}

.location-tree .child-records-list {
  display: flex;
  flex-direction: column;
}

.location-tree .child-records-list i {
  align-self: center;
}

#scrollUp,
#scrollDown {
  display: none;
}

/* If only one button visible, center it at bottom right */
#scrollUp.single-visible {
  bottom: 20px;
}

.filters-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* semi-transparent black */
  z-index: 1001; /* below side menu (assuming side menu is z-index: 999 or higher) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filters-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-container {
  gap: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  margin: 80px auto;
  padding: max(20px, min(5vh, 50px)) max(20px, min(5vw, 50px));
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.login-container .login-title {
  margin: 0;
  margin-bottom: 20px;
}

.login-container.reset-password-container .login-title {
  margin: 0;
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

.login-container .google-signin {
  border: 1px solid #000000;
  border-radius: 100vh;
}

.login-container .btn-login {
  background-color: #906fd4;
  color: #fff;
  width: 100%;
}

.login-container .btn-login:hover,
.login-container .btn-login:focus,
.login-container .btn.btn-login:active {
  background-color: #674cb1;
  color: #fff;
}

.login-container .google-signin:hover,
.login-container .google-signin:focus,
.login-container .btn.google-signin:active {
  background-color: #e9ecef;
}

.input-group-prepend .input-group-text {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login-container .divider {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.login-container .divider p {
  font-size: 1rem;
  margin: 0;
  margin-bottom: 3px;
}

.login-container .divider span {
  height: 1px;
  flex-grow: 1;
  background: #919191;
}

.login-container .alert {
  margin: 0;
  padding: 0.5rem 1rem;
  width: 100%;
}

.btn-add-workplace {
  background-color: #906fd4;
  color: #fff;
}

.btn-add-workplace:hover,
.btn-add-workplace:focus,
.btn.btn-add-workplace:active {
  background-color: #674cb1;
  color: #fff;
}

.no-workplace-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.no-workplace-container p {
  text-align: center;
  margin: 0;
}

.workplace-card h6 {
  margin: 0;
}

.workplace-card .card-body {
  padding: 20px;
}

/* registros */
.schedule-header .checkbox-div {
  margin: 0 !important;
}

.schedules-container .checkbox-div {
  margin: 10px;
}

.schedule-header .checkbox-div span {
  flex: 1;
}

.schedule-header .checkbox-div span:first-child,
.schedules-container .checkbox-div span:first-child {
  border: unset;
}

.schedule-header {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-header:first-child {
  margin-top: 0;
}

.schedule-header .btn-delete i.bi {
  color: #dc3545;
}

.schedule-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-header h4 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.schedule-header .checkbox-div span,
.schedules-container .checkbox-div span {
  padding: 5px 10px;
  color: #007bff;
  background-color: white;
}

.schedule-header .checkbox-div input:disabled + label span,
.schedules-container .checkbox-div input:disabled + label span {
  color: white;
  background-color: #e8e8e8 !important;
}

.schedule-header .checkbox-div input:disabled + label,
.schedules-container .checkbox-div input:disabled + label {
  pointer-events: none;
}

.user-profile .checkbox-div span {
  color: #007bff;
  background-color: white;
}

.user-profile .checkbox-div input:checked + label span:first-of-type,
.user-profile .checkbox-div input:not(:checked) + label span + span {
  background-color: #007bff;
  color: white;
}

.schedule-header .checkbox-div input:checked + label span:first-of-type,
.schedules-container .checkbox-div input:checked + label span:first-of-type {
  background-color: #abe679;
  color: white;
}

.schedule-header .checkbox-div input:not(:checked) + label span + span,
.schedules-container .checkbox-div input:not(:checked) + label span + span {
  background-color: #e67979;
  color: white;
}

.user-profile .header-rule {
  margin-top: 5px;
}

.user-profile button i.bi,
.user-profile a i.bi {
  font-size: 1.2rem;
  color: #674cb1;
}

.user-profile .field-header {
  display: flex;
  align-items: center;
}

.user-profile .field-header h2,
.user-profile .field-header p {
  font-size: 1.3rem;
  margin: 0;
}

.user-profile button.btn-schedule-day:active {
  color: #495057;
}

.user-profile button.btn-schedule-day.active {
  background: #007bff;
  color: white;
}

.user-profile .card-body {
  padding: 10px;
  gap: 10px;
}

.schedules-container .card:last-child {
  margin-bottom: 0;
}

.schedules-container .card .btn-delete {
  margin: 5px;
}

.schedules-container .card .btn-delete i.bi {
  color: #dc3545;
}

.user-profile .card-body > div {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

#changePasswordModal .modal-body p {
  margin: 0;
}

.user-profile .options-container {
  padding: 0;
}

.user-profile .options-container ul {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
}

.user-profile .options-container i.bi:not(.bi-three-dots-vertical) {
  color: inherit;
}

.user-logs .schedules-container .no-logs {
  text-align: center;
}

.user-profile i.bi.icon-text-color {
  color: inherit;
}

.user-profile .btn-add-workplace {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@media only screen and (max-width: 600px) {
  .user-profile .card-body > div {
    flex-direction: column;
    gap: 5px;
  }

  .user-profile .card-body .vertical-divider {
    display: none;
  }

  .user-profile .field-header {
    flex-direction: column;
    gap: 0;
    align-items: start;
  }

  .user-profile .schedule-header {
    align-items: flex-start;
  }

  .user-profile .field-header p {
    font-size: 1rem;
  }
}

/* Admin panel */
.admin-page .schedule-header > div {
  display: flex;
  gap: 5px;
}

.admin-user-row {
  align-items: stretch;
}

.admin-user-row .admin-user-link {
  display: flex;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}

.admin-user-row .admin-user-link:hover,
.admin-user-row .admin-user-link:focus {
  background-color: rgba(0, 0, 0, 0.03);
  color: inherit;
}

.admin-user-row .admin-user-link .card-body {
  min-width: 0;
}

.admin-user-row .admin-user-link .workplace-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row .checkbox-div {
  align-self: center;
  margin: 10px;
}
