:host ::ng-deep {
  // TODO: 19.05.2023 продумать варианты переопредения стилей

  .cal-week-view {
    /* stylelint-disable-next-line selector-type-no-unknown */
  }

  .cal-week-view * {
    box-sizing: border-box;
    box-sizing: border-box;
  }

  .cal-week-view .cal-day-headers {
    position: sticky;
    z-index: 3;
    top: 124px;

    -js-display: flex;
    display: flex;

    padding-left: 50px;

    border-right: solid 1px #e1e1e1;
    // border-top: solid 1px #e1e1e1;
    border-left: none;
  }

  .cal-week-view .cal-day-headers .cal-header {
    flex: 1;
    flex: 1;

    text-align: center;

    background-color: var(--color-gray-fff);
    border-color: #e1e1e1;
    border-top: solid 1px #e1e1e1;
    border-bottom: 1px solid;

    -webkit-box-flex: 1;
  }

  .cal-week-view .cal-day-headers .cal-header:not(:last-child) {
    border-right: 1px solid;
  }

  .cal-week-view .cal-day-headers .cal-header:first-child {
    border-left: 1px solid;
  }

  .cal-week-view .cal-day-headers span {
    font-weight: 400;
    opacity: 0.5;
  }

  .cal-week-view .cal-day-column {
    flex-grow: 1;
    border-left: solid 1px;

    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
  }

  .cal-week-view .cal-event {
    font-size: 12px;
    border: 1px solid;
  }

  .cal-week-view .cal-time-label-column {
    width: 50px;
    height: 100%;
  }

  .cal-week-view .cal-current-time-marker {
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 2px;
  }

  .cal-week-view .cal-all-day-events {
    position: relative;

    padding-top: 3px;

    border: solid 1px;
    border-top: 0;
    border-bottom: none;
    border-left: none;
  }

  .cal-week-view .cal-all-day-events .cal-day-columns {
    position: absolute;
    z-index: 0;
    top: 0;

    -js-display: flex;
    display: flex;

    width: 100%;
    height: 100%;
  }

  .cal-week-view .cal-all-day-events .cal-events-row {
    position: relative;
    height: 31px;
    margin-left: 50px;
  }

  .cal-week-view .cal-all-day-events .cal-event-container {
    position: absolute;
    display: inline-block;
  }

  .cal-week-view .cal-all-day-events .cal-event-container.resize-active {
    pointer-events: none;
    z-index: 1;
  }

  .cal-week-view .cal-all-day-events .cal-event {
    height: 28px;
    margin-right: 2px;
    margin-left: 2px;
    padding: 0 5px;

    line-height: 28px;
  }

  .cal-week-view .cal-all-day-events .cal-starts-within-week .cal-event {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }

  .cal-week-view .cal-all-day-events .cal-ends-within-week .cal-event {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

  .cal-week-view .cal-all-day-events .cal-time-label-column {
    -js-display: flex;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;

    -webkit-box-align: center;
    -webkit-box-pack: center;
    -ms-flex-align: center;
    -ms-flex-pack: center;
  }

  .cal-week-view .cal-all-day-events .cal-resize-handle {
    cursor: col-resize;

    position: absolute;
    top: 0;

    width: 6px;
    height: 100%;
  }

  .cal-week-view .cal-all-day-events .cal-resize-handle.cal-resize-handle-after-end {
    right: 0;
  }

  .cal-week-view .cal-event,
  .cal-week-view .cal-header {
    overflow: hidden;
    text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cal-week-view .cal-drag-active {
    pointer-events: none;
    z-index: 1;
  }

  .cal-week-view .cal-drag-active * {
    pointer-events: none;
  }

  .cal-week-view .cal-time-events {
    position: relative;

    -js-display: flex;
    display: flex;

    border: solid 1px;
    border-top: 0;
    border-bottom: none;
    border-left: none;
  }

  .cal-week-view .cal-time-events .cal-day-columns {
    -js-display: flex;
    display: flex;
    flex-grow: 1;

    border-bottom: solid 1px #e1e1e1;

    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
  }

  .cal-week-view .cal-time-events .cal-day-column {
    position: relative;
  }

  .cal-week-view .cal-time-events .cal-events-container {
    position: relative;
  }

  .cal-week-view .cal-time-events .cal-event-container {
    position: absolute;
    z-index: 1;
  }

  .cal-week-view .cal-time-events .cal-event {
    width: calc(100% - 10px);
    height: calc(100% - 2px);
    margin-left: 5px;
    padding: 0 5px;

    // line-height: 25px;
  }

  .cal-week-view .cal-time-events .cal-resize-handle {
    cursor: row-resize;
    position: absolute;
    width: 100%;
    height: 4px;
  }

  .cal-week-view .cal-time-events .cal-resize-handle.cal-resize-handle-after-end {
    bottom: 0;
  }

  .cal-week-view .cal-hour-segment {
    position: relative;
  }

  .cal-week-view .cal-hour-segment::after {
    content: '\00a0';
  }

  .cal-week-view .cal-event-container:not(.cal-draggable) {
    cursor: pointer;
  }

  .cal-week-view .cal-draggable {
    cursor: move;
  }

  .cal-week-view mwl-calendar-week-view-hour-segment,
  .cal-week-view .cal-hour-segment {
    display: block;
  }

  .cal-week-view .cal-hour:not(:last-child) .cal-hour-segment,
  .cal-week-view .cal-hour:last-child :not(:last-child) .cal-hour-segment {
    border-bottom: thin dashed;
  }

  .cal-week-view .cal-time {
    width: 50px;
    font-weight: bold;
    text-align: left;
  }

  .cal-week-view .cal-hour-segment.cal-after-hour-start .cal-time {
    display: none;
  }

  .cal-week-view .cal-starts-within-day .cal-event {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
  }

  .cal-week-view .cal-ends-within-day .cal-event {
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
  }

  .cal-week-view {
    background-color: var(--color-gray-fff);
  }

  .cal-week-view .cal-day-headers .cal-header:not(:last-child) {
    border-right-color: #e1e1e1;
  }

  .cal-week-view .cal-day-headers .cal-header:first-child {
    border-left-color: #e1e1e1;
  }

  // .cal-week-view .cal-day-headers .cal-header:hover,
  // .cal-week-view .cal-day-headers .cal-drag-over {
  //     background-color: #ededed;
  // }

  .cal-week-view .cal-day-column {
    border-left-color: rgb(224 226 236 / 64%);
  }

  .cal-week-view .cal-event {
    color: #1e90ff;
    background-color: #d1e8ff;
    border-color: #1e90ff;
  }

  .cal-week-view .cal-all-day-events {
    border-color: #e1e1e1;
  }

  .cal-week-view .cal-header.cal-today {
    background-color: var(--theme-hack-bg2-color, rgb(245 248 250));
  }

  .cal-week-view .cal-header.cal-weekend span {
    color: #8b0000;
  }

  .cal-week-view .cal-time-events {
    border-color: #e1e1e1;
  }

  .cal-week-view .cal-time-events .cal-day-columns:not(.cal-resize-active) .cal-hour-segment:hover {
    background-color: #ededed;
  }

  .cal-week-view {
    .cal-day-columns {
      .cal-hour {
        .cal-hour-start {
          border-top: 1px solid rgb(238 240 250);
        }

        .cal-after-hour-start {
          border-top: 1px solid rgb(238 240 250 / 40%);
        }
      }
    }
  }

  .cal-week-view .cal-drag-over .cal-hour-segment {
    background-color: #ededed;
  }

  .cal-week-view .cal-hour:not(:last-child) .cal-hour-segment,
  .cal-week-view .cal-hour:last-child :not(:last-child) .cal-hour-segment {
    border-bottom-color: #e1e1e1;
  }

  .cal-week-view .cal-current-time-marker {
    background-color: #ea4334;
  }

  .cal-day-view {
    /* stylelint-disable-next-line selector-type-no-unknown */
  }

  .cal-day-view mwl-calendar-week-view-header {
    display: none;
  }

  .cal-day-view .cal-events-container {
    margin-left: 70px;
  }

  .cal-day-view .cal-day-column {
    border-left: 0;
  }

  .cal-day-view .cal-current-time-marker {
    width: calc(100% - 70px);
    margin-left: 70px;
  }

  .cal-tooltip {
    position: absolute;
    z-index: 1070;

    display: block;

    font-size: 11px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.5;
    text-align: start;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    word-wrap: break-word;
    line-break: auto;
    white-space: normal;

    opacity: 0.9;
  }

  .cal-tooltip.cal-tooltip-top {
    margin-top: -3px;
    padding: 5px 0;
  }

  .cal-tooltip.cal-tooltip-top .cal-tooltip-arrow {
    bottom: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
  }

  .cal-tooltip.cal-tooltip-right {
    margin-left: 3px;
    padding: 0 5px;
  }

  .cal-tooltip.cal-tooltip-right .cal-tooltip-arrow {
    top: 50%;
    left: 0;
    margin-top: -5px;
    border-width: 5px 5px 5px 0;
  }

  .cal-tooltip.cal-tooltip-bottom {
    margin-top: 3px;
    padding: 5px 0;
  }

  .cal-tooltip.cal-tooltip-bottom .cal-tooltip-arrow {
    top: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 0 5px 5px;
  }

  .cal-tooltip.cal-tooltip-left {
    margin-left: -3px;
    padding: 0 5px;
  }

  .cal-tooltip.cal-tooltip-left .cal-tooltip-arrow {
    top: 50%;
    right: 0;
    margin-top: -5px;
    border-width: 5px 0 5px 5px;
  }

  .cal-tooltip-inner {
    max-width: 200px;
    padding: 3px 8px;
    text-align: center;
    border-radius: 0.25rem;
  }

  .cal-tooltip-arrow {
    position: absolute;

    width: 0;
    height: 0;

    border-color: transparent;
    border-style: solid;
  }

  .cal-tooltip.cal-tooltip-top .cal-tooltip-arrow {
    border-top-color: #000;
  }

  .cal-tooltip.cal-tooltip-right .cal-tooltip-arrow {
    border-right-color: #000;
  }

  .cal-tooltip.cal-tooltip-bottom .cal-tooltip-arrow {
    border-bottom-color: #000;
  }

  .cal-tooltip.cal-tooltip-left .cal-tooltip-arrow {
    border-left-color: #000;
  }

  .cal-tooltip-inner {
    color: #fff;
    background-color: #000;
  }
}
