Полупрозрачная рамка вокруг карты

Возможно ли блоку с картой задать полупрозрачную рамку, чтобы карта через неё просвечивала и при этом сохраняла свой функционал?
На примере реализовал с помощью псевдоэлемента before, но position: absolute перекрывает возможность взаимодействия с картой.

<div class="map">
  <iframe src="https://yandex.ru/map-widget/v1/-/CCUjn-VQkC" width="100%" height="300" frameborder="0" allowfullscreen="true"></iframe>
</div>
.map {
  width: 100%;
  max-width: 900px;
  position: relative;
}

.map::before {
  content: '';
  position: absolute;
  border: 5px solid rgba(225, 120, 30, 0.3);
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.map iframe {
  display: block;
}

Ответы (1 шт):

Автор решения: Danila

Как вариант - добавить ещё один div и использовать 4 псевдоэлемента:

.map {
  width: 100%;
  max-width: 900px;
  position: relative;
}
.map:before,
.map:after,
.map-wrap:before,
.map-wrap:after {
  content: '';
  position: absolute;
  display: block;
  background-color: rgba(225, 120, 30, 0.3);
}
.map:before,
.map:after {
  width: 10px;
  top: 0;
  bottom: 0;
}
.map:after {
  right: 0;
}
.map-wrap:before,
.map-wrap:after {
  height: 10px;
  left: 10px;
  right: 10px;
}
.map-wrap:after {
  bottom: 0;
}
.map iframe {
  display: block;
}
<div class="map">
  <div class="map-wrap">
    <iframe src="https://yandex.ru/map-widget/v1/-/CCUjn-VQkC" width="100%" height="300" frameborder="0" allowfullscreen="true"></iframe>
  </div>
</div>

→ Ссылка