/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import "theme-mixin";

.scheduler {
  width: 300px;

  .cron-preset {
    margin-right: 6px;

    &.selected {
      font-weight: bold;
    }
  }

  > div {
    line-height: 24px;

    span {
      margin-right: 6px;
    }

    input {
      display: inline-block;
      width: 160px;
    }
  }
}

.themeMixin({
  nz-dropdown-button {
    height: 24px;
    line-height: 22px;
    margin-left: -1px;
  }
  .bar {
    min-height: 60px;
    height: auto;
    background: @component-background;
    box-shadow: -2px 4px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 5px 15px 5px 40px;
    position: sticky;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    top: 0;
    line-height: 50px;
    z-index: 30;

    &.simple {
      box-shadow: none;

      .control {
        display: none;
      }

      .setting {
        display: none;
      }

      &:hover {
        .control {
          display: block;
        }

        .setting {
          display: block;
        }
      }
    }

    .title {
      float: left;
      width: auto;
      max-width: 40%;

      @media (max-width: 767px) {
        max-width: 100%;
      }
    }

    .control {
      float: left;

      nz-button-group {
        margin-right: 24px;

        &:last-child {
          margin-right: 0;
        }
      }
    }

    .setting {
      display: flex;
      flex: 1;
      justify-content: flex-end;

      button {
        box-shadow: none;
        border: none;
      }
    }
  }
});

::ng-deep html.dark .search-code,
::ng-deep .search-code {
  padding: 0;
  &-row {
    display: flex;
    .ant-input-group,
    .ant-input-group-addon,
    .ant-input {
      height: 32px;
      border-radius: 0;
    }
    .search-row-btn-group {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
    }
    .ant-btn-group > .ant-btn:first-child,
    .ant-btn-group > .ant-btn:last-child {
      border-radius: 0;
    }
    &:first-child {
      .ant-input-group-addon {
        border-top-left-radius: 4px;
      }
      .ant-btn:last-child {
        border-top-right-radius: 4px;
      }
    }
    &:last-child {
      .ant-input-group-addon {
        border-bottom-left-radius: 4px;
      }
      .ant-btn:last-child {
        border-bottom-right-radius: 4px;
      }
    }

    nz-input-group + nz-button-group {
      margin-left: -1px;
    }

    & ~ & {
      margin-top: -1px;
    }
  }
}

