/* Spinner for show/hide receipt photo (keeps skeleton off for this interaction) */

/*
  Don't reserve space when there is no photo/PDF.
  The preview button (or the image) will naturally give the wrapper its height.
*/
.uw-photo-wrap { position: relative; }

.uw-photo-overlay{
  display:none;
  position:absolute;
  inset:0;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  align-items:center;
  justify-content:center;
  pointer-events: all;
  cursor: progress;
}

.uw-photo-spinner{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.95);
  animation: uwPhotoSpin 0.9s linear infinite;
}

@keyframes uwPhotoSpin { to { transform: rotate(360deg); } }

/* Receipt edit */
#rcpt-photo-preview[data-dash-is-loading="true"] ~ #rcpt-photo-overlay { display:flex; }
/* Receipt view */
#rv-photo-area[data-dash-is-loading="true"] ~ #rv-photo-overlay { display:flex; }


/* Photo/PDF remove "red dot" */
.uw-photo-media{
  position: relative;
}

.uw-photo-remove-dot{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: #dc3545; /* Bootstrap danger */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
  cursor: pointer;
}

.uw-photo-remove-dot i{
  font-size: 15px;
  line-height: 1;
}

.uw-photo-remove-dot:active{
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine){
  .uw-photo-remove-dot:hover{
    filter: brightness(0.95);
  }
}
