.mtcv-content {
  font-size: 1rem;
  background: #FFF;
  width: 22rem;
  border-radius: 0.48rem;
  box-shadow: 0 -0.32rem 1.28rem rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.28s ease-out, opacity 0.25s;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  backface-visibility: hidden;
  will-change: transform, opacity;
  position: relative;
  padding: 0px 0.8rem 0.8rem;
}

.mtcv-container {
  position: absolute;
  inset: 0;
  background: #00000078;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.28s ease-out, opacity 0.25s;
}
.mtcv-container.mtcv-show {
  opacity: 1;
  margin: 0 auto;
}
.mtcv-container.mtcv-show .mtcv-content {
  transform: translateY(0) !important;
  animation: mtcvSlideUp 0.3s ease-out;
  margin: 0 auto;
}

.mtcv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid #F2F0F0;
  height: 2.8rem;
}
.mtcv-title {
  font-weight: 700;
  color: var(--black);
  margin: 0;
}

.mtcv-content .mtcv-title {
  font-size: 1rem;
}
.mtcv-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 50%;
  transition: all 0.15s ease-out;
}
.mtcv-content .mtcv-close-btn {
  font-size: 1.3rem;
}
.dialog-mtcv-header {
  display: flex;
  font-size: 1rem;
  color: #010101;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
}
.dialog-mtcv-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 0.9rem;
}
.mtcv-info-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.32rem 0;
  border-radius: 0.3em;
}
.mtcv-dimensions {
  display: flex;
  gap: 0.64rem;
}
.mtcv-dimension-item {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gray-700);
}
.mtcv-dimension-value {
  text-align: center;
}

.mtcv-done-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.3em;
  cursor: pointer;
  transition: all 0.15s ease-out;
  width: 4.8rem;
  height: 1.92rem;
}
.mtcv-content .mtcv-done-btn {
  font-size: 0.8em;
}
.mtcv-done-btn:hover {
  transform: translateY(-1px);
}

.mtcv-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 16rem;
  background: var(--gray-300);
  overflow: hidden;
  margin: 0 auto;
}

.mtcv-media-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mtcv-displayed-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mtcv-overlay-part {
  position: absolute;
  background: #000;
  opacity: 0.75;
  pointer-events: none;
  z-index: 2;
  display: none;
}

.mtcv-crop-box {
  position: absolute;
  box-sizing: border-box;
  background: rgba(75, 136, 230, 0.04);
  touch-action: none;
  z-index: 4;
  user-select: none;
  display: none;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  cursor: move;
}

.mtcv-handle {
  width: 0.8rem;
  height: 0.8rem;
  background: transparent;
  position: absolute;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.mtcv-handle::before {
  content: "";
  position: absolute;
  inset: 0.2rem;
  background: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 2px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.mtcv-handle:active::before {
  background: var(--primary-color);
  border-color: var(--white);
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(75, 136, 230, 0.5);
}
.mtcv-handle.tl { 
  top: -0.28rem; 
  left: -0.28rem; 
  cursor: nwse-resize; 
}
.mtcv-handle.tr { 
  top: -0.28rem; 
  right: -0.28rem; 
  cursor: nesw-resize; 
}
.mtcv-handle.bl { 
  bottom: -0.28rem; 
  left: -0.28rem; 
  cursor: nesw-resize; 
}
.mtcv-handle.br { 
  bottom: -0.28rem; 
  right: -0.28rem; 
  cursor: nwse-resize; 
}
/* 4 cạnh giữa */
.mtcv-handle.tm { 
  top: -0.28rem; 
  left: 50%; 
  transform: translateX(-50%);
  cursor: n-resize; 
}
.mtcv-handle.bm { 
  bottom: -0.28rem; 
  left: 50%; 
  transform: translateX(-50%);
  cursor: s-resize; 
}
.mtcv-handle.ml { 
  top: 50%; 
  left: -0.28rem; 
  transform: translateY(-50%);
  cursor: w-resize; 
}
.mtcv-handle.mr { 
  top: 50%; 
  right: -0.28rem; 
  transform: translateY(-50%);
  cursor: e-resize; 
}
@media (max-width: 768px) {
  .mtcv-handle {
    width: 1.4rem;
    height: 1.4rem;
  }
  
  .mtcv-handle::before {
    inset: 0.1rem;
    border-radius: 3px;
  }
  
  .mtcv-handle.tl { 
    top: -0.5rem; 
    left: -0.5rem; 
  }
  .mtcv-handle.tr { 
    top: -0.5rem; 
    right: -0.5rem; 
  }
  .mtcv-handle.bl { 
    bottom: -0.5rem; 
    left: -0.5rem; 
  }
  .mtcv-handle.br { 
    bottom: -0.5rem; 
    right: -0.5rem; 
  }
  
  .mtcv-handle.tm { 
    top: -0.5rem; 
  }
  .mtcv-handle.bm { 
    bottom: -0.5rem; 
  }
  .mtcv-handle.ml { 
    left: -0.5rem; 
  }
  .mtcv-handle.mr { 
    right: -0.5rem; 
  }
  .mtcv-handle:active::before {
    transform: scale(1.2);
  }
}

@keyframes mtcvSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.mtcv-crop-ratios {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 242, 242, 1);
  gap: 10px;
  overflow-y: auto;
  overflow-x: scroll;
  scrollbar-width: none;
}
.mtcv-crop-ratios::-webkit-scrollbar {
  display: none;
}
.mtcv-ratio-btn {
  border-radius: .4rem;
  font-weight: lighter;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(208, 207, 207, 1);
  display: flex;
  gap: .4rem;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #838181;
  padding: .48rem .82rem;
  font-weight: 500;
  width: 4.8rem;
  height: 2.16rem;
}
.mtcv-crop-ratios img, .mtcv-flip-btn img {
  width: 1.2rem;
}
.mtcv-content .mtcv-ratio-btn, .mtcv-crop-ratios span, .mtcv-flip-btn {
  font-size: 0.8rem;
}

.mtcv-crop-ratios-active, .mtcv-flip-btn-active {
  background: rgba(231, 240, 255, 1) !important;
  border: 1px solid rgba(210, 226, 254, 1) !important;
}

.mtcv-flip-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(242, 242, 242, 1);
}
.mtcv-flip-btn {
  border-radius: .4rem;
  font-weight: lighter;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(208, 207, 207, 1);
  display: flex;
  gap: .4rem;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #838181;
  font-weight: 500;
  height: 2.16rem;
}
.ver-btn {
  padding: 0 0.88rem;
}
.hor-btn {
  padding: 0 0.4rem;
}
