/* 찜(관심) 하트 — 쥬드 확정 2026-11-22 (#152·#154 디자인 대체)
 *
 * - 아이콘: 모바일 메뉴 '내 캠페인' 아이콘(/resources/img/icon/heart.webp, 168x140 = 표시 크기의 2배 이상) 그대로, 크기만 줄인다.
 *   새로 그리거나 원·테두리·그림자·광택·애니메이션을 더하지 않는다. 찜 전 = 같은 그림을 회색조·옅게(filter)만.
 * - 위치: 카드형 목록 전부 = 카드 오른쪽 아래 / 캠페인 상세 = 신청 버튼 왼쪽(PC), 신청 버튼이 안 보이면 맨 위 '신청 N/M명 모집' 줄 오른쪽
 *   (상세 자리 옮기기는 /resources/js/heart-paw.js) / 관심 지역·카테고리 설정 = 각 항목 오른쪽 끝.
 * - 스위치: main/include/header.jsp 가 HeartPawSwitch.isVisible()(HEART_PAW 켜짐, 슈퍼유저, 미리보기 BID)일 때만 이 파일과 heart-paw.js 를 싣는다.
 *   꺼지면 일반 회원은 기존 FontAwesome 하트 그대로.
 * - 마크업·클릭 동작·API 그대로. <i class="heart|heart_2|heart_parent fa fa-heart-o(찜 전)|fa-heart(찜 후)"> 의 글자 대신 ::before 에 그림.
 * - 이 파일·heart.webp·heart-paw.js 를 바꾸면 url 과 header.jsp 의 ?ver= 를 함께 올린다(Cloudflare 캐시).
 */

/* ── 공통: 글자 하트 → 그림 ─────────────────────────────── */
.heart.fa-heart-o::before,
.heart.fa-heart::before,
.heart_2.fa-heart-o::before,
.heart_2.fa-heart::before,
.heart_parent.fa-heart-o::before,
.heart_parent.fa-heart::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 15px;               /* 원본 비율 168:140 = 1.2:1 */
	vertical-align: middle;
	background: url("/resources/img/icon/heart.webp?ver=261122c") center / contain no-repeat;
}
/* 찜 전: 같은 그림을 회색조·옅게 */
.heart.fa-heart-o::before,
.heart_2.fa-heart-o::before,
.heart_parent.fa-heart-o::before {
	filter: grayscale(1) opacity(.5);
}
html.fb-dark .heart.fa-heart-o::before,
html.fb-dark .heart_2.fa-heart-o::before,
html.fb-dark .heart_parent.fa-heart-o::before {
	filter: grayscale(1) brightness(1.5) opacity(.6);
}
/* 기존 글자 하트에 붙어 있던 원 배경·그림자·확대는 모두 뺀다 — 그림만 */
.heart.fa,
.heart_2.fa,
.heart_parent.fa {
	font-size: 0 !important;
	line-height: 1 !important;
	color: inherit !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	transform: none !important;
}

/* ── ① 카드형 목록 (메인·카테고리 목록·관심 목록 interest·내 캠페인·내 리뷰): 카드 오른쪽 아래 = 맨 아래 D-day 줄 오른쪽 끝 ─────
 *   (a) 하트가 글 영역 맨 앞에 있는 카드(main.jsp·main0.jsp 목록 JS·interest.jsp): 글 영역을 줄바꿈 flex 로 바꿔
 *       맨 아래 정보줄(.2nd_info) 오른쪽에 하트를 붙인다. 하트가 있는 카드에만(:has) — 쿠폰 카드 등 다른 카드는 그대로.
 *   (b) 하트가 D-day 줄(.point) 안에 있는 카드(main0.jsp 서버 목록·내 캠페인·내 리뷰): 그 줄 오른쪽 끝.
 *   :has 미지원 브라우저에서는 원래 자리에 그림만 바뀌어 보인다. */
.mainbox .camp-description:has(> .heart.fa-heart:not([id])) {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-end;
}
.mainbox .camp-description:has(> .heart.fa-heart:not([id])) > * {
	flex: 0 0 100%;
	max-width: 100%;
	min-width: 0;
}
.mainbox .camp-description:has(> .heart.fa-heart:not([id])) > .\32 nd_info {
	flex: 0 0 100%;
	order: 98;
}
/* 하트는 맨 아래 줄(.2nd_info) 오른쪽 끝에 겹쳐 붙인다(바깥 폭 0 → 같은 줄). D-day·포인트 줄만 오른쪽을 비워 겹치지 않게 */
.mainbox .camp-description:has(> .heart.fa-heart:not([id])) > .\32 nd_info .point {
	padding-right: 24px;
}
.mainbox .camp-description > .heart.fa-heart:not([id]) {
	flex: none !important;
	order: 99;
	float: none !important;
	margin: 0 0 3px -18px !important;
	padding: 0 !important;
	pointer-events: none;      /* 표시용 — 카드 링크 클릭을 가로채지 않는다 */
}
.mainbox .point:has(.heart.fa-heart:not([id])),
.umainbox .point:has(.heart.fa-heart:not([id])) {
	position: relative;
	padding-right: 24px;
}
.mainbox .point .heart.fa-heart:not([id]),
.umainbox .point .heart.fa-heart:not([id]) {
	position: absolute;
	right: 0;
	top: 50%;
	margin: -8px 0 0 0 !important;
	padding: 0 !important;
	float: none !important;
	pointer-events: none;
}
/* ── ② 캠페인 상세 찜 버튼 (#productSubscription) — 자리는 heart-paw.js 가 옮긴다 ─────────
 *   .hp-apply-row: PC 신청 버튼 줄(하트 + 신청 버튼). .hp-at-info: 맨 위 '신청 N/M명 모집' 줄 오른쪽 끝. */
#productSubscription.heart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	margin: 0 !important;
	padding: 4px !important;
	cursor: pointer;
}
#productSubscription.heart::before {
	width: 28px;
	height: 23px;
}
.hp-apply-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 5% 0 5% 5%;
}
.hp-apply-row > .btnApplyTop {
	flex: 1 1 auto;
	width: auto !important;
	margin: 0 !important;
}
#productSubscription.heart.hp-at-info {
	float: right;
	padding: 0 2px !important;
}
#productSubscription.heart.hp-at-info::before {
	width: 26px;
	height: 22px;
}

/* 찜 누름 확인 애니메이션 (heart-paw.js fbHeartFx 가 띄우는 그림, 2026-11-23) */
.hp-fx {
	position: absolute;
	z-index: 9999;
	pointer-events: none;
	background: center / contain no-repeat;
	will-change: transform, opacity, filter;
}
.hp-fx-burst { animation: hpBurst .6s ease-out forwards; }
.hp-fx-up { opacity: 0; animation: hpUp .9s ease-out forwards; }
.hp-fx-up2 { --hp-dx: -10px; }
.hp-fx-up3 { --hp-dx: 10px; }
.hp-fx-off { filter: grayscale(1); animation: hpOff .45s ease-in forwards; }
@keyframes hpBurst {
	0%   { transform: scale(1);   opacity: .9; filter: blur(0); }
	100% { transform: scale(2.6); opacity: 0;  filter: blur(4px); }
}
@keyframes hpUp {
	0%   { transform: translate(0, 0) scale(.6);  opacity: 0; }
	20%  { opacity: 1; }
	100% { transform: translate(var(--hp-dx, 0), -56px) scale(1); opacity: 0; }
}
@keyframes hpOff {
	0%   { transform: scale(1);  opacity: .8; }
	100% { transform: scale(.3) translateY(6px); opacity: 0; }
}
/* 상세 하트 자체도 바뀐 순간 살짝 튕김 — 요소 transform 은 막혀 있어 그림(::before)에만 */
#productSubscription.heart.hp-pop::before { animation: hpPop .35s ease-out; }
@keyframes hpPop {
	0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	#productSubscription.heart.hp-pop::before { animation: none; }
}

/* ── ③ 메인·카테고리 목록의 관심 지역 하트 (#localSubscription, 비로그인 하트): 자리 그대로, 그림만 ── */
.snsfilter .heart,
.location-subscription-item .heart {
	float: none;
	padding: 2px 4px !important;
	cursor: pointer;
}
.location-subscription-item .heart::before {
	width: 22px;
	height: 18px;
}

/* ── ④ 마이페이지 찜한 캠페인 (member_sc .heart_2): 카드 오른쪽 아래, D-day 는 그 왼쪽으로 ── */
.member-sc-body .heart_2 {
	top: auto !important;
	right: 14px !important;
	bottom: 25px !important;      /* D-day 줄 높이에 맞춤 */
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 2px !important;
}
.member-sc-body .heart_2::before {
	width: 20px;
	height: 17px;
}
.member-sc-body .heart_cam .remainInfo {
	padding-right: 40px;
}

/* ── ⑤ 마이페이지 관심 지역(시·도 / 구·동 칩) · 관심 카테고리: 각 항목 오른쪽 끝 ── */
.member-sc-body .heart_parent,
.member-sc-body .location-chip .heart {
	order: 2;
	margin: 0 0 0 6px !important;
}
.member-sc-body .heart_parent::before {
	width: 20px;
	height: 17px;
}
.member-sc-body .location-chip .heart::before {
	width: 16px;
	height: 13px;
}
.member-sc-category-table th:last-child,
.member-sc-category-table td:last-child {
	text-align: right !important;
	padding-right: 24px !important;
}
.member-sc-category-table .heart {
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 4px !important;
}
.member-sc-category-table .heart::before {
	width: 20px;
	height: 17px;
}
