body.modal-open {
  overflow: hidden;
}

#courses-modal {
  width: 100%;
  height: 100dvh;
  position: absolute;

  display: none;
  top: 0;
  position: fixed;
  align-items: center;
  justify-content: center;

  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999999;
}

#courses-modal > .cm-dialog {
  display: flex;

  border-radius: 32px;
  background-color: #ffffff;

  min-width: 845px;
  max-width: 845px;
  min-height: 743px;
  overflow: hidden;
}

#courses-modal > .cm-dialog > .cm-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-block-start: 24px;
}

#courses-modal > .cm-dialog > .cm-content > .cm-header {
  display: flex;
  flex-direction: column;
  padding-inline: 24px;
  margin-inline-start: 18px;
}

.cm-title {
  color: #141414;
  font-size: 32px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.cm-subtitle {
  color: #7c7c7c;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.8px;
  margin-bottom: 24px;
}

hr.cm-separator {
  margin: 0;
}

.cm-close-wrapper {
  margin: 0;
  text-align: right;
}

.cm-close {
  border: none;
  align-self: right;
  background-color: transparent;
}

.cm-close > svg {
  color: #7c7c7c;
}

.cm-close:hover > svg {
  color: black;
}

#courses-modal > .cm-dialog > .cm-content > .cm-body {
  gap: 21px;
  flex: 1;
  display: flex;
  flex-flow: row wrap;

  align-content: flex-start;

  padding-inline-start: 41px;
  margin-inline-end: 8px;
  margin-block-start: 32px;

  height: 529px;
  max-height: 529px;

  overflow-y: auto;
}

.cm-body::-webkit-scrollbar {
  width: 11px;
}

.cm-body::-webkit-scrollbar-thumb {
  width: 9px;
  border-radius: 9px;
  background: #d9d9d9;
}

.cm-body::-webkit-scrollbar-thumb:hover {
  background: #b6b6b6;
}

.cm-card {
  gap: 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  height: 186px;
  max-height: 186px;
  width: clamp(240px, 240px, 33.33%);
  max-width: clamp(240px, 240px, 33.33%);

  padding-block: 20px;

  border-radius: 24px;
  border: 2px solid #b1b1b1;
  background: #fff;
}

.cm-card:last-child {
  margin-block-end: 80px;
}

.cm-card > p {
  margin-block-end: 0;
}

.cm-card-title {
  color: #7c7c7c;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.8px;
  
  max-width: 192px;
  max-height: 45px;

  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.cm-card-label {
  color: #b1b1b1;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.8px;
}

.cm-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 69px;
  min-height: 69px;

  border-radius: 69px;
  background-color: #772385;
}

@media screen and (max-width: 768px) {
  #courses-modal > .cm-dialog {
    min-width: 317px;
    max-width: 317px;
    min-height: 457px;
  }
  .cm-card {
    height: 125px;
    max-height: 125px;
    width: 134px;
    max-width: 134px;
  }

  #courses-modal > .cm-dialog > .cm-content > .cm-header {
    padding-inline: 18px;
    margin-inline-start: 0;
    position: relative;
  }

  #courses-modal > .cm-dialog > .cm-content > .cm-body {
    row-gap: 12px;
    column-gap: 8px;
    padding-inline: 14px 8px;
    margin-block-start: 16px;
  }

  .cm-body::-webkit-scrollbar-thumb {
    width: 6px;
  }

  .cm-title {
    font-size: 20px;
    margin-block-end: 8px;
  }

  .cm-subtitle {
    font-size: 16px;
    margin-block-end: 12.45px;
  }

  .cm-card-label {
    display: none;
  }
  .cm-close {
    top: -8px;
    right: 16px;
    position: absolute;
    z-index: 99999999;
  }

  .cm-close > svg {
    width: 24px;
    height: 24px;
  }

  .cm-icon-wrapper {
    min-height: 30px;
    min-width: 30px;
  }

  .cm-icon-wrapper > svg {
    width: 20px;
    height: 20px;
  }

  p.cm-card-title {
    width: 116px;
    max-width: 116px;
    
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    
    font-size: 14px;
    letter-spacing: -0.8px;
    line-height: normal;
  }
}
