/* Your SCSS content here */
* {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.Addon {
  margin: 10px;
  padding: 10px;
  width: fit-content;
  // border: 1px solid #ccc;
  width: 100%;
}

// .AddonField {
//   display: flex;
//   align-items: center;
//   height: 36px;
//   width: 100%;
// }
.additiondetiction {
  width: 100%;
}

// .AddonLabel {
//   display: inline-block;
//   width: 100%;
//   text-align: right;
//   margin-right: 10px;
//   // max-width: 400px;
//   overflow-x: auto;
// }

.AddonInput {
  display: inline-block;
  height: 24px;
  width: 180px;
  border: none;
  outline-style: none;
  border-bottom: 1px solid #ccc;
}

.DatePicker {
  display: inline-flex;
  align-items: center;
  height: 36px;
  width: 120px;
}

.dateperiod {
  display: inline-flex;
  align-items: center;
}

.addon-container {
  width: max-content;
  margin: 0;
  padding: 0.3rem;
  border: 1px solid #1a1a1a;
}

.addon-field {
  margin: 0.3rem 0;
}

.addon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid black;

  th,
  td {
    padding: 0.3rem 0.4rem;
    text-align: left;
    // border-bottom: 1px solid #ddd;
  }

  th {
    font-weight: 600;
    color: white;
    // background-color: #f5f5f5;
  }
}

.addon-tables {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;

  th,
  td {
    padding: 0.3rem 0.4rem;
    text-align: left;
    // border-bottom: 1px solid #ddd;
  }

  th {
    font-weight: 600;
    color: white;
    // background-color: #f5f5f5;
  }
}

.addon-label {
  display: block;
  font-weight: normal;
  white-space: nowrap;
}

.addon-table thead tr {
  border: 1px solid var(--action-primary-default);
  text-align: left;
  padding: 5px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-surface);
}

.addon-table th {
  padding: 0px 15px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: normal;
  font-style: normal;
  letter-spacing: normal;
  text-align: left;
  position: sticky !important;
}

.addon-input {
  width: 100px;
  padding: 0.3rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: right;
  font-size: 14px;
  color: var(--text-primary);
  box-sizing: border-box;

  &[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: var(--text-primary);
  }
}

/* Boxed date field — single definition, matches .addon-input exactly */
.date-input-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 140px;
  padding: 0.3rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-primary);
  box-sizing: border-box;
  background: #fff;

  .DatePicker {
    height: auto;
    width: auto;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-primary);
  }

  .mat-datepicker-toggle,
  mat-datepicker-toggle {
    transform: scale(0.7);
    margin-left: 2px;
    color: var(--text-primary);
  }

  input {
    width: 1px;
  }

  &:focus-within {
    border-color: var(--action-primary-default, #4a90d9);
    box-shadow: 0 0 0 1px var(--action-primary-default, #4a90d9);
  }
}

.current-date-input {
  width: 140px; // was inheriting 100px from .addon-input, clipping the date text
  text-align: left;
}

/* Fix the picklist dropdown (Test1 / chevron) to match input width & border consistently */
// ::ng-deep gb-newpicklist {
//   display: inline-block;
//   width: 140px;

//   .picklist-input,
//   input,
//   select {
//     width: 100% !important;
//     border-radius: 4px !important;
//     font-size: 14px !important;
//     color: var(--text-primary) !important;
//   }
// }

.add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;

  mat-icon {
    color: #2e7d32; // green plus, like your screenshot
  }

  &:hover {
    background: #f5f5f5;
  }
}
.pay-revision-table {
  border-collapse: separate;
  // border-spacing: 80px 10px;
}

.pay-revision-table td,
.pay-revision-table th {
  vertical-align: middle;
  /* keeps every cell's content centered on the row */
}

.single-employee-table {
  .addon-input {
    width: 140px;
    height: 36px;
    box-sizing: border-box;
  }

  .date-input-box {
    width: 140px;
    height: 36px;
    box-sizing: border-box;
  }

  ::ng-deep .picklist-box {
    width: 140px !important;
    height: 36px !important;

    // ⭐ empty picklist-box collapses to 0 here too (this block overrides the base one above)
    &:empty {
      width: 0 !important;
      height: 0 !important;
    }
  }

  ::ng-deep span:has(gb-newpicklist) {
    width: 140px !important;
    height: 36px !important;
  }

  .current-date-input {
    width: 140px;
    height: 36px;
    box-sizing: border-box;
  }

  .revised-earnings-cell {
    padding-left: 50px;
    padding-bottom: 10px;
    box-sizing: border-box;
  }

  .revised-deductions-cell {
    padding-left: 80px; // ⭐ 50px (same base as earnings) + 30px extra = 80px
    padding-bottom: 10px;
    box-sizing: border-box;
  }
}

::ng-deep .picklist-box {
  display: inline-flex !important;
  align-items: center !important;
  width: 100px !important;
  height: 30px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
  overflow: hidden;

  // ⭐ collapse empty picklist-box wrappers (no gb-newpicklist rendered inside)
  // so they don't reserve blank space in rows that don't have a picklist
  &:empty {
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
  }

  .form_input {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    font-size: 14px !important;
    color: var(--text-primary) !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
  }

  mat-icon {
    height: 30px !important;
    width: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer;
  }
}

::ng-deep .pay-revision-table td span {
  border: none !important;
  border-radius: 4px !important;
}

::ng-deep .pay-revision-table td span:has(gb-newpicklist) {
  width: 140px !important;
  height: 36px !important;
  border: 1px solid #ccc !important;
  padding: 0 6px !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}