:root {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3b7ddd;
    --bs-btn-border-color: #3b7ddd;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #326abc;
    --bs-btn-hover-border-color: #2f64b1;
    --bs-btn-focus-shadow-rgb: 88, 145, 226;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2f64b1;
    --bs-btn-active-border-color: #2c5ea6;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #3b7ddd;
    --bs-btn-disabled-border-color: #3b7ddd
}


.ag-grid-footer {
    display: flex;
    background-color: #f5f5f5;
    border-top: 1px solid #ccc;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0 0 .5rem .5rem;
    gap: 160px;
}

.footer-cell {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 10px;

}

.font-weight-bolder {
    display: flex !important;
    justify-content: space-between !important;
}


#searchInput {
    width: 500px;
    border: 1px solid #ccc;
}

.btn {
  border-radius: 5px !important;
}

.btn-primary {
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
    color: var(--bs-btn-color) !important;
}





.wrapper{

    height: fit-content !important;
}

body{
    height: auto !important ;
}

.ag-row-even {
    background-color: #f9f9f9;
}

.ag-row-odd {
    background-color: #ffffff;
}

.numeric-cell {
    text-align: right !important;
}

/* #modalManage .modal-content{
    max-width: 800px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
} */

.ag-cell:focus,
.ag-cell.ag-cell-focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.select2-selection__rendered {
  line-height: 2.25rem !important;  /* Adjust to match your .form-select height */
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.select2-container .select2-selection--single {
  height: 2.5rem !important;
  display: flex;
  align-items: center;
}

.error-fascia {
    /* display: block; */
    /* height: 200px !important; */
    background-color: #eea755 !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

#table-body-dettagli tr td {
    width: 150px !important;
}
#edit_table-body-dettagli tr td{
    width: 150px !important;
}
#edit_table-body-dettagli tr, #table-body-dettagli tr{
    height: 10px !important;
}

.fit{
    max-width: 100px !important;
}

/* #table-body-dettagli th {
    width: 150px !important;
}
#edit_table-body-dettagli th{
    width: 150px !important;
}
#edit_table-body-dettagli th, #table-body-dettagli th{
    height: 10px !important;
} */

.table thead th {
  width: 150px !important;
}

.extra-small-btn {
    font-size: 0.675rem !important;    /* smaller than btn-sm */
    padding: 0.125rem 0.4rem !important; /* adjust as needed */
    line-height: 1.2 !important;
}

.hidden-error {
    display: none !important;
}

.hidden-note {
    display: none !important;
}

.modal.custom-z {
    z-index: 9999 !important;
}

  .custom-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
  }

  .custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .custom-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
  }

  .custom-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.4s;
    border-radius: 50%;
  }

  .custom-switch input:checked + .slider {
    background-color: #0d6efd;
  }

  .custom-switch input:checked + .slider:before {
    transform: translateX(26px);
  }

  .float-right {
    float: right !important;
  }

  textarea.form-control {
    /* height: 47.5% !important; */
    resize: none !important;    
  }

  .modal-body{
    padding-bottom: 0 !important;
  }

  .modal-header{
    padding: .5rem !important
  }

  .currency-toggle-wrapper {
    position: relative;
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 30px;
    overflow: hidden;
    font-size: 14px;
    background-color: #f1f1f1;
    height: 40px;
}

.currency-toggle-wrapper input[type="radio"] {
    display: none;
}

.currency-toggle-wrapper label {
    padding: 8px 20px;
    cursor: pointer;
    z-index: 2;
    position: relative;
    transition: color 0.3s;
    flex: 1;
    text-align: center;
}

.currency-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: #0d6efd;
    z-index: 1;
    transition: left 0.3s;
    border-radius: 30px;
}

.currency-toggle-wrapper input#usd:checked ~ .currency-slider {
    left: 50%;
}

.currency-toggle-wrapper input#eur:checked ~ label[for="eur"],
.currency-toggle-wrapper input#usd:checked ~ label[for="usd"] {
    color: white;
}

td.numeric-cell {
  background-color: #f9f9f9;
  transition: background-color 0.2s ease;
}

/* Highlight when editable */
td.numeric-cell.editable {
  background-color: #e6f0ff; /* light blue tint */
}

/* Optional: disabled-look for non-editable */
td.numeric-cell[contenteditable="false"] {
  opacity: 0.6;
}

td.carati-cell {
  background-color: #e6f0ff !important;
  font-weight: 500;
}

#insert-btn{
  background-color: #0d6efd !important;
  border-color: #2679f7 !important;
}
.content, .container-fluid{

  height: calc(100vh - 60px) !important;
  padding: 0 !important;
}

.ag-header-cell-label {
  white-space: pre !important;
  line-height: 1.2 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  word-break: break-word !important;
}

.ag-cell {
  border-right: 1px solid #e9e9e9; /* Light gray vertical lines */
  padding: 0 4px !important;
}

.ag-row:last-child .ag-cell {
  border-bottom: 1px solid #e9e9e9; /* Optional: bottom border on last row */
}

.ag-header{
  height: 45px !important;
}

.ag-header-cell{
  padding: 8px !important;
  height: 45px !important;
}

.allocated-cell {
  background-color: #e0ffe0 !important;
  font-weight: bold;
  color: #006400;
}

.over-limit {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

.ag-body-viewport { scrollbar-gutter: stable; }

/* fallback to keep a consistent gutter if needed */
.ag-body-viewport { overflow-y: scroll; }


td {
  position: relative !important;
}

td {
    position: relative;
    text-align: right;
    padding-left: 20px; /* Space for the icon on the left */
}

/* Hidden by default */
td::before {
    content: '';
    display: none;
}

/* Common visible arrow styles */
td.above-average::before,
td.below-average::before {
    display: inline-block;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.9em;
    line-height: 1;
}

/* Red up arrow */
td.above-average::before {
    content: "\f062"; /* fa-arrow-up */
    color: red;
}

/* Green down arrow */
td.below-average::before {
    content: "\f063"; /* fa-arrow-down */
    color: green;
}

td[contenteditable] {
    white-space: nowrap;       /* Prevents text wrapping */
    overflow: hidden;          /* Hides overflow content */
    text-overflow: ellipsis;   /* Optional: shows "..." if cut off */
    vertical-align: middle;    /* Keeps text vertically aligned */
    line-height: 1.2em;        /* Controls line height */
    max-height: 1.2em;         /* Prevents vertical growth */
}

/* Container for each option */
.custom-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Hide the default checkbox input */
.custom-checkbox-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Checkmark box */
.custom-checkbox-option .checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #0d6efd;
  border-radius: 0.25rem;
  background-color: #fff;
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.2s ease;
}

/* The actual tick */
.custom-checkbox-option input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  width: 8px;
  height: 15px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Background highlight when selected */
.custom-checkbox-option input[type="checkbox"]:checked + .checkmark {
  background-color: #0d6efd;
}

/* Entire row gets highlight */
.custom-checkbox-option input[type="checkbox"]:checked + .checkmark + .label-text,
.custom-checkbox-option input[type="checkbox"]:checked + .checkmark::after {
  color: white;
}

.custom-checkbox-option input[type="checkbox"]:checked ~ .label-text {
  font-weight: 500;
  color: #0d6efd;
}

.custom-checkbox-option input[type="checkbox"]:checked ~ .checkmark,
.custom-checkbox-option input[type="checkbox"]:checked ~ .label-text,
.custom-checkbox-option.checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.select2-selection__rendered{
    /* padding: 0.5rem 1rem; */
    color: #495057;
    line-height: 28px !important;
}

.brand-link .brand-image{
  margin: 0 0 0 8px !important;
}

#new_date:read-only {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}
/* .modal-footer { gap: 12px; flex-wrap: wrap; } */

  /* Wizard pinned to the far left even if modal-footer uses justify-content:flex-end */
  .wizard-container { 
    margin-right: auto !important; /* pushes the rest to the far right */
    max-width: 100% !important;
  }

  /* Compact, inline layout */
  .wizard-inline { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 8px 12px; 
    /* border: 1px solid #e5e7eb;  */
    border-radius: 12px; 
    background: #fff; 
  }

  .wizard-label { 
    font-weight: 600; 
    color: #1f2937; 
  }

  .radio-group { 
    display: inline-flex; 
    align-items: center; 
    gap: 12px; 
  }

  .radio-group label{
    margin-bottom: 0 !important;
  }

  .execute-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 6px 12px; 
 
    color: #000000 !important;  
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: 500; 
    white-space: nowrap; 
  }
  /* .execute-btn:hover { background-color: #4338ca; } */

  /* Ensure the wizard never exceeds the footer width */
  .wizard-inline, .wizard-container { max-width: 100%; }

  .modal-footer{
    padding: .5rem !important;
  }
  .radio-item { display:inline-flex; align-items:center; }

  .logo-xl{
    width: 120px !important;

  }

  .form-modal-vendita {
    margin-left: .5rem !important;
    margin-right: .5rem !important;
  }

  .changed-cell {
    background-color: #ffeeba !important;
  }

  .autosave-badge {
    padding: 0.35em !important;
    border-radius: 50% !important;
    margin-right: 0.35rem !important;
  }

.ag-cell .dropdown {
  max-width: 100%;
  width: 100%;        /* take the full width of the cell */
  display: block;
}

.dropdown-action-menu{
  line-height: 1 !important;
}

.custom-modal-lg {
    min-width: 90% !important;
}

.span-margin, #margine_doc, #totale_vendita, #totale_costo, #margine_ytd, #margine_target, #costo-target {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.input-symbol{
  border-top-right-radius: .25em !important;
  border-bottom-right-radius: .25em !important;
}

.navbar .nav-link {
    display: flex;
    align-items: center;
}
.navbar .nav-link i {
    font-size: 1em; /* make icons visually balanced with text */
}


.actions-button-cell-no-dropdown {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
}