.DashboardWidget {
  align-items: center;
  background-color: var(--color-white);
  border-top: 2px solid var(--color-gray6);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-wrap: wrap;
  padding: var(--gap-l);
  position: relative;

  &::before {
    background: var(--color-gray3);
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
    top: calc(var(--gap-m) * 2 + var(--lineHeight-m));
  }

  > * {
    width: 100%;
  }

  > .Chart {
    margin: -4px 0;
  }

  > .LinkList,
  > .LinkTable {
    margin-bottom: calc(var(--gap-xs) - var(--gap-l));
    margin-top: calc(0px - var(--gap-l));
  }

  > .message ~ .LinkTable {
    margin-top: 0;
  }

  > .LinkTable > thead > tr:first-child > th {
    padding-top: var(--gap-m);
  }

  > .LinkCarousel {
    margin: calc(0px - var(--gap-l));
    margin-top: calc(0px - var(--gap-l));
    position: relative;
    width: calc(var(--gap-l) * 2 + 100%);
  }

  > .Week {
    margin: calc(0px - var(--gap-l));
    width: calc(var(--gap-l) * 2 + 100%);
  }

  //Dashboard Search Widget specific style rules
  &.SearchWidget {
    padding: 0;
  }

  .SearchWidget-result {
    height: 100%;
  }

  &.SearchWidget::before {
    background: none;
  }

  .SearchWidget-title {
    display: none;
  }

  > .SearchWidget-heading {
    display: block;
    position: relative;
  }

  .SearchWidget-controls {
    height: 100%;
  }

  // Create New Widget specific style rules
  &.CreateNewWidget {
    .CIG {
      padding-left: 0;
    }

    .CIG-row {
      display: block;
    }

    .CIG-title {
      display: none;
    }
  }
}

.DashboardWidget-title,
.DashboardWidget-controls,
.DashboardWidget-pagination {
  margin: calc(0px - var(--gap-l)) 0 calc(var(--gap-l) + 1px) 0;
}

.DashboardWidget-title {
  .Text.is-m;

  font-weight: bold;
  margin-left: calc(0px - var(--gap-l));
  order: -4;
  overflow: hidden;
  padding: var(--gap-m) var(--gap-m) var(--gap-m) var(--gap-l);
  text-overflow: ellipsis;
  white-space: nowrap;
  width: auto;

  &::before {
    display: none;
  }
}

.DashboardWidget-heading {
  .Text.is-s;

  font-weight: bold;
  margin: var(--gap-l) 0;
}

.DashboardWidget-controls {
  .Icon.is-s;
  .Link.is-black;

  align-items: center;
  display: flex;
  order: -3;
  width: auto;

  li:not(:first-child) {
    margin-left: var(--gap-m);
  }
}

.DashboardWidget-pagination {
  margin-left: auto;
  order: -2;
  padding-left: var(--gap-l);
  width: auto;
}

.DashboardWidget-filters {
  --Input-focusBackground: var(--color-gray2);

  align-items: center;
  background: var(--color-gray1);
  border-color: var(--color-gray3);
  border-style: solid;
  border-width: 1px 0;
  display: flex;
  justify-content: flex-start;
  margin: 0 calc(0px - var(--gap-l));
  margin-top: -1px;
  order: -1;
  overflow: auto;
  padding: 0 calc(var(--gap-l) / 2);
  position: relative;
  top: calc(0px - var(--gap-l));
  width: calc(var(--gap-l) * 2 + 100%);

  form {
    align-items: center;
    display: flex;
    margin: 0;

    > * {
      flex-grow: 1;
    }
  }
}

// ActionBar padding can be removed since the Widget will already add padding.
.DashboardWidget form > .ActionBar {
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.DashboardPage-heading {
  font-size: 0;
  position: absolute;
}

// Legacy.
.scheduledEvents-date {
  display: contents;
}
