/* =========================================
   YouTube Unlocker Block v6 — Frontend CSS
   Compact inline — zero layout interference
   ========================================= */

.yub-wrap {
	--yub-brand: #FF0000;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	margin: 4px 0 16px;
}

/* ===== Gate bar ===== */
.yub-gate {
	border: 2px solid var(--yub-brand);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.yub-gate-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	flex-wrap: wrap;
}

.yub-gate-label {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.yub-yt-dot {
	width: 26px;
	height: 26px;
	background: var(--yub-brand);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.yub-gate-label-text {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Subscribe button */
.yub-sub-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	background: var(--yub-brand);
	color: #fff !important;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	border: none;
	transition: filter .2s, transform .2s;
	flex-shrink: 0;
}
.yub-sub-btn:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

/* Confirm row */
.yub-confirm-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	background: #f9f9f9;
	border-top: 1px solid #f0f0f0;
	flex-wrap: wrap;
	animation: yub-slide-down .3s ease;
}

@keyframes yub-slide-down {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.yub-confirm-hint {
	font-size: 12px;
	color: #666;
	flex: 1;
}

.yub-confirm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #16a34a;
	color: #fff;
	border: none;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	transition: filter .2s, transform .2s;
}
.yub-confirm-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* ===== Preparing bar ===== */
.yub-preparing {
	border: 2px solid #e8e8e8;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.yub-prep-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
}

.yub-prep-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid #f0f0f0;
	border-top-color: var(--yub-brand);
	border-radius: 50%;
	animation: yub-spin .8s linear infinite;
	flex-shrink: 0;
}
@keyframes yub-spin { to { transform: rotate(360deg); } }

.yub-prep-text {
	flex: 1;
	min-width: 0;
}

.yub-prep-status {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #444;
	margin-bottom: 6px;
	transition: opacity .2s;
}
.yub-prep-status.yub-fade { opacity: 0; }

.yub-prep-bar-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.yub-prep-bar {
	flex: 1;
	height: 6px;
	background: #f0f0f0;
	border-radius: 100px;
	overflow: hidden;
}

.yub-prep-fill {
	height: 100%;
	width: 0%;
	background: var(--yub-brand);
	border-radius: 100px;
	transition: width .35s ease;
	position: relative;
	overflow: hidden;
}
.yub-prep-fill::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
	animation: yub-shimmer 1.4s infinite;
}
@keyframes yub-shimmer {
	from { transform: translateX(-100%); }
	to   { transform: translateX(100%); }
}

.yub-prep-pct {
	font-size: 11px;
	font-weight: 700;
	color: var(--yub-brand);
	width: 32px;
	text-align: right;
	flex-shrink: 0;
}

/* ===== Locked content — blurred ===== */
.yub-content {
	filter: blur(6px);
	pointer-events: none;
	user-select: none;
	transition: filter .7s ease;
	margin-top: 4px;
}
.yub-content.yub-revealed {
	filter: none;
	pointer-events: auto;
	user-select: auto;
}

/* ===== Mobile ===== */
@media ( max-width: 480px ) {
	.yub-gate-top { flex-direction: column; align-items: flex-start; }
	.yub-sub-btn  { width: 100%; justify-content: center; }
	.yub-confirm-row { flex-direction: column; align-items: flex-start; }
	.yub-confirm-btn { width: 100%; justify-content: center; }
}
