.image-with-white-overlay {
  position: relative;
  display: inline-block;
}

.image-with-white-overlay img {
  display: block;
}

.image-with-white-overlay::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.5); /* 0.5 = 50% opacity */
  pointer-events: none;
}

.image-with-white-overlay {
  position: relative;
  display: inline-block;
}

.white-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  z-index: 2;
}

#card-container .sk-spinner-cube-grid {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.face-detection-box {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.face-detection-box::before,
.face-detection-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 179, 148, 0.6);
}

/* Top-left corner */
.face-detection-box::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

/* Top-right corner */
.face-detection-box::after {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

/* Bottom corners using linear gradients */
.face-detection-box {
    background:
        linear-gradient(to top, rgba(26, 179, 148, 0.6) 3px, transparent 3px) 0 100%,
        linear-gradient(to right, rgba(26, 179, 148, 0.6) 3px, transparent 3px) 0 100%,
        linear-gradient(to top, rgba(26, 179, 148, 0.6) 3px, transparent 3px) 100% 100%,
        linear-gradient(to left, rgba(26, 179, 148, 0.6) 3px, transparent 3px) 100% 100%;
    background-size: 20px 20px;
    background-repeat: no-repeat;
}

div.face-detection-box.face-detection-box-error {
    background:
        linear-gradient(to top, rgba(255, 0, 0, 0.6) 3px, transparent 3px) 0 100%,
        linear-gradient(to right, rgba(255, 0, 0, 0.6) 3px, transparent 3px) 0 100%,
        linear-gradient(to top, rgba(255, 0, 0, 0.6) 3px, transparent 3px) 100% 100%,
        linear-gradient(to left, rgba(255, 0, 0, 0.6) 3px, transparent 3px) 100% 100%;
    background-size: 20px 20px;
    background-repeat: no-repeat;
}

div.face-detection-box.face-detection-box-error::before,
div.face-detection-box.face-detection-box-error::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 0, 0, 0.6);
}

div.face-detection-box.face-detection-box-error::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

div.face-detection-box.face-detection-box-error::after {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}