/* Screen Recorder Tool Styles */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#sr-preview-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.btn-recording {
  background: var(--red) !important;
  color: #fff !important;
}

/* Countdown overlay */
.sr-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .7);
  z-index: 10;
}

.sr-countdown-num {
  font-size: 6rem;
  font-weight: 800;
  color: #fff;
  animation: sr-pulse .7s ease-in-out;
  text-shadow: 0 4px 30px rgba(255,255,255,.3);
  line-height: 1;
}

@keyframes sr-pulse {
  0% { transform: scale(1.6); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.8); opacity: .3; }
}

/* PIP wrapper — draggable container */
#sr-pip-wrap {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#sr-pip-wrap.sr-dragging {
  cursor: grabbing;
}

/* Webcam video inside PIP */
#sr-camera-pip {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  pointer-events: none;
}

/* Circle shape */
#sr-pip-wrap.sr-pip-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
}
#sr-pip-wrap.sr-pip-circle #sr-camera-pip {
  border-radius: 50%;
}
/* Circle resize: handle visible, JS enforces 1:1 aspect ratio */

/* Rectangle shape */
#sr-pip-wrap.sr-pip-rectangle {
  width: 200px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
}
#sr-pip-wrap.sr-pip-rectangle #sr-camera-pip {
  border-radius: 12px;
}

/* Resize handle — bottom-right corner */
#sr-pip-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background: rgba(255,255,255,.6);
  border-radius: 4px 0 10px 0;
  z-index: 2;
}
#sr-pip-resize::after {
  content: "";
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(0,0,0,.5);
  border-bottom: 2px solid rgba(0,0,0,.5);
}

@media (max-width: 768px) {
  #sr-pip-wrap.sr-pip-circle {
    width: 100px;
    height: 100px;
  }
  #sr-pip-wrap.sr-pip-rectangle {
    width: 140px;
    height: 105px;
  }
}
