@charset "UTF-8";
/*
 *  File Name   : /hub/assets/css/common/like-button.css
 *  Description : 좋아요 버튼 — 히어로 바와 영상 확대 레이어 공용
 */

.like-button {position: relative; display: flex; align-items: center; justify-content: center;
	gap: 8px; color: #fafafa;
	--heart: 24px; --heart-art: 22px 20px; --heart-on: 20px 18px;}

/* like-button */
.like-button::after {content: ''; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px;}

/* ===== 하트 ===== */
.like-button__heart {position: relative; flex: 0 0 var(--heart); width: var(--heart); height: var(--heart);}

.like-button__heart::before,
.like-button__heart::after {content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
	background-repeat: no-repeat; background-position: 50% 50%;
	transition: opacity 0s 120ms;}

.like-button__heart::after {background-size: var(--heart-art);
	background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' overflow='visible' style='display: block;' width='21.6' height='19.6' viewBox='0 0 21.6 19.6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath id='Vector' d='M20.8 6.66C20.8 8.2 20.21 9.68 19.15 10.79C16.7 13.32 14.34 15.96 11.81 18.4C11.22 18.95 10.3 18.93 9.75 18.36L2.45 10.79C0.25 8.51 0.25 4.82 2.45 2.53C2.97 1.99 3.6 1.55 4.3 1.25C4.99 0.95 5.74 0.8 6.49 0.8C7.25 0.8 8 0.95 8.69 1.25C9.39 1.55 10.01 1.99 10.53 2.53L10.8 2.81L11.06 2.53C11.59 1.99 12.21 1.55 12.91 1.25C13.6 0.96 14.35 0.8 15.1 0.8C16.62 0.8 18.08 1.42 19.14 2.53C20.21 3.64 20.8 5.12 20.8 6.66Z' stroke='%23EFEFEF' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");}

.like-button__heart::before {opacity: 0; background-size: var(--heart-on);
	background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' overflow='visible' style='display: block;' width='20' height='18' viewBox='-0.13 0 20 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath id='Vector_filled' d='M20 5.86C20 7.4 19.41 8.88 18.35 9.99C15.9 12.52 13.54 15.16 11.01 17.6C10.42 18.15 9.5 18.13 8.95 17.55L1.65 9.99C-0.55 7.71 -0.55 4.02 1.65 1.73C2.17 1.19 2.8 0.75 3.5 0.45C4.19 0.15 4.94 0 5.69 0C6.45 0 7.2 0.15 7.89 0.45C8.59 0.75 9.21 1.19 9.73 1.73L10 2.01L10.26 1.73C10.79 1.19 11.41 0.75 12.11 0.45C12.8 0.16 13.55 0 14.3 0C15.82 0 17.28 0.62 18.34 1.73C19.41 2.84 20 4.32 20 5.86Z' fill='%23F01616'/%3E%3C/svg%3E");}

.like-button[aria-pressed="true"] .like-button__heart::after {opacity: 0;}
.like-button[aria-pressed="true"] .like-button__heart::before {opacity: 1;}

/* ===== * 튀어 나가는 작은 하트 ===== */
.like-button__heart i {position: absolute; left: 50%; top: 50%; width: 16px; height: 15px;
	margin: -8px 0 0 -8px; opacity: 0;
	background: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' overflow='visible' style='display: block;' width='14' height='12.6' viewBox='0 0 14 12.6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='spark-1'%3E%3Cpath d='M14 4.1C14 5.18 13.59 6.22 12.84 6.99C11.13 8.77 9.48 10.61 7.7 12.32C7.3 12.71 6.65 12.69 6.26 12.29L1.16 7C-0.39 5.39 -0.39 2.81 1.16 1.21C1.52 0.83 1.96 0.52 2.45 0.32C2.93 0.11 3.46 0 3.99 0C4.51 0 5.04 0.11 5.52 0.32C6.01 0.52 6.45 0.83 6.81 1.21L7 1.4L7.19 1.21C7.55 0.83 7.99 0.53 8.48 0.32C8.96 0.11 9.48 0 10.01 0C11.08 0 12.09 0.44 12.84 1.21C13.59 1.99 14 3.03 14 4.1Z' fill='%23F01616'/%3E%3C/g%3E%3C/svg%3E") no-repeat 50% 50% / contain;}

.like-button__heart i:nth-child(1) {--dx: -14px; --dy: -78px; --at: 60ms;  --rot: -18deg;}
.like-button__heart i:nth-child(2) {--dx: 12px;  --dy: -86px; --at: 130ms; --rot: 15deg;}
.like-button__heart i:nth-child(3) {--dx: -22px; --dy: -70px; --at: 200ms; --rot: -26deg;}
.like-button__heart i:nth-child(4) {--dx: 20px;  --dy: -92px; --at: 270ms; --rot: 22deg;}
.like-button__heart i:nth-child(5) {--dx: -6px;  --dy: -95px; --at: 340ms; --rot: -8deg;}
.like-button__heart i:nth-child(6) {--dx: 15px;  --dy: -74px; --at: 410ms; --rot: 18deg;}
.like-button__heart i:nth-child(7) {--dx: -18px; --dy: -88px; --at: 480ms; --rot: -20deg;}

.like-button.is-burst .like-button__heart {animation: like-pop 480ms both;}
.like-button.is-burst .like-button__heart i {animation: like-float 900ms var(--at) cubic-bezier(.25, .6, .35, 1) forwards;}

@keyframes like-pop {
	0% {transform: scale(1); animation-timing-function: cubic-bezier(.42, 0, 1, 1);}
	40% {transform: scale(1.25);}
	100% {transform: scale(1);}
}

@keyframes like-float {
	0% {opacity: 0; transform: translate(0, 0) scale(.4) rotate(0deg);}
	18% {opacity: 1;}
	100% {opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot));}
}

/* ===== 숫자 ===== */
/* 폭을 잡지 않음 — 남는 자리가 오른쪽에 생겨 하트까지 왼쪽으로 쏠림. 폭은 쓰는 쪽에서 잡음 */
.like-button__count {overflow: hidden; display: grid; height: 26px;
	font-weight: 500; font-size: 16px; line-height: 26px; text-align: left;
	font-variant-numeric: tabular-nums;}
.like-button__count b {grid-area: 1 / 1; font-weight: inherit;}
.like-button__count b.is-out {animation: like-num-out 200ms var(--ease-out) forwards;}
.like-button__count b.is-in {animation: like-num-in 200ms var(--ease-out) forwards;}

@keyframes like-num-out {
	from {opacity: 1; transform: translateY(0);}
	to {opacity: 0; transform: translateY(-12px);}
}
@keyframes like-num-in {
	from {opacity: 0; transform: translateY(12px);}
	to {opacity: 1; transform: translateY(0);}
}

@media (prefers-reduced-motion: reduce) {
	.like-button.is-burst .like-button__heart,
	.like-button.is-burst .like-button__heart i,
	.like-button__count b.is-out,
	.like-button__count b.is-in {animation: none;}
}
