
.ref-slot {
  width: 100px;
  height: 100px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  text-align:center;
  color:#999;
  position:relative;
}

.ref-slot.dragover {
  border-color: #000;
}

.ref-slot img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:6px;
}

.ref-actions {
  position:absolute;
  top:4px;
  right:4px;
  display:flex;
  gap:4px;
}

.ref-btn {
  background:#fff;
  border:none;
  border-radius:50%;
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  cursor:pointer;
}

.ref-btn.active {
  background:#000;
  color:#fff;
}



.result-box img {
  width:100%;
  height:100%;
  object-fit:contain;
}


.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 10;
  backdrop-filter: blur(2px);
}


.result-img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.result-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: hidden; 
}

.result-box {
  width: 100%;
  height: 320px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

/* content full box */
.result-content {
  width: 100%;
  height: 100%;
  position: relative;
}

/* empty text căn giữa */
.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* wrapper ảnh */
.result-img-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* nút download */
.download-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1; /* test trước */
  z-index: 20;
}


.ratio-group {
  display: flex;
  gap: 10px;
}

.ratio-option {
  cursor: pointer;
}

.ratio-option input {
  display: none;
}

.ratio-option span {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  transition: all 0.2s ease;
}

/* selected */
.ratio-option input:checked + span {
  background: #000;
  color: #fff;
  border-color: #000;
}