/*
 * Backpack - Skyscanner's Design System
 *
 * Copyright 2016-2021 Skyscanner Ltd
 *
 * 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 '~bpk-mixins/index';

.bpk-dialog {
  &__container {
    display: flex;
    padding: $bpk-spacing-base;

    // IE11 and below hack for buggy flexbox support
    @media screen\0 {
      display: block;
    }
  }

  &__close-button {
    float: right;
    margin: 0 0 $bpk-spacing-sm $bpk-spacing-sm;

    @include bpk-rtl {
      float: left;
      margin: 0 $bpk-spacing-sm $bpk-spacing-sm 0;
    }
  }

  &--with-icon {
    margin-top: $bpk-spacing-lg;
  }

  &__icon {
    $size: $bpk-spacing-lg * 2;

    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    width: $size;
    height: $size;
    margin-top: -$size / 2;
    margin-left: -$size / 2;
    justify-content: center;
    align-items: center;
    border: $bpk-border-size-lg $bpk-color-white solid;
    border-radius: 50%;

    &--primary {
      background-color: $bpk-color-monteverde;
    }

    &--warning {
      background-color: $bpk-color-kolkata;
    }

    &--destructive {
      background-color: $bpk-color-panjin;
    }

    > svg {
      fill: $bpk-color-white;
    }
  }
}
