/*
 * @namespace gallery
 * @extends media/_constructor.scss
 * @author Jason Duvenage
 */

article {
	section.media.gallery {
		width: 100%;
		overflow: hidden;

		.controls {
			display: none;
		}

		.gallery-container {
			position: relative;
			width: 100%;

			ul {
				margin: 0;
				padding: 0;

				li {
					width: 100%;
					height: 100%;
					position: relative;
					display: block;

					dl.hotspots {
						margin: 0;

						&.hidden {
							display: none;
						}

						dt.hotspot {
							position: absolute;
							left: 0;
							top: 0;

							.toggle-info {
								@include type($baskerville, 1.5, 2.5, white, 700, italic);
								text-align: center;
								@include width(2.5);
								@include height(2.5);
								border: none;
								border-radius: 50%;
								position: absolute;
								background: #3f3f3f;
								margin: 0;
								padding: 0;
							}
						}
					}
				}
			}
		}
	}
}

@include media($portrait-large) {
	article {
		section.media.gallery {
			.gallery-container {
				height: 100%;
				left: 0;

				&.animated {
					transition: left 1000ms;
				}

				ul {
					height: 100%;
					white-space: nowrap;

					li {
						height: 100%;
						display: inline-block;
						@include margin-left(-0.4);

						&:first-child {
							margin-left: 0;
						}

						&.active {
						}

						&.prev {
						}

						dl.hotspots {
							width: 100%;
							height: 100%;

							dt.hotspot {

								.toggle-info {
									@include type($baskerville, 2.7, 5, white, 700, italic);
									@include width(5);
									@include height(5);
								}

								&.active {
									.toggle-info {
										color: #3f3f3f;
										background: white;
									}
								}
							}

							dd.info {
								display: none;
								text-align: left;
								white-space: normal;
								@include width(35);
								@include height(20);
								@include padding(2.5, 2.5, 2.5, 2.5);
								@include margin(-21.5, 0, 0, -15.5);
								position: absolute;
								left: 0;
								z-index: 2;
								background: white;

								&:before {
									content: ' ';
									height: 0;
									position: absolute;
									width: 0;
									border-left: 10px solid transparent;
									border-right: 10px solid transparent;
									border-top: 10px solid #fff;
									top: 100%;
									left: 50%;
									margin-left: -5px;
									z-index: 2;
								}

								&.active {
									display: block;
								}

								h3 {
									@include type($type-default-sans-serif, 1.6, 2.5, $type-color, 700);
									margin: 0;
									@include padding-bottom(1);
								}

								p {
									@include type($type-default-sans-serif, 1.4, 2.5, $type-color, 300);
									margin: 0;
									padding: 0;
								}
							}
						}
					}
				}
			}
		}
	}
}

@include media($landscape-small) {
	article {
		section.media.gallery {
			height: 100%;

			.controls {
				display: block;
				position: absolute;
				z-index: 1;

				button {

				}
			}

			.gallery-container {
				ul {
					li {
						dl.hotspots {
							dt.hotspot {
								.toggle-info {
								}
							}
						}
					}
				}
			}
		}
	}
}

@include media($landscape-large) {
	article {
		section.media.gallery {
		}
	}
}