/* pi-widget layout — contents/source heights must only be defined here */
/* row grid (flex columns) is defined in each page: .row-1/.row-2, .dashboard-widget */

.card-wrap {
	font-family: Pretendard;
	padding: 8px;
	box-sizing: border-box;
}

.row-1 .card-wrap,
.row-2 .card-wrap,
.dashboard-widget .card-wrap {
	flex: 1;
	min-width: 0;
}

.pi-widget-card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	position: relative;
	background: #fff;
	padding: 16px;
	border-radius: 16px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	width: 100%;
	min-height: unset;
	flex-shrink: 0;
}

.pi-widget-contents {
	flex-shrink: 0;
	overflow: hidden;
	box-sizing: border-box;
}

.pi-widget-source {
	flex-shrink: 0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	box-sizing: border-box;
}

.pi-widget-source .pi-source-meta {
	margin-top: 0;
	width: 100%;
}

/* row-1 / main 4 widgets */
.pi-widget-card--sm {
	height: 352px;
}

.pi-widget-card--sm .pi-widget-contents {
	height: 260px;
}

.pi-widget-card--sm .pi-widget-source {
	height: 60px;
}

.pi-widget-card--sm .pi-widget-contents > .top-wrap,
.pi-widget-card--sm .pi-widget-contents > .avg-wrap,
.pi-widget-card--sm .pi-widget-contents > .sale-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.pi-widget-card--sm .pi-widget-contents > .avg-wrap {
	overflow-y: auto;
}

/* row-2 widgets */
.pi-widget-card--lg {
	height: 512px;
}

.pi-widget-card--lg .pi-widget-contents {
	height: 420px;
}

.pi-widget-card--lg .pi-widget-source {
	height: 60px;
}

.pi-widget-card--lg .pi-widget-contents > .issue-wrap,
.pi-widget-card--lg .pi-widget-contents > .webzine-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	min-height: 0;
}
