//Bootsrap 
.align-items-baseline {
  align-items: baseline !important;
}

/* Input */
input.mat-mdc-input-element,
select.mat-mdc-input-element {
  -webkit-appearance: none !important;
  background-color: #fff !important;
  display: block !important;
  width: 100% !important;
  height: 40px !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075) !important;
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s,
    -webkit-box-shadow ease-in-out 0.15s !important;

  border: 1px solid #A9AEB1 !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  color: #19191A;
  margin: 4px 0 !important;
}

.mat-mdc-input-element::placeholder {
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  vertical-align: middle !important;
}

.mat-mdc-input-element:hover {
  background-color: #EBF4FF !important;
}

/*When input is focused (e.g., via Tab), border turns black */
.mat-mdc-input-element[type="text"]:focus,
.mat-mdc-input-element[type="number"]:focus,
.mat-mdc-input-element[type="input"]:focus {
  /* box-shadow: 0 0 0 2px white, 0 0 0 3px #19191a !important; */
  // outline: 1px solid #1A1A1A !important;
  // box-shadow: none !important;
  outline: 1px solid #000000;
  outline-offset: 2px;
}

/* Change border to red when the input has content */
.mat-mdc-input-element[type="text"]:not(:placeholder-shown),
.mat-mdc-input-element[type="number"]:not(:placeholder-shown),
.mat-mdc-input-element[type="input"]:not(:placeholder-shown) {
  border: 2px solid #002E5F !important;
  box-shadow: none !important;
  // outline: none !important;
}

/* When input loses focus*/
.mat-mdc-input-element[type="text"]:not(:focus):not(:placeholder-shown),
.mat-mdc-input-element[type="number"]:not(:focus):not(:placeholder-shown),
.mat-mdc-input-element[type="input"]:not(:focus):not(:placeholder-shown) {
  border: 1px solid #A9AEB1 !important;
}

.inail-mat-no-label-field .mat-mdc-form-field-infix {
  padding-top: 0px !important;
  // min-height: 36px !important; 
}

.inail-mat-no-label-field .mat-mdc-input-element {
  margin-top: 0px !important;
}

/* Stile input al focus */
// .mat-mdc-input-element:focus {
//   outline: 2px auto !important;
//   outline-color: currentcolor !important;
//   outline-color: #000 !important;
//   box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
//     0 0 8px rgba(102, 175, 233, 0.6) !important;
//   border-color: #66afe9 !important;
// }

.mdc-text-field--filled:not(.mdc-text-field--disabled) {
  background-color: transparent !important;
}

.mdc-text-field--filled:not(.mdc-text-field--disabled):hover {
  background-color: transparent !important;
}

.mdc-line-ripple {
  display: none !important;
}

.mat-mdc-form-field-focus-overlay {
  display: none !important;
}

.mdc-text-field--filled.mdc-text-field--disabled {
  background-color: transparent !important;
}

.mdc-text-field {
  padding: 0px !important;
  overflow: inherit !important;
}

/* Input disabilitato */
button[disabled],
html input[disabled],
select[disabled],
.mat-select-disabled,
.mat-mdc-select-disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  background-color: #E4E5E9 !important;
  color: #54595d !important;
  pointer-events: auto !important;
}

.mat-mdc-input-element[disabled]:hover {
  background-color: #E4E5E9 !important;
}

.mat-mdc-select-disabled .mat-mdc-select-trigger,
.mat-select-disabled .mat-select-trigger {
  cursor: not-allowed !important;
}

/* Mat form field */
mat-form-field {
  width: 100% !important;
}

/* Stile label per input */
mat-label {
  font-weight: 600 !important;
  font-size: 18px !important;
  line-height: 24px !important;
  letter-spacing: 1px !important;
  vertical-align: middle !important;
  text-transform: uppercase !important;
  color: #19191A !important;
  padding-left: 8px !important;
}

/* Input in errore */
.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input {
  border: 2px solid #c9291b !important;
}

.mat-mdc-form-field-error {
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  color: #C9291B !important;
  padding-left: 8px;
}

.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,
.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above>mat-label {
  color: #19191A !important;
}

.mat-mdc-form-field-error-wrapper,
.mat-mdc-form-field-hint-wrapper {
  padding-left: 0px !important;
}

/* Input con tooltip */
.popover-title {
  color: #000000 !important;
  font-family: "Open Sans semibold", sans-serif !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  text-align: start !important;
}

.mat-mdc-form-field-infix:has(.inail-mat-label) {
  padding-top: 0 !important;
}

.inail-mat-label {
  font-size: 14px !important;
  color: #19191A !important;
  line-height: 24px !important;
}

.inail-mat-label-combobox {
  margin-bottom: 6px !important;
  font-size: 14px !important;
  color: black !important;
  line-height: 24px !important;
}

/* Tooltip position */
.inail-mat-tooltip {
  margin-top: -5px !important;
}

.mat-mdc-form-field-infix {
  padding-bottom: 0 !important;
}

// .inail-mat-input-form-tabellare.mat-mdc-form-field,
// .inail-mat-input-form-tabellare.mat-mdc-text-field-wrapper,
// .inail-mat-input-form-tabellare.mat-mdc-form-field-flex {
//   min-height: 30px !important;
//   height: auto !important;
//   min-width: fit-content !important;
//   max-width: fit-content !important;
// }

.inail-mat-input-form-tabellare .mat-mdc-form-field-infix {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  // width: fit-content !important; 
  // min-height: 30px !important;
  // height: auto !important; 
  // min-width: fit-content !important;
  // max-width: fit-content !important;
}

.inail-mat-form-tabellare-container .mat-mdc-form-field-subscript-wrapper {
  display: none !important;
}

.inail-mat-input-form-tabellare .mat-mdc-input-element.completeInput {
  border: solid 3px #0e821a !important;
}

.inail-mat-hint-ht {
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  padding-left: 8px;
  color: #54595D;
  display: block;
}

mat-form-field:has(input:disabled) .inail-mat-currency-symbol {
  color: #7E858B !important;
}

mat-form-field:has(#error) .inail-mat-currency-symbol {
  color: #c9291b !important;
  transform: translate(15%, -60%);
}

.inail-currency-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.inail-currency-symbol {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #54595D;
  font-size: 16px;
  font-weight: 600;
  pointer-events: none;
}

.inail-currency-symbol-error {
  color: #C9291B;
}

.inail-currency-symbol-disabled {
  color: #7E858B;
}

mat-form-field input::placeholder {
  color: #54595D !important;
}