@use '../../shared/styles/variables' as *;

.confirm-danger-dialog__overlay {
  position: fixed;
  inset: 0;
  z-index: 500;

  background: $color-backdrop;
  backdrop-filter: blur(2px);

}

.confirm-danger-dialog {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;

  width: min(440px, calc(100vw - 32px));
  padding: 22px;

  border-radius: 22px;
  background: $color-surface;
  box-shadow: $shadow-modal;

  transform: translate(-50%, -50%);
}

.confirm-danger-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 14px;
}

.confirm-danger-dialog__icon {
  width: 44px;
  height: 44px;

  border-radius: 14px;
  background: $color-danger-tint;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: $red;
}

.confirm-danger-dialog__close {
  width: 38px;
  height: 38px;

  border: none;
  border-radius: 12px;
  background: $color-bg;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: $gray50;
  cursor: pointer;
  transition: 0.2s ease;

  &:hover {
    color: $red;
    background: $color-danger-tint;
  }
}

.confirm-danger-dialog__title {
  margin: 0;

  color: $color-text;
  font-size: $font-size-22;
  font-weight: 650;
}

.confirm-danger-dialog__description {
  margin: 8px 0 0;

  color: $gray50;
  font-size: $font-size-15;
  line-height: 1.45;
}

.confirm-danger-dialog__footer {
  margin-top: 24px;

  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-danger-dialog__cancel,
.confirm-danger-dialog__confirm {
  height: 42px;
  padding: 0 18px;

  border: none;
  border-radius: 14px;

  font-size: $font-size-15;
  font-weight: 600;
  cursor: pointer;

  transition: 0.2s ease;

  &:disabled {
    opacity: 0.6;
    cursor: default;
  }
}

.confirm-danger-dialog__cancel {
  background: $color-bg;
  color: $gray50;

  &:hover {
    background: $gray20;
    color: $color-text;
  }
}

.confirm-danger-dialog__confirm {
  background: $red;
  color: $color-text-inverse;

  &:hover {
    background-color: $red;
    color: $white;
    box-shadow: inset 0 0 0 1px $red, 0 8px 20px -8px rgba(var(--color-danger-rgb), 0.8);
  }
}
