/* Popup Editor Styles */
.wp-block-presto-player-popup {
  position: relative;
}

/* Popup media specific editor styles */
.wp-block-presto-player-popup-media {
  display: block !important;
  position: relative !important;
  min-height: 400px;
  height: auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(211, 204, 204, 0.51);
  border-radius: 4px;
  margin-bottom: 16px;
}

/* Editor-specific close button styling */
.presto-popup__close-button {
  min-width: 24px;
  min-height: 24px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  opacity: 0.8;
  position: absolute;
  top: calc(env(safe-area-inset-top) + 16px);
  right: calc(env(safe-area-inset-right) + 16px);
  z-index: 5000000;
}

.presto-popup__close-button svg {
  width: 24px;
  height: 24px;
}

/* Outline styling for popup blocks when child is selected */
.wp-block-presto-player-popup.has-child-selected .wp-block-presto-player-popup-media,
.wp-block-presto-player-popup.has-child-selected .wp-block-presto-player-popup-trigger {
  outline: 1px solid var(--wp-admin-theme-color) !important;
}

/* show tag when parent popup has child selected */
.wp-block-presto-player-popup.has-child-selected .presto-popup-tag {
  display: block !important;
}

/* show outline when parent popup is selected */
.wp-block-presto-player-popup.is-selected .wp-block-presto-player-popup-media,
.wp-block-presto-player-popup.is-selected .wp-block-presto-player-popup-trigger {
  outline: 1px solid var(--wp-admin-theme-color) !important;
}

/* show tag when parent popup is selected */
.wp-block-presto-player-popup.is-selected .presto-popup-tag {
  display: block !important;
}