/**
 * Copyright (c) 2026-present, Goldman Sachs
 *
 * 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.
 */

.rule-suggestion-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;

  &__header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--color-bg-hover);
  }

  &__header__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  &__header__title {
    padding: 0.25rem 0.5rem;
    border-radius: 0.125rem;
    background: var(--color-bg-panel-header);
    font-weight: 700;
    color: var(--color-text-primary);
  }

  &__header__filter {
    min-width: 12rem;
  }

  &__header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  &__action-btn {
    padding: 0.5rem 2rem;
    font-weight: 400;
    border-radius: 0.3rem;
    background: var(--color-blue-200);
    cursor: pointer;
    border: none;
    color: var(--color-text-on-accent);

    &:hover:not(:disabled) {
      background: var(--color-blue-150);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  &__close-btn {
    margin-left: 0.5rem;
    cursor: pointer;

    svg {
      height: 2rem;
      width: 2rem;
      color: var(--color-text-muted);
    }
  }

  &__content {
    height: 100%;
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: var(--color-bg-app);
  }

  &__badge {
    margin-right: 0.5rem;
    height: 100%;
    text-transform: uppercase;
    color: var(--color-text-secondary);

    &--modification {
      background: var(--color-orange-200);
    }

    &--new {
      background: var(--color-blue-200);
    }
  }
}

.panel__content__empty-text {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 1.3rem;
}
