.modal {
  display: none;
  position: fixed;
  z-index: 99;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  ;
}

.modal-policycontent {
  justify-content: center;
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 720px;
  // max-width: 600px;
  /* Set a maximum width */
  height: 420px;
  border-radius: 10px;
  overflow-y: auto;
  /* Enable vertical scrolling */
}

.policyhead {
  color: rgba(205, 48, 158, 1);
  font-weight: 700;
  width: 500px;
}

.closeicon {
  width: 935px;
  display: flex;
  color: rgba(237, 37, 49, 1);
  justify-content: right;
  cursor: pointer;
  margin-bottom: 20px;
  margin-top: 2px;
}

.policylightboxsavebutton {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #FFFFFF;
  margin-right: 20px;
  width: 120px;
  height: 32px;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;

}

.savebutton {
  background-color: rgb(50, 174, 115);
  color: #FFFFFF;
}

.clear {
  padding: 0px !important;
  display: inline-grid;
  align-content: center;
  display: inline-flex;
  margin-right: 5px;
  outline-style: none;
  min-width: 120px;
  height: 32px;

}

mat-icon.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

@media screen and (max-width: 1024px) {

  ::ng-deep .FormOverView {
    padding: 0 0.75rem !important;
    box-sizing: border-box !important;
  }

  ::ng-deep .modal-policycontent {
    box-sizing: border-box !important;
    width: 90% !important;
    max-width: 90vw !important;
    height: auto !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  ::ng-deep .closeicon {
    width: 100% !important;
  }

  ::ng-deep .adjacentField {
    box-sizing: border-box !important;
    max-width: 48% !important;
  }

  ::ng-deep .policyhead {
    width: auto !important;
    max-width: 100% !important;
  }
}

@media screen and (max-width: 768px) {

  ::ng-deep .FormOverView {
    padding: 0 0.5rem !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  ::ng-deep .FormOverView * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  ::ng-deep .FormOverView > .adjacentField {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 10px !important;
  }

  ::ng-deep .FormOverView > div > .adjacentField {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 10px !important;
  }

  ::ng-deep .FormOverView > div:has(> .adjacentField) {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  ::ng-deep gb-textarea,
  ::ng-deep gb-newpicklist,
  ::ng-deep gb-date,
  ::ng-deep gb-input {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  ::ng-deep gb-textarea textarea,
  ::ng-deep gb-newpicklist input,
  ::ng-deep gb-newpicklist .mat-mdc-form-field,
  ::ng-deep gb-newpicklist .mat-mdc-text-field-wrapper,
  ::ng-deep gb-date input,
  ::ng-deep gb-date .mat-mdc-form-field,
  ::ng-deep gb-input input,
  ::ng-deep gb-input .mat-mdc-form-field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  ::ng-deep .modal-policycontent {
    box-sizing: border-box !important;
    width: 94% !important;
    max-width: 94vw !important;
    height: auto !important;
    max-height: 90vh !important;
    padding: 1rem !important;
    overflow-y: auto !important;
  }

  ::ng-deep .closeicon {
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  ::ng-deep .policyhead {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.95rem !important;
  }

  ::ng-deep .modal-policycontent gb-newpicklist,
  ::ng-deep .modal-policycontent gb-input,
  ::ng-deep .modal-policycontent gb-textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 8px !important;
  }

  ::ng-deep .modal-policycontent > div[style*="display: flex"]:last-of-type {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  ::ng-deep .policylightboxsavebutton {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
  }

  ::ng-deep .clear {
    min-width: 0 !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  ::ng-deep gb-formgrid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  ::ng-deep gb-formgrid > * {
    overflow: visible !important;
  }

  ::ng-deep gb-formgrid table,
  ::ng-deep gb-formgrid .mat-mdc-table,
  ::ng-deep gb-formgrid .ag-root-wrapper {
    min-width: 600px !important;
    overflow: visible !important;
  }
}

@media screen and (max-width: 480px) {

  ::ng-deep .modal-policycontent {
    width: 96% !important;
    max-width: 96vw !important;
    padding: 0.75rem !important;
  }

  ::ng-deep .policylightboxsavebutton,
  ::ng-deep .clear {
    font-size: 0.8rem !important;
  }
}