﻿@import '../default.less';
@import '../mixins.less';
//DON'T ADD IMPORTS, ABOVE ARE TO MAKE INTELLISENSE WORK

div.feed
{
	@border: 1px solid #eaeaea;

	.statistics-icon(@leftPosition: 0px)
	{
		display: inline-block;
		width: 16px;
		height: 15.5px;
		background-image: url(/img/v2/page/page-toolbar-icons.png?v=2);
		background-position: @leftPosition 0px;
		margin-right: 3px;

		html[dir='rtl'] &
		{
			.margin-left-right(3px, 0);
		}
	}

	a
	{
		text-decoration: none;
		color: @accent-color;

		&.ui-button
		{
			color: white;
		}

		&:hover
		{
			text-decoration: underline;
		}
	}

	h3
	{
		padding: 0;
		border-bottom: @border;
		font: 16pt @title-font;

		a
		{
			text-decoration: none;
		}
	}

	.thumbnails-row-simple
	{
		p
		{
			display: inline-block;
			vertical-align: top;
			width: 720px;
			margin: 0px;
		}
	}

	.A4S, .B4S, .S4B, .BB, .S4
	{
		font-size: 0;
		margin-bottom: 20px;
		white-space: nowrap;

		.left-block, .right-block
		{
			display: inline-block;
		}
	}

	.A4S
	{
		.top-block
		{
			border: @border;
			font-size: 0;
			max-width: 910px;

			.left-block
			{
				display: inline-block;
				width: 210px;
				border: none;

				.normal-size
				{
					height: 120px;

					.resource-url, .title, .details
					{
						display: none;
					}
				}
			}

			.right-block
			{
				display: inline-block;
				min-height: 120px;
				padding: 10px 5px 0 0;
				white-space: normal;
				width: 690px;

				html[dir='rtl'] &
				{
					padding: 10px 0 0 5px;
				}
			}
		}

		.bottom-block
		{
			margin-top: 20px;
		}
	}

	.B4S
	{
		.left-block
		{
			margin-right: 28px;

			html[dir='rtl'] &
			{
				.margin-left-right(28px, 0);
			}
		}

		.right-block > .thumbnails-row:first-child
		{
			margin-bottom: 13px;
		}
	}

	.S4B
	{
		.left-block
		{
			width: 473px;

			& > .thumbnails-row:first-child
			{
				margin-bottom: 13px;
			}
		}
	}

	.BB
	{
		& > .thumbnail
		{
			margin-right: 36px; // (910 - (435 + 2) * 2)
			html[dir='rtl'] &
			{
				.margin-left-right(36px, 0);
			}

			&:last-child
			{
				margin-right: 0;

				html[dir='rtl'] &
				{
					margin-left: 0;
				}
			}
		}
	}

	div.datasetlist
	{
		margin-bottom: 20px;
		font-family: @title-font;

		.dataset
		{
			border: solid 1px #EAEAEA;
			margin: 10px 0 15px;
			padding: 5px 15px;

			a.title
			{
				font: bold 12pt @title-font;
			}

			.metadata, .description
			{
				margin: 7px 0;
			}

			.metadata
			{
				font-size: 10pt;
				color: #999;

				a
				{
					color: #999;
					text-decoration: underline;
				}
			}

			.description
			{
				line-height: 1.5em;
				font-size: 10pt;
				font-family: @text-font;
				line-height: 1.5em;
			}
		}
	}

	a.author
	{
		float: right;
		font-size: 10pt;
		margin-right: 5px;
		position: relative;
		top: -3px;
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		text-align: right;
		text-overflow: ellipsis;
		white-space: nowrap;
		display: inline-block;
		width: 95px;
		overflow: hidden;

		html[dir='rtl'] &
		{
			float: left;
			text-align: left;
			.margin-left-right(5px, 0);
		}
	}

	div.details
	{
		max-width: 690px;

		div.res-title
		{
			a
			{
				text-decoration: none;
				float: none;
				font: bold 12pt @title-font;
			}

			margin-bottom: 5px;
		}

		div.description
		{
			overflow: hidden;
			font-size: 10pt;
			text-align: left;
			height: 65px;
			margin-bottom: 5px;
			line-height: 1.3em;
			white-space: normal;

			html[dir='rtl'] &
			{
				text-align: right;
			}
		}

		div.details-footer
		{
			font-size: 0;

			a.author
			{
				display: inline-block;
				float: none;
				.margin-left-right(0, 0);
				padding-right: 5px;
				position: initial;
				top: auto;
				width: 70%;

				html[dir='rtl'] &
				{
					.padding-left-right(5px, 0);
				}
			}

			div.statistics
			{
				display: inline-block;
				float: none;
				width: 30%;
			}
		}

		div.statistics
		{
			font-size: 9pt;
			float: left;

			html[dir='rtl'] &
			{
				float: right;
			}

			span.pins
			{
				.statistics-icon(82px);
			}

			span.views
			{
				.statistics-icon();
			}

			span.views-count
			{
				margin-right: 5px;

				html[dir='rtl'] &
				{
					.margin-left-right(5px, 0);
				}
			}
		}
	}

	div.comment
	{
		margin: 10px 0 20px 0;
		padding: 5px;
		font-size: 10pt;
		min-height: 50px;


		img
		{
			float: left;
			margin-right: 10px;
			border: @border;

			html[dir='rtl'] &
			{
				float: right;
				.margin-left-right(10px, 0);
			}
		}

		span.message
		{
			display: block;
			margin: 10px 0px 0 60px;
			padding: 8px;
			background-color: #D7E6F5;
			border-radius: 3px;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;

			html[dir='rtl'] &
			{
				margin: 10px 60px 0 0px;
			}

			&:before
			{
				background-image: url(/img/v2/shared/notification-sprites.png);
				background-position: 8px 0px;
				width: 5px;
				height: 10px;
				position: absolute;
				left: 80px;
				content: "";
			}
		}

		span.time
		{
			font-size: 10pt;
			font-family: @title-font;
			float: right;
			color: gray;

			html[dir='rtl'] &
			{
				float: left;
			}
		}
	}

	div.notification-title
	{
		font-size: 10pt;
		font-family: @title-font;
		margin: 20px 0 10px 0;

		div.title
		{
			text-align: right;
			html[dir='rtl'] &
			{
				text-align: left;
			}
		}
	}

	table.data-alert
	{
		width: 100%;
		border: 1px solid #eaeaea;
		margin: 10px 0 20px 0;

		a
		{
			font: 10pt @title-font;
			color: @accent-color;
			text-decoration: none;
		}

		tr:nth-child(even)
		{
			background-color: #F0F0F0;
		}

		th
		{
			a
			{
				font: bold 12pt @title-font;
				color: @accent-color;
			}

			padding: 5px 15px;
			text-align: left;

			span.source
			{
				font: normal 9pt @title-font;
				display: block;
				margin: 3px 0;
				color: #999999;
			}

			span.date
			{
				font: normal 9pt @title-font;
				display: block;
				margin: 3px 0;
				color: #999999;
			}
		}

		td
		{
			padding: 5px 15px;

			&.timeseries
			{
				width: 65%;
			}

			span
			{
				font: 10pt @title-font;
			}

			span.value, span.date
			{
				font-weight: bold;
			}

			span.changed
			{
				color: gray;
				display: block;
				margin-top: 5px;
			}
		}
	}
}

.community-v2
{
	div.block
	{
		margin-bottom: 25px;

		p
		{
			font-size: 1.1em;
			margin-bottom: 8px;
			margin-top: 0;

			&.block-title
			{
				font-size: 1.3em;
				text-align: justify;

				span
				{
					background-repeat: no-repeat;
					.hires('/img/community/v2/circle');
					display: inline-block;
					height: 30px;
					width: 30px;
					line-height: 30px;
					text-align: center;
					margin-right: 10px;

					html[dir='rtl'] &
					{
						.margin-left-right(10px, 0);
					}
				}
			}
		}
	}

	.dataset-thumbnail, .placeholder, .dashboard
	{
		width: 210px;
		height: 140px;
		border: 1px solid #EAEAEA;
		display: inline-block;
		box-sizing: border-box;
		text-decoration: none;
		font-size: 1.2em;
		text-align: center;
		margin-right: 20.6px;

		html[dir='rtl'] &
		{
			.margin-left-right(20.6px, 0);
		}

		&:last-child
		{
			margin-right: 0;

			html[dir='rtl'] &
			{
				margin-left: 0;
			}
		}

		&.double
		{
			width: 440.6px;
		}

		.value
		{
			height: 120px;

			span
			{
				display: inline-block;
				font-size: 3em;
				margin-top: 20px;
				font-weight: bold;
			}
		}

		div.empty-page
		{
			height: 120px;
			background: url("/img/v2/shared/page.png") no-repeat scroll center center rgba(0, 0, 0, 0);

			div
			{
				height: 100%;
			}
		}

		.title
		{
			padding: 0 5px;
			box-sizing: border-box;
			background-color: @accent-color;
			color: #FFFFFF;
			font-size: 10pt;
			height: 20px;
			line-height: 20px;
			overflow-x: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			width: 100%;
			text-align: center;
		}
	}

	.visualizations
	{
		h3
		{
			font: 1.5em @title-font;
			border-bottom: 1px solid #eaeaea;
			margin: 5px 0 15px 0;
			width: 445px;
			display: inline-block;

			a
			{
				text-decoration: none;
			}

			&.secondary-topic
			{
				float: right;

				html[dir='rtl'] &
				{
					.margin-left-right(15px, 0);
				}
			}

			&.topic
			{
				width: 910px;
			}
		}
	}

	.create-and-upload
	{
		div.create-dashboard, div.upload-data
		{
			width: 440px;
			display: inline-block;
			vertical-align: top;

			p
			{
				padding-right: 30px;

				html[dir='rtl'] &
				{
					.padding-left-right(30px, 0);
				}
			}

			a
			{
				background-color: @accent-color;
				padding: 5px 10px;
				text-decoration: none;
				margin: 10px auto;
				display: inline-block;
				width: 160px;
				color: #FFFFFF;
				font-size: 1.1em;
				font-weight: bold;
				height: 20px;
				line-height: 20px;

				span
				{
					background-repeat: no-repeat;
					display: inline-block;
					width: 17px;
					vertical-align: middle;
					margin-right: 5px;

					html[dir='rtl'] &
					{
						.margin-left-right(5px, 0);
					}
				}
			}
		}

		div.create-dashboard
		{
			html[dir='rtl'] &
			{
				margin-left: 20px;
			}

			span
			{
				.hires('/img/community/v2/icon_create');
				height: 15px;
			}
		}

		div.upload-data
		{
			margin-left: 20px;

			html[dir='rtl'] &
			{
				margin-left: 0;
			}

			span
			{
				.hires('/img/community/v2/icon_upload');
				height: 20px;
			}
		}
	}

	&.customize
	{
		div.placeholder
		{
			height: 100%;
			box-sizing: border-box;
			border: 1px dashed #CCC !important;
			background-image: url("/img/community/v2/empty.png");
			background-position: center center;
			background-repeat: no-repeat;
		}

		.datasets
		{
			.primary-topic, .secondary-topic, .all-topics
			{
				width: 210px;
				height: 140px;
				display: inline-block;
				text-decoration: none;
				text-align: center;
				margin-right: 20px;
				vertical-align: top;

				html[dir='rtl'] &
				{
					.margin-left-right(20px, 0);
				}

				&:last-child
				{
					margin-right: 0;

					html[dir='rtl'] &
					{
						margin-left: 0;
					}
				}
			}

			.all-topics
			{
				width: 440px;
			}
		}

		.visualizations
		{
			div.S4
			{
				display: block;
				width: 910px;
				height: 145px;

				.primary-topic, .secondary-topic
				{
					width: 445px;
					height: 140px;
					float: left;
				}

				.secondary-topic
				{
					float: right;
					margin-right: 0px;
				}
			}
		}

		#populate-with-data
		{
			display: block;
			width: 910px;
			height: 60px;
			background-color: @accent-color;
			margin: 10px 0;
			font-family: @title-font;

			span#apply
			{
				background-color: #E0E0E0;
				border: 0 none;
				font-size: 9pt;
				height: auto;
				padding: 4px 20px;
				text-decoration: none;
				width: auto;
				cursor: pointer;
				margin-left: 10px;
				font-weight: bold;

				html[dir='rtl'] &
				{
					.margin-left-right(0, 10px);
				}
			}

			div.tags
			{
				float: left;

				html[dir='rtl'] &
				{
					float: right;
				}

				> label, > h3
				{
					color: #FFF;
					line-height: 60px;
				}

				> div, #apply, > label
				{
					display: inline-block;
				}

				label
				{
					margin: 0 5px 0 10px;
					font-weight: bold;

					html[dir='rtl'] &
					{
						.margin-left-right(5px, 10px);
					}
				}

				h3
				{
					float: left;
					font-size: 11pt;
					margin: 0 0 0 10px;

					html[dir='rtl'] &
					{
						float: right;
						.margin-left-right(0px, 10px);
					}
				}

				span.divider
				{
					display: inline-block;
					height: 60px;
					width: 20px;
					background-image: url('/img/community/v2/arrow.png');
					float: left;

					html[dir='rtl'] &
					{
						float: right;
						background-image: url('/img/community/v2/arrow-rtl.png');
					}
				}

				select
				{
					width: 170px;
				}
			}

			div.chzn-single
			{
				border-color: #ccc;
				background-color: #FFFFFF;

				span
				{
					font: 10pt @text-font;
					margin-top: 2px;
					color: @text-color;
				}

				abbr
				{
					top: 4px;
					right: 22px;
				}
			}
		}

		div.progress-bar-container
		{
			display: none;
			color: #FFF;
			padding: 10px;

			div#progress-bar
			{
				text-align: center;
				width: 300px;
				margin: 10px auto 0 auto;

				&.ui-progressbar
				{
					height: 8px;

					.ui-progressbar-value
					{
						background-image: url('/img/community/v2/progressbar.gif');
						background-repeat: repeat-x;
					}
				}
			}

			div.failed-text, div.progress-text, div.redirect-text
			{
				font-size: 1.2em;
				text-align: center;
			}

			div.failed-text, div.redirect-text
			{
				display: none;
			}
		}
	}
}

div#invite-dialog
{
	display: none;

	input
	{
		display: block;
		margin: 10px 0;
		width: 100%;
		box-sizing: border-box;
		padding: 3px;

		&:last-child
		{
			margin-bottom: 20px;
		}
	}
}

div#home-tags
{
	text-align: center;
	padding-bottom: 20px;

	.v4 &
	{
		background: url(/img/business/bg_map.png);
	}

	div#atlas-topics, div#atlas-countries, div#sources, div.home-tags
	{
		display: inline-block;
		width: 300px;
		text-align: center;

		h3
		{
			margin-bottom: 5px;

			a
			{
				color: #009900;
				font: bold 12pt @title-font;
				text-decoration: none;
			}
		}

		ul
		{
			padding: 0;
			margin: 0;
			list-style: none;
		}

		a
		{
			color: #646464;
			text-decoration: none;
			font: 10.5pt @title-font;

			&:hover
			{
				text-decoration: underline;
			}
		}
	}
}

div.partner-block
{
	padding: 20px 0;
	background: #f9f9f9;
	overflow: hidden;

	div
	{
		width: 910px;
		margin: auto;
	}

	span.partner-logo
	{
		display: inline-block;
		width: 85px;
		height: 83px;
		float: left;
		.margin-left-right(0, 50px);
		.hires('/img/v4/home_globe');

		html[dir=rtl] &
		{
			float: right;
			.margin-left-right(50px, 0);
		}
	}

	h3
	{
		font: bold 1.2em;
		margin: 0;
	}

	h3,
	p
	{
		font-family: @title-font;
		width: 580px;

		html[dir=rtl] &
		{
			float: right;
			text-align: right;
		}
	}

	a
	{
		display: inline-block;
		float: right;
		width: 150px;
		text-align: center;
		text-decoration: none;
		font-weight: bold;
		font-size: 1.1em;
		color: white;
		background-color: #5da90b;
		border-radius: 3px;
		padding: 10px 0;
		margin: 15px auto 40px auto;

		html[dir=rtl] &
		{
			float: left;
		}
	}
}

#home-content
{
	h1
	{
		font: bold 2em @title-font;
		margin: 0;
		text-align: center;
	}

	h2
	{
		font: 1em @title-font;
		color: #777;
		margin: 0;
		text-align: center;
	}
}

div#site-holder 
{
	&.v4
	{
		.blog
		{
			background-color: #f9f9f9;

			.wrapper
			{
				width: 910px;
				margin: auto;
				padding: 10px 15px 30px 15px;

				h3
				{
					color: #646464;
					font: 16pt @title-font;
					margin-bottom: 15px;
				}

				div.column
				{
					display: inline-block;
					vertical-align: top;
					width: 430px;
					color: black;
					font: 10pt @text-font;

					.margin-left-right(0, 18px);

					html[dir='rtl'] &
					{
						.margin-left-right(18px, 0);
					}

					h2
					{
						color: @accent-color;
						font: bold 12pt @title-font;
						border-bottom: 2px solid #cce4f4;
						padding-bottom: 5px;
					}

					a
					{
						color: @accent-color;
						text-decoration: none;

						&:hover
						{
							text-decoration: underline;
						}
					}
				}
			}
		}
	}
}

a.ui-button, button.ui-button, div.ui-button, input.ui-button, span.ui-button, .ui-button.ui-state-default
{
	text-transform: uppercase;
}