@use '@carbon/styles/scss/spacing';
@use '@carbon/styles/scss/type';
@import "~@openmrs/esm-styleguide/src/vars";
@import '../root.scss';

title {
  width: 6.938rem;
  height: 1.75rem;
  margin: 0.438rem 22.875rem 0.813rem 0;
  font-family: IBMPlexSans;
  font-size: 1.25rem;
  font-weight: normal;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: normal;
}

.link {
  text-decoration: none;
}

.breadcrumbsSlot {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}

.prescriptionTabsContainer {
  height: 100%;
  width: 100%;

  :global(.cds--tab-content) {
    padding: 0 !important;
  }
}

.prescriptionTabs {
  grid-column: 'span 2';
  padding: 0 spacing.$spacing-05;
}

.newListButton {
  width: fit-content;
  justify-self: end;
  align-self: center;
}

.tabsContainer {
  background-color: $ui-02;

  :global(.cds--tabs__nav-item--selected) {
    box-shadow: inset 0 2px 0 0 var(--brand-03) !important;
  }

  :global(.cds--tab--list) button {
    max-width: 12rem !important;
  }
}

.hiddenTabsContent, .tabs .hiddenTabsContent {
  display: none;
}

.patientListTableContainer {
  grid-row: 3 / 4;
  grid-column: 1 / 2;
  height: 100%;
  margin: 0.5rem spacing.$spacing-05;
  background-color: $ui-01;
  border: 0.5px solid #e0e0e0;

  :global(.cds--data-table-container) {
    padding-top: 0 !important;
  }

  tbody>tr>:nth-child(2) {
    white-space: nowrap;
  }

  :global(.cds--data-table td) {
    height: unset !important;
  }

  :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 1) td {
    background-color: $ui-02;
    border-bottom: 1px solid $ui-03;
    border-top: 1px solid $ui-03;
  }

  :global(.cds--data-table--zebra) tbody tr[data-parent-row]:nth-child(4n + 3) td {
    background-color: $ui-01;
    border-bottom: 1px solid $ui-03;
  }
}

.searchContainer {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  padding-top: 0.5rem;

  :global(.cds--search-magnifier-icon) {
    z-index: 0 !important;
  }

  input {
    background-color: #fff;
  }
}

.addPrescriptionBtn {
  width: 10rem !important;
  padding: 0.5rem !important;
  margin-left: 1rem;
  margin-right: 1rem;
}

.patientSearch {
  width: 25rem;
  border-bottom-color: $ui-03;
}

.locationFilter {
  width: 25rem;
}

.search {
  width: 100%;
  max-width: 16rem;
  background-color: $ui-02;
  border-bottom-color: $ui-03;
}
