/* Container thực thi của JS */
.front-video-container {
	width: 100%;
	height: 100%;
}

/* Video Frame Wrapper */
.video-frame {
	position: relative;
	width: 100%;
	height: 100%;
	background-color: #000;
	overflow: hidden;
}

.video-frame-inner {
	height: 100%;
	width: 100%;
	position: relative;
}

/* Video Element */
.front-card-video {
	height: 100%;
	width: 100%;
	object-fit: cover;
	display: block;
}
.front-card-video-zoomed {  
    object-fit: cover;  
    object-position: center center;  
}  
  
.front-card-video-origin {  
    object-fit: contain;  
    object-position: center center;  
}  

/* Control Overlay */
.front-card-video-control {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-flow: column;
	pointer-events: none; /* Click xuyên qua để play video */
}

/* Nút Mute */
.front-card-toogle-mute {
	position: absolute;
	top: 10px;
	left: 10px;
	background-color: rgba(204, 204, 204, 0.8);
	border-radius: 4px;
	padding: 5px 5px;
	display: flex;
	align-items: center;
	cursor: pointer;
	pointer-events: auto;
	z-index: 3;
	box-shadow: 0 0 5px -1px rgba(0, 0, 0, 0.6);
}

/* Bottom Box (Chứa tất cả control dưới đáy) */
.front-card-video-bottom-box {
	min-height: 80px;
	width : 100%;
	height: auto;
	display: flex;
	flex-flow: column; /* Xếp chồng: Seekbar trên, Description dưới */
	z-index: 12;
	position: absolute;
	bottom: 0;
	pointer-events: none;
	flex-flow: column-reverse;
}

/* Thanh Seekbar */
.front-card-video-box-seek,
.back-card-video-box-seek {
	width: calc(100% - 20px);
	height: 5px;
	display: flex;
	align-items: flex-end; /* Nằm sát đáy của box cha */
	pointer-events: auto;
	margin-bottom: 25px;
	margin-left: 10px;
	z-index: 1;
	margin-right: 10px;
    position: relative;
}

.front-card-video-box-seek-control {
	width: 100%;
	height: 5px;
	background-color: rgba(0, 0, 0, 0.4);
	cursor: pointer;
	position: relative;
	margin: 0 10px; /* Cách lề 2 bên */
}

.front-card-video-box-seek-span {
	display: block;
	height: 100%;
	width: 0%;
	background-color: white;
	border-radius:10px;
	transition: width 0s linear;
}
.front-card-video-box-seek-span.dragging, .front-card-video-box-seek-span.dragging * {
	transition: none !important;
}
/* ================================================
   SEEKBAR THUMB INDICATOR - ADD ONLY
   ================================================ */

/* Tăng vùng touch bằng pseudo-element (không ảnh hưởng layout) */


.front-card-video-box-seek::before,
.back-card-video-box-seek::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 60px;
    transform: translateY(-50%);
    z-index: 1;
    /* Vùng touch ảo - click xuyên qua */
}

/* Thumb indicator - Ẩn mặc định */
.thumb-indicator {
    display: none;
    position: absolute;
    top: 50%;
    left: 0;                         
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* Thumb hiện khi drag */
.front-card-video-box-seek.is-dragging .thumb-indicator,
.back-card-video-box-seek.is-dragging .thumb-indicator {
    display: block;
}

/* Description Box */
.front-card-video-box-description {
	width: 100%;
	height: auto;
	overflow: hidden;
	display: flex;
	pointer-events: auto;
	z-index: 2;
}

.front-card-video-description {
	color: white;
	width: 80%;
	text-align: left;
	margin-left: 10px;
	word-wrap: break-word;
	margin-bottom: 10px;
}

/* Nút Flip */
.front-card-video-button {
	display: flex;
	width: 20%;
	align-items: flex-end;
	justify-content: flex-end;
	padding-right: 10px;
}

.front-card-video-button-share {
    height: 25px;
    width: 25px;
    padding: 2px;
    position: absolute;
    margin-bottom: 20px;
}

.front-card-video-button-share img {
	height: 100%;
	width: 100%;
}
/* ═══════════════════════════════════════════════════════════
   Image Wrapper Trick: Thay thế object-fit cho <img>
   Tránh GIF animated bị đen khi dùng background-image.
   Wrapper làm nhiệm vụ crop (overflow: hidden),
   <img> bên trong dùng absolute positioning để center + fill.
   ═══════════════════════════════════════════════════════════ */
.front-card-image-wrapper {
	width: 100%;
	height: 100%;
	position: relative;
	overflow: hidden;
}

.front-card-image-element {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-mode-cover .front-card-image-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-mode-contain .front-card-image-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Thay thế cho #front-card-video-box-play (Nút giữa) */
.front-card-video-box-play {
	/* Đặt absolute để thoát normal flow, nằm đè lên giữa video */
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	/* Giữ các property cũ */
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	z-index: 2;
	outline: none;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* Cho một số dòng máy cũ */
}

.video-loading-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}
.video-loading-overlay img {
    width: 50px;
    height: 50px;
}

.front-card-video-play-button {
	width: 60px;
	height: 60px;
	padding : 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: opacity 0.3s;
}

.front-card-video-play-button.is-hidden {
	opacity: 0;
}

.front-card-video-play-button img {
	width: 30px;
}


.front-card-icon-sound {
	height: 16px;
	margin-right: 5px;
}

.front-card-text-mute span {
	color: black;
}