// Copied from gbformgrid.component.scss so the Budget detail grid is visually identical to the
// gb-formgrid it replaces. These classes are component-scoped in every grid (gbformgrid,
// gbbudgetgrid, gbvouchergrid each carry their own copy), so they must be repeated here rather
// than inherited.

.Grid-sticky-header {
  display: block;
  width: 100%;
  overflow-y: auto;
  overflow-x: auto;
  max-height: 350px;
  margin: 5px;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 6px 6px 6px 6px;
  box-shadow: 0px 2px 4px 0px #00000033;
}

.Grid-styled-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  font-family: 'Helvetica';
  min-width: 500px;
  overflow: auto;
}

.Grid-styled-table thead {
  position: relative;
  z-index: 99;
  height: 48px;
  background: var(--bg-subtle);
  border-bottom: 1.5px solid var(--border-default);
}

.Grid-styled-table thead tr {
  text-align: left;
  padding: 5px;
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-subtle);
  height: 48px;
}

.Grid-styled-table th {
  padding: 0px 15px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: normal;
  font-style: normal;
  letter-spacing: normal;
  text-align: left;
}

.Grid-styled-table td {
  padding: 0px 11px;
  font-size: 14px;
  font-weight: 500;
  font-stretch: normal;
  font-style: normal;
  letter-spacing: normal;
  font-family: 'Helvetica';
  text-align: left;
}

.Grid-styled-table tbody tr {
  cursor: pointer;
}

.Grid-styled-table tbody tr:focus-visible {
  border: 0px solid !important;
}

.GridInput {
  outline-style: none;
  border: none;
  color: var(--text-primary);
  border-radius: 8px;
  height: 36px;
  text-align: left !important;
  padding-right: 8px;
  background-color: var(--field-bg-default);
}

.grid-right-align {
  text-align: right !important;
}

// Picklist chrome, matching gb-formgrid so the two grids' picklists look the same.
.Grid-styled-table {
  gb-newpicklist:not(.readonly-picklist) {
    ::ng-deep .picklist-wrapper,
    ::ng-deep div[style*="display: flex; align-items: end"] {
      background-color: var(--field-bg-default) !important;
      border: 1px solid var(--field-border-default) !important;
      border-radius: 8px;
      height: 36px !important;
    }

    ::ng-deep .form_input {
      background-color: transparent !important;
      padding-left: 8px !important;
      padding-right: 4px !important;
      padding-bottom: 4px !important;
      font-weight: bold !important;
      width: 100% !important;
      text-align: left !important;

      &::placeholder {
        font-weight: normal !important;
        color: var(--field-text-placeholder) !important;
        opacity: 1 !important;
      }
    }

    ::ng-deep div[style*="display: inline-flex"] {
      display: flex !important;
      width: 100%;
      align-items: center !important;
      position: relative;
    }
  }
}

// Attachment modal chrome, copied verbatim from gbformgrid.component.scss:519-546 so the dialog
// looks identical to the one the old grid opened. Component-scoped there, so repeated here.
.modal {
  display: block;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50vw;
  height: auto;
  border-radius: 10px;
}

.title {
  font-family: 'Helvetica';
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
}

.closeicon {
  float: right;
  cursor: pointer;
  color: var(--text-secondary);
}

.bdg-icon-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.bdg-icon {
  color: var(--action-primary-default);
  cursor: pointer;
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.bdg-remove {
  color: rgba(237, 37, 49, 1);
  cursor: pointer;
  font-size: 21px;
  width: 21px;
  height: 21px;
}
