@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

/* CSS Custom Properties (Variables) */
:root {
  /* Label corner variables */
  --label-corner-size: 12px;
  --label-corner-color: #763DEE;
}

/* remove rounding from cards, buttons and inputs */
.card, .btn, .form-control { border-radius: 2px	; }

/* Custom gradient */
.bg-gradient-purple {
  background: linear-gradient(154.88deg, #763DEE 4.78%, #3F04BA 84.04%);
}

html {
  overflow: hidden !important;
}

body,html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.ui-widget {
  font-family: 'Inter', sans-serif;
}

.app {
  height: calc(100vh - 70px);
  width: 100%;
}

@media (max-width: 575px) {
  .app {
    height: calc(100vh - 56px);
  }
}

.selectable {
  user-select: text;
}

.unselectable {
  user-select: none;
}

/*----------------------------------------------
Nice scrollbars
-----------------------------------------------*/
* {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: lightgrey transparent; /* Firefox */
}

::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(155, 155, 155, 0.5);
  border-radius: 20px;
  border: transparent;
}

/*----------------------------------------------
- App header
-----------------------------------------------*/

.navbar {
  user-select: none;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 1);
  height: 70px;
}

@media (max-width: 575px) {
  .navbar {
    height: 56px;
  }
}

.navbar__form input {
  height: 38px;
}

.btn-toolbar {
  gap: 16px;
}

.nav-link {
  color: #0D062D !important;
  font-weight: 500;
  transition: opacity .4s ease;
}

.nav-link--button {
  height: 32px;
  padding-left: 12px !important;
  padding-right: 12px !important;
  border-radius: 6px;
  background: #4300C9;
  color: white !important;
}

.nav-link--button.nav-link--icon svg path {
  fill: white;
}

.navbar-nav--center {
  justify-content: center;
}

.navbar__grid {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr;
  grid-auto-flow: column;
  align-items: center;
}

@media (max-width: 575px) {
  .navbar__grid {
    grid-template-columns: 1fr 2fr 1fr;
  }
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 575px) {
  .navbar-collapse {
    background-color: #fff;
    padding: 10px;
  }

  .navbar-nav {
    align-items: flex-end;
  }
}

@media (min-width: 576px) {
  .navbar-expand-sm .navbar-collapse {
    justify-content: flex-end;
  }
}


.nav-link:hover {
  opacity: .5;
}

.nav-link--icon {
  display: flex;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link--icon svg {
  color: #757D8A;
}

.navbar a, .navbar button, .navbar input {
  pointer-events: auto;
}

/* Make classes from bootstrap transparent for navbar */
.navbar.bg-info,
.navbar-modern.bg-info {
  background-color: rgba(23, 162, 184, 0.8) !important;
}

.navbar.bg-warning,
.navbar-modern.bg-warning {
  background-color: rgba(255, 193, 7, 0.8) !important;
}

.navbar.bg-light,
.navbar-modern.bg-light {
  background-color: rgba(248, 249, 250, 0.8) !important;
}

.navbar.bg-danger,
.navbar-modern.bg-danger {
  background-color: rgba(220, 53, 69, 0.8) !important;
}

#navbarCollapse.collapsing, #navbarCollapse.show {
  text-align: right;
}

.project-title {
  color: black;
  font-size: 1.1rem;
  font-weight: 600;
}

.project-title-separator {
  background: none;
  border: none;
}

.project-title-input, .disabled-project-title-input {
  border: 1px solid transparent;
  border-radius: 2px !important;
  padding-left: 0.4em;
  padding-right: 0.4em;
  text-overflow: ellipsis;
}

.project-name-input {
  text-align: right;
}

@media (max-width: 575px) {
  #project-info-container {
    flex: 1;
  }

  .project-name-input {
    text-align: center;
  }
}

.project-title-input:hover {
  border-color: #c4c4c4;
}

#sharing-link-button {
  background-color: rgb(241, 137, 4)!important;
  border-color: rgb(241, 137, 4)!important;
  color: black;
  white-space: nowrap;
}

#sharing-link-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(241, 137, 4, 0.5);
}

/*------------------------------------
- padding on the top of content to avoid navbar overlay on top content
------------------------------------*/

/* body {
  padding-top: 56px;
}

@media (min-width: 980px) {
  body {
  padding-top: 70px;
  padding-bottom: 0;
  }
} */


/*------------------------------------
- Toolbar
------------------------------------*/

.vertical_spacer {
  height: 7px;
}

.btn-group-xs > .btn, .btn-xs {
  padding: .25rem .4rem;
  font-size: .875rem;
  line-height: .5;
  border-radius: .2rem;
}

#ui-overlay {
  position: fixed;
  z-index: 1000 !important;
  top: 70px;
  height: calc(100vh - 70px);
  width: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  align-items: flex-start;
}

@media (max-width: 575px) {
  #ui-overlay {
    height: calc(100vh - 56px);
    top: 56px;
  }
}

@media (min-width: 980px) {
  #ui-overlay {
    padding: 24px;
  }
}

#ui-overlay a, #ui-overlay button {
  pointer-events: auto;
}

#manual {
  padding-bottom: 3px;
}

/* #toolbar {
  writing-mode: vertical-lr;
  flex-wrap: wrap;
  align-content: flex-start;

  border: 1px solid #787486;
  border-radius: 8px;
  padding: 12px;
  background-color: #fff;
  display: flex;
  gap: 8px;
} */

hr.toolbar-divider {
  border-top: 1px solid #DBDBDB;
  margin: 0;
}

/* #toolbar img {
  filter: invert(50%) sepia(13%) saturate(470%) hue-rotate(213deg) brightness(87%) contrast(77%);
} */

.tooltip__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: background .4 ease;
  border-radius: 6px;
}

#floorplan-dynamic-buttons {
  margin-left: 10px;
}

#floorplan-dynamic-buttons button {
  display: none;
}

.tooltip__button--highlight {
  background-color: #4300C9;
}

.tooltip__button svg path {
  transition: fill .4s ease;
}
.tooltip__button.active svg path {
  fill: #4300C9;
}
.tooltip__button.active img {
  filter: invert(16%) sepia(47%) saturate(5965%) hue-rotate(257deg) brightness(86%) contrast(138%) !important;
}

.tooltip__button:hover:not(.tooltip__button--highlight),
.tooltip__button:focus,
.tooltip__button.active {
  outline: 0;
  background: #F1EEFD;
}

/* #toolbar::-webkit-scrollbar {
  display: none;
}

#toolbar button:focus {
  box-shadow: none !important;
} */

/* used for #toolbar */
.btn-outline-secondary:not(.active, :hover) {
  background-color: white;
}

#distance-place {
  border-radius: 8px;
  padding: 12px;
}

#distance-place:not(:empty) {
  border: 1px solid #787486;
  background-color: #fff;
}

#distance-place .distance-label-primary {
  font-weight: 600;
  line-height: 1.3;
}

#distance-place .distance-label-axis {
  margin-top: 4px;
  font-size: 0.85em;
  color: #5f5c6b;
  line-height: 1.2;
}

/*------------------------------------
- Project details
------------------------------------*/

#bottom-screen {
  overflow-y: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  align-content: stretch;
  width: 100%;
  min-height: 30vh;
}

#project-details {
  flex-shrink: 0; /* Do not shrink */
  flex-grow: 0;
  overflow-y: scroll; /* So that Firefox takes the scrollbar into account when computing width */
  overflow-x: auto;
  white-space: nowrap;
  font-size: .875rem;
  background-color: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.07);
  padding-top: 5px;
  scrollbar-width: thin;
  user-select: none;
  pointer-events: auto;
  max-width: 50vw;
  width: 310px;
  max-height: 100%;
  padding: 12px;
  border: 1px solid #787486;
  border-radius: 8px;
}

#bottom-screen-middle {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

#bottom-screen-right {
  justify-content: center;
  flex-grow: 0;
  width: 80px;
  height: 80px;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

#bottom-screen-right img {
  transform-origin: center center;
}


.floorplan-compass {
  pointer-events: all;
}
#floorplan-compass-green {
  display: none;
}
#floorplan-compass-orange {
  display: none;
}
#floorplan-compass-red {
  display: none;
}

.tool-buttons {
  display: none;
  flex-direction: row;
  border: 1px solid #787486;
  border-radius: 8px;
  padding: 12px;
  gap: 8px;
  background-color: #fff;
  z-index: 10;
}

#visible-project-items {
  vertical-align: baseline;
}

#visible-project-items::after {
  vertical-align: initial;
  margin-left: 0;
}

#visible-project-items:focus {
  outline-width: 0;
}

#project-details .btn-outline-secondary {
  background-color: transparent;
  max-width: 25vw;
}

#project-details .btn-outline-secondary:hover, #project-details .btn-outline-secondary.active {
  background-color: rgb(216, 229, 238);
}

#project-details .pd-cluster {
  display: flex;
  align-items: center;
  gap: 20px;
}

#project-details .pd-item {
  display: flex;
  align-items: center;
  line-height: 1.5;
  text-align: left;
  padding: 0px;
  margin-left:30px;
  border: none;
  cursor: pointer;
}

#pd-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#pd-accordion > div {
  width: 300px;
  max-width: 100%;
}

#project-details .pd-item:hover,
#project-details .cluster-icon-and-name:hover {
  background-color: rgb(236, 244, 248);
}

#project-details .pd-item.active,
#project-details .cluster-accordion.active {
  background-color: rgb(216, 229, 238);
}

#project-details .cluster-icon-and-name {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

#project-details .pd-item-buttons {
  flex-grow: 1;
  text-align: right;
}

#project-details #pd-header, #project-details .cluster-name {
  white-space: normal;
  overflow-wrap: anywhere;
}

#project-details .pd-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#project-details .pd-item-name {
  padding: 0 1em 0 1em;
  color: black;
  font-size: 0.7rem;
}

#project-details .not-visible .pd-item-name {
  color: #aaa;
  font-style: italic;
}

#project-details label {
  margin-bottom: 0.2em;
  font-size: 0.7em;
  vertical-align: middle;
}

#project-details .cluster-name {
  color: black;
  font-size: 0.8rem;
  padding-left: 0.3em;
}

#project-details .cluster-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

#project-details .ui-accordion-content{
  border: 0;
  padding: 0.5em 0 0.5em 2px !important;
  overflow: visible; /* For draggable items to be visible */
  background: transparent !important;
}

#project-details .ui-icon-plus,
#project-details .ui-icon-minus{
  background-position: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-top: 0;
}

#project-details .ui-icon-plus {
  background: url("/static/img/chevron-right.svg"), #F5F5F5;
}

#project-details .ui-icon-minus {
  background: url("/static/img/chevron-down.svg"), #F5F5F5;
}

#project-details .ui-cluster-hover {
  background-color: rgba(216, 238, 241, 0.8);
}

#project-details .ui-accordion-header{
  background: inherit;
  border: 0;
  padding: 0;
  margin: 0;
}

#project-details .ui-accordion-header-icon{
   color: black;
}

.project-related-btn {
  color: #787486;
  vertical-align: baseline !important;
}

.cluster-related-btn {
  vertical-align: bottom;
}

.cluster-related-btn.fa-stack {
  width: auto;
  height: auto;
}

.remove-cluster-btn
{
  font-size: 1.1em;
  padding-left: 0.45em;
  margin-bottom:0.1em;
}

.stack-plus {
  width: 1.4em;
  height: 1.4em;
  top: -0.55em;
  right: -0.22em;
  position: absolute;
  color: black;
}

#pd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  font-weight: bold;
}

#pd-items {
  margin-top: 10px;
}

#pd-header figure {
  margin: 0;
}

#pd-header #visible-project-items {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
}

#project-details .pd-title{
  font-size: 1.1rem;
  font-weight: bold;
}

#pd-project-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

#instructions {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  gap: 24px;
  flex-direction: column;
  padding: 0 40px 0 5px;
  background-color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

.tooltip {
  pointer-events: none;
  z-index: 1020;
}

/*------------------------------------
- COLOR primary
------------------------------------*/
.alert-primary {
  color: #19004d;
  background-color: #b795ff;
  border-color: #aa80ff;
}

.alert-primary hr {
  border-top-color: #9967ff;
}

.alert-primary .alert-link {
  color: #08001a;
}

.badge-primary {
  color: #fff;
  background-color: #4200C8;
}

.badge-primary[href]:hover, .badge-primary[href]:focus {
  color: #fff;
  background-color: #310094;
}

.bg-primary {
  background-color: #4200C8 !important;
}

a.bg-primary:hover, a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
  background-color: #310094 !important;
}

.border-primary {
  border-color: #4200C8 !important;
}

.btn-primary {
  color: #fff;
  background-color: #4200C8;
  border-color: #4200C8;
  white-space: nowrap;
}

.btn-primary:hover {
  color: #fff;
  background-color: #3600a4;
  border-color: #310094;
}

.btn-primary:focus, .btn-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(66, 0, 200, 0.5);
}

.btn-primary.disabled, .btn-primary:disabled {
  color: #fff;
  background-color: #d0d0d0;
  border-color: #d0d0d0;
}

.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #310094;
  border-color: #2c0085;
}

.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(66, 0, 200, 0.5);
}

.btn-outline-primary {
  color: #4200C8;
  background-color: transparent;
  border-color: #4200C8;
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: #4200C8;
  border-color: #4200C8;
}

.btn-outline-primary:focus, .btn-outline-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(66, 0, 200, 0.5);
}

.btn-outline-primary.disabled, .btn-outline-primary:disabled {
  color: #4200C8;
  background-color: transparent;
}

.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle {
  color: #fff;
  background-color: #4200C8;
  border-color: #4200C8;
}

.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(66, 0, 200, 0.5);
}

.list-group-item-primary {
  color: #19004d;
  background-color: #aa80ff;
}

.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus {
  color: #19004d;
  background-color: #9967ff;
}

.list-group-item-primary.list-group-item-action.active {
  color: #fff;
  background-color: #19004d;
  border-color: #19004d;
}

.wrap-anywhere {
  overflow-wrap: anywhere;
}

.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: #aa80ff;
}

.table-hover .table-primary:hover {
  background-color: #9967ff;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
  background-color: #9967ff;
}

.text-primary {
  color: #4200C8 !important;
}

a.text-primary:hover, a.text-primary:focus {
  color: #310094 !important;
}


/* link color (added later) */;
/* a:link {
  color: #4200C8;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: #fff;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #310094;
  background-color: transparent;
  text-decoration: none;
}

a:active {
  color: #310094;
  background-color: transparent;
  text-decoration: none;
}

 */



/* ----- SLIDERS -------------*/


.slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;
  background: #dee2e6;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
}


/* ----- MODALS -------------*/

.centered-modal-content {
  align-items: center;
}
/* alert modal on top of all */
#alert-modal {
  z-index:1200;
}
#alert-modal .modal-content {
  height: 90vh;
}
#alert-modal iframe {
  width: 100%;
  height: 98%;
  border-width: 0;
}
.undo-symbol {
  font-size: 200%;
  vertical-align: -10%;
}

.modal-backdrop.show {
  opacity: 0.2;
}

/* So that we can show a modal (e.g. spinner) over another modal */
.modal-backdrop.show ~ .modal-backdrop.show {
  z-index: 1070;
}
.modal.show ~ .modal.show {
  z-index: 1075;
}
/* And a third one */
.modal-backdrop.show ~ .modal-backdrop.show ~ .modal-backdrop.show {
  z-index: 1080;
}
.modal.show ~ .modal.show ~ .modal.show {
  z-index: 1085;
}
/* Put the load spinner above all */
.modal.load-spinner {
  z-index: 1100 !important;
}

.modal-footer.modal-footer--wrap {
  flex-wrap: wrap;
  row-gap: 12px;
}

.load-logo {
  width: 150px;
  margin: 10px auto;
}

.load-logo > img {
  width: 100%;
}

.load-spinner .modal-dialog {
  display: table;
  position: relative;
  margin: 0 auto;
  top: calc(50% - 24px);
}
.load-spinner .modal-dialog .modal-content {
  background-color: transparent;
  border: none;
}

.modal.newbackdrop.show{
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

#spinner-modal-with-text .modal-content {
  /* Harmonisation avec le design des modales React */
  background-color: rgba(255,255,255,0.95);

  text-align: center;
  padding: 40px 24px 40px 24px; /* !pt-[40px] !px-[24px] !pb-[40px] */
  border-radius: 32px; /* rounded-[32px] */
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Centrage et animation d'apparition proche des modales React */
#spinner-modal-with-text.modal {
  z-index: 1099; /* légèrement au-dessus des modales BS par défaut */
}

#spinner-modal-with-text .modal-dialog {
  margin: 0 auto;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: scale(0.97) translateY(6px);
  opacity: 0;
}

#spinner-modal-with-text.show .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Logo et contenu */
#spinner-modal-with-text .load-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#spinner-modal-with-text .load-logo img {
  max-width: 120px;
  height: auto;
  display: block;
}

#spinner-modal-with-text #spinner-text {
  font-size: 18px; /* ~ text-[18px] */
  line-height: 26px;
  color: #111827; /* proche de text-black React */
  margin-top: 8px;
}

/* Bouton identique aux modales React */
#spinner-modal-with-text #spinner-abort-button-with-text {
  width: 100%;
  height: 44px; /* h-[44px] */
  border-radius: 12px; /* rounded-[12px] */
  font-weight: 400; /* !font-[400] */
  font-size: 0.875rem; /* !text-sm */
  line-height: 1;
  color: #ffffff; /* !text-white */
  border: 0; /* !border-0 */
  cursor: pointer; /* cursor-pointer */
  transition: all 0.2s ease-in-out; /* transition-all duration-200 ease-in-out */
  outline: none; /* focus:!outline-none */
  background: linear-gradient(154.88deg, #763DEE 4.78%, #3F04BA 84.04%);
  box-shadow: none;
  padding: 0 16px;
}

#spinner-modal-with-text #spinner-abort-button-with-text:hover {
  transform: translateY(-1px);
}

#spinner-modal-with-text #spinner-abort-button-with-text:focus {
  box-shadow: 0 0 0 2px rgba(59,130,246,0.6), 0 0 0 4px rgba(255,255,255,0.9); /* focus:!ring-2 focus:!ring-offset-2 (approx) */
}

#spinner-modal-with-text #spinner-abort-button-with-text:disabled {
  opacity: 0.5; /* disabled:opacity-50 */
  cursor: not-allowed; /* disabled:cursor-not-allowed */
}

/* Backdrop flou comme pour les modales React (actif seulement pendant le test) */
body.react-like-backdrop .modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Assurer transparence de l'arrière-plan de la boîte Bootstrap préalable */
.load-spinner .modal-dialog .modal-content {
  background-color: transparent;
  border: none;
}

/* Copied and generalized from imapper-refonte.css */
body .modal-dialog .modal-content .modal-header, body #op-modal .modal-dialog .modal-content .modal-header {
  border: none;
}
body .modal-dialog .modal-content .modal-header p, body #op-modal .modal-dialog .modal-content .modal-header p {
  display: block;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  font-style: normal;
  font-size: 1.5rem;
  font-family: Arial;
  line-height: 100%;
  color: black;
  text-align: left;
  font-weight: 600;
}

.modal-body {
  overflow-x: auto;
}

/* Prevent background clicks for freerider-modal */
#freerider-modal {
  pointer-events: none;
}

/* Authorize clicks on freerider modal-dialog */
#freerider-modal .modal-dialog {
  pointer-events: auto;
}

.progress {
  height: 2em;
}

/* #user-export-modal input {
  position: relative;
} */

#stl-3D-preview {
  width: 100%;
  aspect-ratio: 1.7777;
  display: none;
}

#stl-3D-preview-canvas {
  width: 100% !important;
  height: 100% !important;
}
canvas:focus {
  outline: none;
}

.user-export-error-message {
  display: none;
  color: #ca2737;
}

/* Make disabled checkbox black if checked */
#user-export-modal .form-check-input:disabled:checked ~ .form-check-label {
  color: black;
}

/* #user-export-modal .form-check {
  margin-top: 5px;
} */

/* #user-export-modal .form-check-input {
  vertical-align: middle;
  margin-top: 0;
} */

/* #user-export-modal .form-check-label {
  vertical-align: middle;
} */

.discount-alert {
  border-color: #6639be !important;
}

.discount-alert-link {
  text-align: center;
  color: #6639be;
}

.discount-alert-link:hover {
  color: #6639be;
  text-decoration: none;
}

#sharing-link-list {
  margin-top: 10px;
  font-size: 0.9em;
  color: rgb(50, 50, 50);
}

#sharing-link-list ul {
  list-style: none;
}

#delete-all-sharing-links-button {
  margin-right: auto;
  background-color: rgb(184, 0, 0);
  border-color: rgb(184, 0, 0);
}

#delete-all-sharing-links-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(184, 0, 0, 0.5);
}

#sharing-link-preview-zone {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.65);
  border: 6px dashed rgb(241, 137, 4);
  display: none;
}

#sharing-link-preview-zone.active {
  display: block !important;
}

.drag-and-drop-zone-text {
  text-align: center;
  font-size: 2em;
  margin-top: 100px;
}

.drag-and-drop-container {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999999999;
  display: block;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 20px;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 8px dashed rgba(67, 0, 201, 0.5);
  border-radius: 10px;
  transition: 0.3s;
  display: none;
}

.drag-and-drop-container.active {
  display: block !important;
}

.mk-listing-delete-button.btn-danger, .mk-listing-undelete-button.btn-danger {
  color: #fff !important;
  background-color: #ce616c !important;
  border-color: #ce616c !important;
}

.mk-listing-delete-button.btn-danger:hover, .mk-listing-undelete-button.btn-danger {
  background-color: #ca2737 !important;
  border-color: #ca2737 !important;
}

.mk-listing-undelete-button, .deleted-row .mk-listing-delete-button {
  display: none !important;
}

.deleted-row .mk-listing-undelete-button {
  display: block !important;
}

.horizontal-line-in-listing {
  border-bottom: 1px solid #d9d9d9;
  width: 100%;
  margin: 0.8em 0;
}

.section-title-in-listing {
  color: #868686;
  font-weight: bold;
  font-size: 0.9rem;
  width: 100%;
}

.grid-view .mk-tophead-checkbox {
  display: none;
}

.mk-aoidf-button.mk-color-purple:disabled, .mk-aoidf-button.mk-color-purple:disabled:hover {
  background-color: #846fae;
}

.list-view #op-modal-tooltip-container, .list-view #aoidf-modal-tooltip-container {
  display: none;
}

#op-modal-body .custom-file-label::after {
  content: attr(data-after-content) !important;
}

#mk-op-listing-tophead > div::first-letter, #mk-aoidf-listing-tophead > div::first-letter {
  text-transform: capitalize !important;
}

#mk-op-listing-sorting-selector.form-select, #mk-aoidf-listing-sorting-selector.form-select {
  padding-right: 1.8rem !important;
  font-weight: 400;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px 12px;
  border: 1px solid #e6e6e6!important;
}

#mk-op-listing-sorting-selector.form-select:hover, #mk-aoidf-listing-sorting-selector.form-select:hover {
  border: 1px solid #adadad!important;
}


#area-params-modal .form-check-label {
  vertical-align: middle;
}

#area-params-modal .form-check-input {
  vertical-align: middle;
  margin-top: 2px;
}

#area-params-modal .form-check {
  margin-top: 1px;
}


#cc-modal .modal-body .custom-file-label::after {
  content: attr(data-after-content) !important;
}

/* ----- IntroJS fix -------------*/

.introjs-helperLayer {
  background: transparent;
}

.introjs-overlay {
  opacity: 0 !important;
}

.introjs-helperLayer:before {
  opacity: 0;
  content: '';
  position: fixed;
  width: inherit;
  height: inherit;
  border-radius: 0.5em;
  box-shadow: 0 0 0 1000em rgba(0,0,0, .7);
  opacity: 1;
}

.introjs-helperLayer:after {
  content: '';
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: fixed;
  z-index: 1000;
}

.introjs-helperNumberLayer {
  left: 5px;
}

/* ----- Circular buttons -------------*/

.btn-circle.btn-sm {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 11px;
  font-size: 8px;
  text-align: center;
}
.btn-circle.btn-md {
  width: 50px;
  height: 50px;
  padding: 7px 10px;
  border-radius: 25px;
  font-size: 10px;
  text-align: center;
}
.btn-circle.btn-xl {
  width: 70px;
  height: 70px;
  padding: 10px 16px;
  border-radius: 35px;
  font-size: 12px;
  text-align: center;
}

/* ----- MISC -------------*/

.force-arrow-cursor {
  cursor: auto !important;
}

.w-49 {
  width: 49% !important;
}

.flex-gap-1 {
  gap: 0.25rem !important;
}

.darkblue {
  color: darkblue;
}

.red {
  color: red;
}

.red-placeholder::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: red;
  opacity: 1; /* Firefox */
}

.red-placeholder:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: red;
}

.red-placeholder::-ms-input-placeholder { /* Microsoft Edge */
  color: red;
}

.floating-text {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  font-size: small;
  font-weight: bold;
  pointer-events: none;
  text-align: center;
}


.floating-text.red-light-floating-text {
  font-size: x-small;
  font-weight: normal;
  font-style: italic;
  color: #ca2737;
}

.floating-text a, .floating-text button {
  pointer-events: auto;
  cursor: pointer;
}

.area-info a, .area-info button {
  padding-left: 2px;
  color: #314f6f !important;
}

.copy-area-infos-icon {
  margin-top: -3px;
}

.selection-toolbox {
  padding: 3px;
}

#selection-btn-automatic-floor-plan{
  border: 2px solid red;
}

#selection-btn-automatic-floor-plan-v2{
  border: 2px solid yellowgreen;
}

.white-75opac-bg {
  background-color: rgba(255, 255, 255, .75);
  /* border-radius: 5px; Buggy on Firefox */
  padding: 0 3px 0 3px;
}

.white-50opac-bg {
  background-color: rgba(255, 255, 255, .5);
  /* border-radius: 5px; Buggy on Firefox */
  padding: 0 3px 0 3px;
}

div.label-corner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: var(--label-corner-size) solid var(--label-corner-color);
  border-right: var(--label-corner-size) solid transparent;
}

.label-content-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-text {
  flex: 1;
  word-break: break-word;
}

.label-action-icons {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.label-action-icons a {
  padding: 0 !important;
  color: #000000 !important;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.label-action-icons a:hover {
  opacity: 1;
}

.label-annotation-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #000000;
  font-size: 13px;
}


.label {
  background-color: rgba(230, 236, 237, 0.50);
  border-radius: 0px 8px 8px 8px;
  padding: 6px 10px;
  max-width: 15em;
  color: #000000;
  font-size: 13px;
  font-weight: normal;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: left;
  word-break: break-word;
}

.alert-message {
  position: fixed;
  display: none;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;
  text-align: left;
  pointer-events: none;
}

.alert-message a {
  font-weight: bold;
  font-size: small;
  color: #4200C8 !important;
  pointer-events: auto;
  text-decoration: none;
}

.alert-message button {
  pointer-events: auto;
}

.custom-dismissible-alert {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  text-align: center;
  background-color: rgba(209, 236, 241, 0.8);
  padding-top: .7rem;
}

.above-modals-and-load-spinner-backdrop {
  z-index: 1090 !important;
}

.close {
  line-height: 0.8;
}

.modal-auto-width {
  width: auto;
}

.reset-pwd-link {
  color: #495057;
  font-size: small;
  margin-left: 0.5em;
}

.reset-pwd-link:hover {
  color: #2b2c30;
}

.alert-primary a, .alert-primary a:hover {
  color: #fff;
}

.fontsize-28px {
  font-size: 28px;
}

.halfgray {
  -webkit-filter: grayscale(0%); /* Safari 6.0 - 9.0 */
  filter: grayscale(0%);
}

.gray {
  -webkit-filter: grayscale(0%); /* Safari 6.0 - 9.0 */
  filter: grayscale(0%);
}

.ui-resizable-nw, .ui-resizable-ne, .ui-resizable-sw, .ui-resizable-se {
  width: 30px;
  height: 30px;
  background-image: none;
}
.ui-resizable-nw {
  left: -10px;
  top: -10px;
}
.ui-resizable-ne {
  right: -10px;
  top: -10px;
}
.ui-resizable-sw {
  left: -10px;
  bottom: -10px;
}
.ui-resizable-se {
  right: -10px;
  bottom: -10px;
}
.ui-resizable-nw::before, .ui-resizable-ne::before, .ui-resizable-sw::before, .ui-resizable-se::before {
  content: '';
  display: block;
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: #000;
  border-style: solid;
}
.ui-resizable-nw::before {
  left: 10px;
  top: 10px;
  border-width: 3px 0 0 3px;
}
.ui-resizable-ne::before {
  right: 10px;
  top: 10px;
  border-width: 3px 3px 0 0;
}
.ui-resizable-se::before {
  right: 10px;
  bottom: 10px;
  border-width: 0 3px 3px 0;
}
.ui-resizable-sw::before {
  left: 10px;
  bottom: 10px;
  border-width: 0 0 3px 3px;
}

.bi-plus-circle > path {
  transform: scale(2);
}

/* TODO: DEPRECATED - React component DraggableResizableSquare now manages #image-container display */
/*
#image-container {
  display: none !important;
  pointer-events: none;
  z-index: -1;
}
*/

#image-container > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#image-container > div {
  position: absolute;
}

#btn-show-panorama {
  position: fixed;
  top: 74px;
  right: 4px;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: border .4s ease, background .4s ease;
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #787486;
}

@media (max-width: 575px) {
  #btn-show-panorama {
    top: 60px;
  }
}

#btn-show-panorama:focus {
  outline: 0;
}

#btn-show-panorama:not(:disabled):not(.disabled).active, #btn-update-camera-offset-mode:not(:disabled):not(.disabled).active, #btn-display-masks:not(:disabled):not(.disabled).active {
  /* background-color: rgb(216, 229, 238); */
  background: #F1EEFD;
  border: 1px solid transparent;
  fill: #4300C9;
}

#btn-update-camera-offset-mode {
  position: fixed;
  top: 194px;
  right: 4px;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: border .4s ease, background .4s ease;
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #787486;
  font-size: 12px;
}

#enter-update-camera-offset-mode-button {
  margin-right: auto;
}

#btn-display-masks {
  position: fixed;
  top: 154px;
  right: 4px;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: border .4s ease, background .4s ease;
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #787486;
}


#btn-display-masks:focus {
  outline: 0;
}

#btn-vertical-ruler {
  position: fixed;
  top: 114px;
  right: 4px;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: border .4s ease, background .4s ease;
  border-radius: 6px;
  background-color: #fff;
  border: 1px solid #787486;
}

@media (max-width: 575px) {
  #btn-vertical-ruler {
    top: 60px;
  }
}

#btn-vertical-ruler:focus {
  outline: 0;
}

#btn-vertical-ruler:not(:disabled):not(.disabled).active {
  /* background-color: rgb(216, 229, 238); */
  background: #F1EEFD;
  border: 1px solid transparent;
}

#btn-vertical-ruler:not(:disabled):not(.disabled).active path {
  /* background-color: rgb(216, 229, 238); */
  fill: #4300C9;
  stroke: #4300C9;
  stroke-width: 80;
}

.alert-message table {
  border-collapse: collapse;
}

.alert-message table td, .alert-message table th {
  border: 1px solid #222222;
  text-align: left;
  padding: 2px 5px;
}

input[type="text"] {
  border-width: 1px;
}

input[type="checkbox"] {
  cursor: pointer;
}

/* TEMP */
#mk-aoidf-upload-files.active {
  background: rgba(67,0,201,.05) !important;
  border-style: dashed !important;
  border-width: 5px !important;
}

#cc-modal .modal-body {
  font-size: 0.8em;
}

#cc-modal .modal-body h4 {
  font-size: 1.2em;
}

.mapper-calibration-div {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

/* .mapper-calibration-div:hover {
  background-color: #fafafa;
} */

.mapper-calibration-div .card-content {
  padding: 10px;
}

.mapper-calibration-div h4 {
  cursor: pointer;
  margin-bottom: 0;
}

.mapper-calibration-div .card-header:first-child {
  border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

.mapper-calibration-div .card-header {
  padding: 0.1rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0,0,0,.125);
}

.mapper-calibration-div .btn-link:hover {
  color: #000;
  text-decoration: none;
}

.mapper-calibration-div .btn-link {
  color: #000;
  text-decoration: none;
}

.mapper-calibration-div .btn {
  font-size: unset;
}

.mapper-calibration-div > .cards-div{
  margin-top: 10px;
}

.mapper-calibration-div.calibrated.accordion > .accordion-toggle::after {
  content: '\2713 ' attr(data-after-content); /* '\2713' is for check */
  display: inline-block;
  color: green;
  margin-left: 10px;
  font-size: 0.9em;
  font-weight: normal;
}

#image-horizontal-dotted-line {
  position: absolute;
  width: 100%;
  height: 0px;
  border-bottom: 2px dashed #f00;
  pointer-events: none;
}

/* ----- ADMINISTRATION -------------*/

#create-user-container select {
  border: 1px solid gray;
  -moz-appearance: auto; /* Unset sanitize.css */
  -webkit-appearance: auto; /* Unset sanitize.css */
}

.select-list {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  width: 100%;
  cursor: pointer;
  background-color: #ffffff;
  appearance: auto;
  position: relative;
}

.react-root {
  height: 100%;
  width: 100%;
  pointer-events: auto;
}
/* Opening Parameters Panel */
.opening-params-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 230px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.opening-params-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.opening-params-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.opening-params-content {
  padding: 16px;
}

/* Add padding to param-group to reserve space for apply-to-all button */
.param-group {
  margin-bottom: 5px;
}

.param-label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
  font-size: 12px;
}

.opening-params-panel .form-control {
  width: 100%;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.opening-params-panel .form-control:focus {
  border-color: #4300C9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(67, 0, 201, 0.2);
}



/* Responsive adjustments */
@media (max-width: 768px) {
  .opening-params-panel {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* Wall Parameters Panel */
.wall-params-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 230px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wall-params-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.wall-params-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.wall-params-content {
  padding: 16px;
}

.wall-params-panel .form-control {
  width: 100%;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.wall-params-panel .form-control:focus {
  border-color: #4300C9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(67, 0, 201, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wall-params-panel {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* Make it default buttons - hidden by default, shown when value changes */
.btn-link.btn-sm.text-muted {
  height: auto; /* Allow full height for text */
  overflow: visible; /* Show all content */
  opacity: 0; /* Hidden by default */
  margin-top: 3px;
  font-size: 0.6em;
  line-height: 1.1;
  display: block; /* Always display to maintain space */
  padding-left: 0; /* Remove left padding */
  text-align: left;
  transition: opacity 0.2s ease; /* Smooth transition */
  min-height: 1.1em; /* Ensure consistent height with placeholders */
}

.btn-link.btn-sm.text-muted.show {
  opacity: 1; /* Show when class is added */
}


/* Remove spinner arrows from number inputs */
.opening-params-panel input[type="number"]::-webkit-outer-spin-button,
.opening-params-panel input[type="number"]::-webkit-inner-spin-button,
.wall-params-panel input[type="number"]::-webkit-outer-spin-button,
.wall-params-panel input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.opening-params-panel input[type="number"],
.wall-params-panel input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}

/* Unit suffix styling for input fields */
.unit-suffix {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

.input-with-unit {
  position: relative;
  display: inline-block;
  width: 100%;
}