/* =========================================================
   PORTAL UI
   Metrics / Facts / Timeline / Quotes / Rankings
   Bootstrap 3 compatible
   ========================================================= */


/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

.portal-card {
	position: relative;
	margin-bottom: 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);

	transition:
		transform .25s ease,
		box-shadow .25s ease,
		border-color .25s ease;
}

.portal-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .07);
}

.portal-card-heading {
	padding: 13px 18px;
	border-bottom: 1px solid #eee;
	font-weight: 600;
}

.portal-card-body {
	padding: 18px;
}

.portal-muted {
	color: #888;
}


/* ---------------------------------------------------------
   Reveal animation
   --------------------------------------------------------- */

.portal-reveal {
	opacity: 0;
	transform: translateY(14px);
}

.portal-reveal.portal-visible {
	opacity: 1;
	transform: translateY(0);

	transition:
		opacity .55s ease,
		transform .55s cubic-bezier(.22, .61, .36, 1);
}


/* ---------------------------------------------------------
   Animated numbers
   --------------------------------------------------------- */

.portal-count {
	font-variant-numeric: tabular-nums;
}


/* ---------------------------------------------------------
   Did you know
   --------------------------------------------------------- */

.portal-alert {
	margin-bottom: 20px;
	padding: 13px 17px;

	border: 1px solid #d9e7f2;
	border-radius: 5px;

	background: #f7fafc;
	color: #555;

	transition:
		transform .2s ease,
		box-shadow .2s ease;
}

.portal-alert:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}

.portal-alert strong {
	color: #333;
}


/* ---------------------------------------------------------
   Quick Facts
   --------------------------------------------------------- */

.portal-facts {
	margin-bottom: 20px;
	padding: 18px 20px;

	border: 1px solid #e5e7eb;
	border-radius: 6px;

	background: #fafafa;
}

.portal-facts-title {
	margin: 0 0 15px;
	font-size: 16px;
	font-weight: 600;
}

.portal-facts dl {
	margin-bottom: 0;
}

.portal-facts dt {
	color: #888;
	font-weight: 400;
}

.portal-facts dd {
	margin-bottom: 7px;
	font-weight: 500;
}


/* ---------------------------------------------------------
   Timeline
   --------------------------------------------------------- */

.portal-timeline {
	margin-bottom: 20px;
	overflow: hidden;
}

.portal-timeline-item {
	padding: 13px 16px;
	border-bottom: 1px solid #eee;

	transition:
		background-color .2s ease,
		padding-left .2s ease;
}

.portal-timeline-item:last-child {
	border-bottom: 0;
}

.portal-timeline-item:hover {
	padding-left: 20px;
	background: #fafafa;
}

.portal-timeline-year {
	display: inline-block;
	min-width: 48px;
	font-weight: 600;
}

.portal-timeline-event {
	float: right;
	color: #777;
}


/* ---------------------------------------------------------
   Quotes
   --------------------------------------------------------- */

.portal-quote {
	margin: 0 0 20px;
	padding: 17px 20px;

	border-left: 3px solid #ddd;
	background: #fafafa;

	transition:
		border-color .2s ease,
		background-color .2s ease,
		transform .2s ease;
}

.portal-quote:hover {
	border-left-color: #aaa;
	background: #f7f7f7;
	transform: translateX(2px);
}

.portal-quote p {
	margin: 0 0 8px;
}

.portal-quote footer {
	color: #888;
	font-size: 12px;
}


/* ---------------------------------------------------------
   Ranking
   --------------------------------------------------------- */

.portal-ranking {
	margin-bottom: 20px;
	overflow: hidden;
}

.portal-ranking-item {
	padding: 12px 16px;
	border-bottom: 1px solid #eee;

	transition:
		background-color .2s ease,
		padding-left .2s ease;
}

.portal-ranking-item:last-child {
	border-bottom: 0;
}

.portal-ranking-item:hover {
	padding-left: 20px;
	background: #fafafa;
}

.portal-ranking-position {
	display: inline-block;
	min-width: 32px;
	font-weight: 600;
}

.portal-ranking-score {
	float: right;
	font-weight: 600;
	color: #777;
}


/* ---------------------------------------------------------
   Database Snapshot
   --------------------------------------------------------- */

.portal-database {
	margin-bottom: 20px;
}

.portal-database-item {
	text-align: center;
}

.portal-database-number {
	margin: 0 0 4px;
	font-size: 25px;
	line-height: 1.2;
	font-weight: 600;
}

.portal-database-label {
	color: #888;
	font-size: 12px;
}

.portal-database-divider {
	margin: 18px 0 10px;
	border-top: 1px solid #eee;
}

.portal-updated {
	color: #999;
	font-size: 11px;
}


/* ---------------------------------------------------------
   Metric
   --------------------------------------------------------- */

.portal-metric {
	margin-bottom: 15px;
}

.portal-metric-label {
	margin-bottom: 4px;
	color: #888;
	font-size: 13px;
}

.portal-metric-value {
	margin: 0;
	font-size: 25px;
	line-height: 1.3;
	font-weight: 600;
}

.portal-metric-change {
	margin-left: 5px;
	font-size: 13px;
	font-weight: 600;
}

.portal-metric-up {
	color: #3c9a5f;
}


/* ---------------------------------------------------------
   Percentage / ranking alert
   --------------------------------------------------------- */

.portal-alert-warning {
	border-color: #ead9a8;
	background: #fffaf0;
}

.portal-alert-warning strong {
	color: #8a6d3b;
}


/* ---------------------------------------------------------
   Simple stat
   --------------------------------------------------------- */

.portal-stat {
	margin-bottom: 15px;
}

.portal-stat-inner {
	padding: 17px 15px;
	text-align: center;
}

.portal-stat-number {
	margin: 0 0 4px;
	font-size: 27px;
	line-height: 1.2;
	font-weight: 600;
}

.portal-stat-label {
	margin: 0;
	color: #888;
	font-size: 13px;
}

.portal-stat-change {
	display: inline-block;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
}

.portal-stat-up {
	color: #3c9a5f;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 767px) {

	.portal-timeline-event {
		float: none;
		display: block;
		margin-top: 3px;
	}

	.portal-facts dt {
		float: none;
		width: auto;
		text-align: left;
	}

	.portal-facts dd {
		margin-left: 0;
	}

}


/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.portal-card,
	.portal-alert,
	.portal-timeline-item,
	.portal-quote,
	.portal-ranking-item,
	.portal-reveal {
		transition: none !important;
		transform: none !important;
	}

}