/* UJB Listora Sidebar - 배너 / 안내문 카드 (매물 상세 오른쪽 사이드바)
 * Listora 의 다른 카드(등록자, 연락처 등)와 같은 디자인 값(--listora-*)을 써서 한 세트처럼 보이게 한다.
 * 값이 없는 테마에서도 깨지지 않도록 모든 변수에 기본값을 둔다. */

/* ── 광고 카드 ── */
.ujb-sb .ujb-sb-ad {
	box-sizing: border-box;
	margin: 0;
	padding: var(--listora-space-4, 1rem);
	background: var(--listora-bg-elevated, #fff);
	border: var(--listora-card-border, 1px solid #e5e7eb);
	border-radius: var(--listora-radius-lg, 12px);
	box-shadow: var(--listora-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

/* 위쪽 줄: [광고] 라벨 + 광고주 */
.ujb-sb .ujb-sb-ad__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 0.6rem;
}
.ujb-sb .ujb-sb-ad__badge {
	flex: 0 0 auto;
	padding: 1px 9px;
	border: 1px solid var(--listora-border, rgba(127, 127, 127, 0.35));
	border-radius: 999px;
	background: var(--listora-bg-muted, rgba(127, 127, 127, 0.1));
	color: var(--listora-text-muted, #6b7280);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.02em;
}
.ujb-sb .ujb-sb-ad__adv {
	min-width: 0;
	overflow: hidden;
	color: var(--listora-text-muted, #6b7280);
	font-size: 12px;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 이미지 영역 */
.ujb-sb .ujb-sb-ad__link {
	position: relative;
	display: block;
	color: inherit;
	text-decoration: none;
	border-radius: var(--listora-radius-md, 10px);
}
.ujb-sb .ujb-sb-ad__link:focus-visible {
	outline: 2px solid var(--listora-primary, #2563eb);
	outline-offset: 2px;
}
.ujb-sb .ujb-sb-ad__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--listora-radius-md, 10px);
	background: var(--listora-bg-muted, #f3f4f6);
	line-height: 0;
}
.ujb-sb .ujb-sb-ad__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	border-radius: 0;
	transition: transform 0.35s ease;
}

/* 이미지 위 오버레이: 아래쪽 어둡게 + 문구 + 버튼 */
.ujb-sb .ujb-sb-ad__shade {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 62%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0));
	pointer-events: none;
}
.ujb-sb .ujb-sb-ad__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding: 0.7rem 0.75rem;
	line-height: 1.35;
}
.ujb-sb .ujb-sb-ad__headline {
	display: -webkit-box;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ujb-sb .ujb-sb-ad__cta {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	margin-left: auto;
	padding: 5px 11px;
	border-radius: 999px;
	background: #fff;
	color: #111827;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease;
}

/* 마우스를 올리면 이미지가 살짝 커지고 버튼이 움직임 (모션 줄이기 설정이면 끔) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.ujb-sb .ujb-sb-ad__link:hover .ujb-sb-ad__img {
		transform: scale(1.04);
	}
	.ujb-sb .ujb-sb-ad__link:hover .ujb-sb-ad__cta {
		transform: translateX(2px);
	}
}

/* ── 안내문 카드 (다른 카드와 같은 틀) ── */
.ujb-sb .ujb-sb-html {
	box-sizing: border-box;
	margin: 0;
	padding: var(--listora-space-4, 1rem);
	background: var(--listora-bg-elevated, #fff);
	border: var(--listora-card-border, 1px solid #e5e7eb);
	border-radius: var(--listora-radius-lg, 12px);
	box-shadow: var(--listora-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}
.ujb-sb .ujb-sb-html h3 {
	margin: 0 0 0.5rem;
}
.ujb-sb .ujb-sb-html > :last-child {
	margin-bottom: 0;
}
