/*
 * 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.
 */

.theme-toggle-container {
  display: flex;
  align-items: center;
  height: 100%;
  justify-content: center;

  .theme-toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: none;
    border: 1px solid #d9d9d9;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 31px;
    width: 31px;

    &:hover {
      background-color: #f5f5f5;
      border-color: #1890ff;
    }

    &:active {
      transform: scale(0.98);
    }

    .theme-icon {
      font-size: 20px;
      transition: none;
    }

    .theme-text {
      font-size: 18px;
    }

    &:hover .theme-icon {
      transform: none;
    }
  }
}

:host-context(.dark) .theme-toggle-container {
  .theme-toggle-button {
    color: #fff;
    border-color: #434343;
    background-color: #262626;

    &:hover {
      background-color: rgba(255, 255, 255, 0.08);
      border-color: #1890ff;
    }

    &:focus {
      background-color: rgba(255, 255, 255, 0.08);
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }

    &:active {
      transform: scale(0.98);
    }
  }
}
