/*
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600);
*/

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: normal;
  src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url('assets/SourceSansPro-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: bold;
  src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'), url('assets/SourceSansPro-Semibold.woff') format('woff');
}

/*
@font-face {
	font-family: 'Iosevka';
	src: url('assets/iosevka-regular.woff2') format('woff2'), url('assets/iosevka-regular.woff') format('woff');
}

@font-face {
	font-family: 'Iosevka';
	src: url('assets/iosevka-slab-light.woff2') format('woff2'), url('assets/iosevka-slab-light.woff') format('woff');
}
*/

@font-face {
	font-family: 'Iosevka';
	src: url('assets/iosevka-light.woff2') format('woff2'), url('assets/iosevka-light.woff') format('woff');
}


html, body {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
}

body {
	overflow: hidden;
	background-color: #fff;
	font: 15px/1.4 'Source Sans Pro', Helvetica, sans-serif;
	color: #444;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	cursor: default;
}

.selectable,.selectable * {
	user-select: default;
	-webkit-user-select: text;
	-moz-user-select: text;
	cursor: text;
}


/* --- Themed elements -------------- */

.page-header,
.dialog-btn {
	background-color: #1385b7;
}

.colored-text {
	color: #0774a5;
}

.dot-underline {
	border-bottom: 1px dotted #0774a5;
}

.nav-btn * {
	fill: #1385b7;
}

.dialog-btn:hover,
.header-btn:hover,
.dialog-btn.default-btn,
.dialog-btn.selected-btn {
	background-color: #0F5A84;
}

.colored-text::selection {
	background-color: #e6f7ff;
}

.colored-text::-moz-selection {
	background-color: #e6f7ff;
}

.layer-item.active {
	background-color: #e6f7ff;
}

/* THEME 2  */

.theme2 .page-header,
.theme2 .dialog-btn {
	background-color: #678691;
}

.theme2 .colored-text {
	color: #678691;
}

.theme2 .dot-underline {
	border-bottom: 1px dotted #678691;
}

.theme2 .nav-btn * {
	fill: #678691;
}

.theme2 .dialog-btn:hover,
.theme2 .header-btn:hover {
	background-color: #365A68;
}

.theme2 .colored-text::selection {
	background-color: #DEF1F9;
}

.theme2 .colored-text::-moz-selection {
	background-color: #DEF1F9;
}

.theme2 .layer-item.active {
	background-color: #DEF1F9;
}

/* THEME 3 -- GREY */

.theme3 .page-header,
.theme3 .dialog-btn {
	background-color: #376E7F;
}

.theme3 .nav-btn * {
	fill: #376E7F;
}

.theme3 .nav-btn.selected {
	background-color: black;
}

.theme3 .dialog-btn:hover,
.theme3 .header-btn:hover {
	background-color: #1D5760;
}

/* --- Page header --------------- */

.page-header {
	position: absolute;
	color: white;
	top: 0;
	left: 0;
	z-index: 40;
	width: 100%;
	height: 34px;
}

.coordinate-info {
	z-index: 1;
	position: absolute;
	bottom: 6px;
	left: 6px;
	padding: 2px 5px 2px 5px;
	font-size: 11px;
	pointer-events: none;
}

.mapshaper-logo {
	font-weight: bold;
	font-size: 18px;
	margin: 3px 0 0 12px;
}

.mapshaper-logo .logo-highlight {
	color: #ffa;
}

.page-header a {
	text-decoration: none;
}

.page-header-buttons {
	z-index: 20;
	position: absolute;
	top: 0px;
	right: 0px;
	display: none;
	margin: 0 8px 3px 0;	
}

.separator {
	border-left: 1px solid white;
	height: 10px;
	margin: 0 2px 0 2px;
}

/* --- Selection tool dialog --------- */

.selection-tool-options {
	pointer-events: none;
}

.selection-tool-options .info-box {
	pointer-events: initial;
}

/* --- Box tool dialog --------- */
.box-tool-options {
	pointer-events: none;
}

.box-tool-options .btn {
	pointer-events: initial;
}

.box-tool-options .info-box {
	text-align: center;
}

.box-tool-options .box-coords {
	pointer-events: initial;
}

/* --- Export dialog --------- */

.export-options .dialog-btn {
	min-width: 20px;
	padding: 4px 6px 5px 6px;
}

.export-layer-list {
	max-height: 160px;
	overflow: hidden;
	overflow-y: auto;
	margin-right: -13px;
}

.export-layer-list > div {
	white-space: nowrap;
}

.export-options .option-menu .advanced-options {
	width: 175px;
}

/* --- Main area ------------- */

.main-area {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin: 34px 0 0 0;
}


/* --- Error message ---------- */

.error-wrapper {
	z-index: 120;
	text-align: center;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

div.error-box {
	margin-top: 55px;
	overflow: auto;
	max-height: 70%;
	max-width: 400px;
	font-size: 16px;
}

div.error-box > div {

}

/* --- Splash screen -------------- */

.splash-screen #splash-screen {
	display: block;
}

.splash-screen #splash-buttons {
	display: block;
}

.queued-files.splash-screen #import-options-drop-area {
	display: block;
	z-index: 2;
}

#import-options-drop-area .drop-area {
	height: 100%;
}

#splash-screen {
	z-index: 1;
	text-align: center;
	font-size: 15px;
	display: none;
}

#splash-screen, #import-options-drop-area {
	background-color: #def1f9;
}

#splash-screen .subtitle {
	color: #777;
}

.splash-screen #import-options .info-box {
	margin-top: 40px;
}

.queued-files #import-options {
	display: block;
}

#splash-screen *,
#import-options-drop-area * {
	box-sizing: border-box;
}

.drop-area {
	border: 2px dashed #a2a2a2;
	border-radius: 19px;
	background-color: #f8fdff;
	overflow: hidden;
}

#splash-screen .drop-area.dragover,
body.dragover #import-options-drop-area .drop-area {
	border-color: #333;
}

#drop-areas {
	margin-top: 30px;
}

.drop-area-wrapper {
	padding: 16px 16px 15px 16px;
}

.catalog-mode #import-drop,
.catalog-mode #import-quick-drop,
.catalog-mode .file-catalog {
	height: 32%;
}

#import-drop {
	height: 61.6%;
}

#import-quick-drop {
	height: 37%;
}

.queued-files #splash-screen {
	display: none;
}

/* between the two drop areas */
#splash-screen .spacer {
	height: 1.6%;
}

#splash-screen h3 {
	margin: 11px 0 0 0;
	color: #333;
	font-size: 18px;
}

#splash-screen h4 {
	color: #333;
	font-size: 17px;
	margin: 11px 0 0 0;
}

#file-selection-btn.inline-btn {
	padding: 2px 4px 3px 3px;
}

/* --- File catalog --------------- */

.catalog-mode .file-catalog,
.catalog-mode .file-catalog-spacer {
	display: block;
}

.catalog-area {
	overflow: hidden;
	border: 1.5px solid #aaa;
	border-radius: 19px;
	background-color: #f8fdff;
}

.file-catalog table {
	margin: 0;
	border-collapse: collapse;
	height: 100%;
	width: 100%;
}

.file-catalog th {
	vertical-align: top;
	height: 40px;
}

.file-catalog,
.file-catalog-spacer {
	display: none;
}

.file-catalog td {
	margin: 0;
	cursor: pointer;
	vertical-align: top;
}

.file-catalog td:hover {
	background-color: #e2e2e2;
}

.file-catalog.downloading td.downloading {
	background-color: #d5d5d5;
	background-size: 0% 100%;
	background-repeat: no-repeat;
	background-position: top left;
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAMAAABFaP0WAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFt7e3AAAAgOo4JQAAAA5JREFUeNpiYAABgAADAAAGAAHgQhFOAAAAAElFTkSuQmCC);
}

/* --- Import screen -------------- */


.option-menu .advanced-options {
	width: 250px;
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid #999;
	padding: 0 3px;
	height: 17px;
	font-size: 12px;
}

#mshp-not-supported {
	display: none;
	z-index: 100;
	text-align: center;
}

.dropped-file-list {
	margin-bottom: 8px;
	max-height: 300px;
	overflow-y: auto;
}

.dropped-file-list p {
	line-height: 1;
	margin-bottom: 5px;
	font-size: 15px;
	font-weight: bold;
}

.popup-dialog {
	display: none;
	z-index: 80;	
	text-align: center;
}

.info-box {
	word-wrap: break-word;
	text-align: left;
	margin-top: 12px;
	background-color: #fff;
	padding: 11px 15px 9px 15px;
	vertical-align: top;
	display: inline-block;
	border: 1px solid #aaa;
	border-radius: 9px;
}

.info-box h3 {
	font-size: 1.2em;
	padding: 0;
	margin: 0 0 0.2em 0;
}

.info-box h4 {
	font-size: 1em;
	margin: 0 0 1px 0;
}

.info-box p {
	white-space: pre-line;
	margin: 0 0 7px 0;
}

.option-menu {
	padding: 0 0 7px 0;
}

.option-menu input {
	width: 12px;
	height: 12px;
}

.option-menu .tip-button {
	margin-left: 12px;
	margin-top: 3px;
}

.option-menu input.checkbox {
	margin: 3px 5px 0 0;
}

.option-menu input.radio {
	margin: 0 5px 0 0;
}

/* --- Progress bar --------------- */

.progress-message {
	position: absolute;
	width: 100%;
	z-index: 90;
	text-align: center;
	top: 52px;
}

.progress-message > div {
	display: inline-block;
	text-transform: uppercase;
	padding: 3px 6px;
	font-size: 15px;
	color: black;
	background-color: rgba(255, 255, 222, 0.85);
	border: 1px solid #333;
}

/* === Editing interface ========== */

#mshp-main-page {
	position: relative;
	height: 100%;
	width: 100%;
}


/* --- Console control ------------ */

.console-area {
	right: auto;
	width: 495px;
	max-width: 100%;
	font-size: 12px;
}

body.console-open .map-area {
	left: 495px;
}

/* responsive sizing, should be 78-80 chars per line */
@media screen and (max-width: 525px) {
	body.console-open .map-area {
		display: none;
	}
}

@media screen and (min-width: 1200px) {
	body.console-open .map-area {
		left: 535px;
	}

	.console-area {
		width: 535px;
		font-size: 13px;
	}
}

@media screen and (min-width: 1400px) {
	body.console-open .map-area {
		left: 575px;
	}

	.console-area {
		width: 575px;
		font-size: 14px;
	}
}


.console {
	z-index: 30;
	pointer-events: none;
	display: none;
}

.console-window {
	pointer-events: auto;
	background-color: black;
	position: absolute;
	text-align: center;
	overflow: auto;
	width: 100%;
	height: 100%;
}

.console-buffer {
	cursor: text;
	width: 100%;
	position: relative;
	color: white;
	font-family: Iosevka, monospace;
	line-height: 1.35;
	margin: 8px 0 20px 0;
	word-break: break-all;
	word-wrap: break-word;
	white-space: pre-wrap;
	 /* Removing this workaround: non-standard behavior fixed in recent Chrome
	white-space: pre; */
}

.console-buffer > div {
	text-align: left;
	/* max-width: 640px; */
	margin: 0 auto;
	padding: 0 10px 0 14px;
}

.console-error {
	color: #f93b00;
}

.console-message {
	color: #eddd98;
}

.console-example {
	color: #b9dffc;
}

.input-field {
	outline: none;
	min-width: 100px;
}

/* --- Layer menu ----------- */

.layer-control-btn {
	top: 0;
	position: absolute;
	text-align: center;
	z-index: 10;
	width: 100%;
}

body.simplify .layer-control-btn {
	display: none;
}

.layer-control .info-box {
	padding: 0;
	pointer-events: none;
	background-color: transparent;
}

.layer-control div.info-box-scrolled {
	position: relative;
	z-index: -1;
	background-color: white;
	max-height: 500px;
	overflow: hidden;
	overflow-y: auto;
	padding: 9px 14px 6px 14px;
	pointer-events: auto;
	border-radius: 9px;
}

.layer-control .info-box {
	/* (Chrome fix) raise layer menu above container to catch events */ 
	position: relative;
	z-index: 90;
}

.layer-menu .layer-list {
	margin: 6px 0 6px 0;
}

.layer-menu .layer-item {
	position: relative;
	margin-left: -14px;
	margin-right: 6px;
	padding: 8px 14px;
	cursor: pointer;
	width: 100%;
}

.pin-all img,
.layer-item img {
	position: absolute;
	width: 16px;
	height: 16px;
	padding: 2px;
	right: 6px;
}

img.close-btn {
	opacity: 0.2;
}

.pin-all img {
	top: 11px;
	cursor: pointer;
}


.layer-item img.pin-btn {
	top: 7px;
}

.layer-item img.close-btn {
	top: 29px;
	/* bottom: 8px; */
}

/* hide close button when not hovering */
.layer-item:not(:hover) img.close-btn,
.layer-item.dragging img.close-btn {
	display: none;
}

img.pin-btn {
	opacity: 0;
}

.pinnable:not(.pinned) img.unpinned {
	opacity: 0.2;
}

.pinnable:not(.pinned) img.unpinned:hover {
	opacity: 0.3;
}

.pinnable.pinned.active img.pinned {
	/* display: none; */
	opacity: 0;
}

img.close-btn:hover,
.pinnable.pinned.active img.unpinned,
.pinnable.pinned:not(.active) img.pinned {
	opacity: 1
}

.pinnable img.unpinned {
	z-index: 1;
}

.layer-item .row {
	line-height: 18px;
	margin-bottom: 1px;
	white-space: nowrap;
}

.layer-item .layer-name {
	display: inline-block;
	min-height: 14px; /* For FF when content is empty */
	min-width: 2px;
	outline: none;
}

.layer-item .row.layer-problems {
	color: #f93b00;
}

.layer-item .layer-name.editing {
	border-bottom: 1px solid transparent;
}

.layer-item .layer-name::selection {
	background: black;
	color: white;
	text-decoration: none;
}

.layer-item .layer-name::-moz-selection {
	background: black;
	color: white;
	text-decoration: none;
}

.layer-item:hover:not(.active):not(.dragging) {
	background-color: #f7f7f7;
}

.layer-item .row > div {
	display: inline-block;
}

.layer-item .col1 {
	width: 84px;
}

.layer-item .row1 .col2 {
	margin-right: 19px; /* room for buttons */
}


.layer-item.drag-target:not(.active) {
	background-color: #f7f7f7;
}

.layer-item.drag-target * {
	/* opacity: 0.3; */
}

.layer-item.drag-target.active {
	/* background-color: #BDE2F4; */
}

.layer-item.insert-above:not(.drag-target) {
	border-top: 1px solid black;
}

.layer-item.insert-below:not(.drag-target) {
	border-bottom: 1px solid black;
}

/* --- Intersection control ----------*/

.intersection-display {
	cursor: default;
	visibility: visible;
	display: none;
	position: absolute;
	z-index: 20;
	top: 10px;
	left: 13px;
}

.intersection-count {
	vertical-align: middle;
}

.intersection-count .icon {
	background-color: #F24400;
	display: inline-block;
	width: 5px;
	height: 5px;
	margin: 0 5px 2px 0;
}

.intersection-count .close-btn {
	width: 16px;
	height: 16px;
	cursor: pointer;
	position: relative;
	top: 4px;
	margin-left: 2px;
}

.intersection-display .text-btn.disabled {
	visibility: hidden;
}

/* --- Popup -------------------- */

.popup {
	font-size: 13px;
	box-sizing: border-box;
	position: absolute;
	z-index: 40;
	top: 12px;
	left: 12px;
	background-color: white;
	border: 1px solid #999;
	border-radius: 9px;
	padding: 5px 0;
}

.popup div.popup-tab {
	position: absolute;
	pointer-events: none;
	right: -81px;
	width: 80px;
	top: 6px;
}

.popup-tab .popup-nav {
	display: inline-block;
	pointer-events: auto;
	background-color: rgba(234,234,234,0.85);
	padding: 3px 5px 3px 4px;
	white-space: nowrap;
}

.popup-nav .popup-nav-arrow {
	cursor: pointer;
	padding: 0 1px;
}

.popup > div.popup-content {
	box-sizing: border-box;
	overflow: hidden;
	overflow-y: auto;
	padding: 4px 12px;
	line-height: 1.2;
}

.popup table {
	border-spacing: 0px;
}

.popup table td {
	vertical-align: top;
	/* padding: 2px 0; */
	min-width: 80px;
	max-width: 180px;
	color: black;
	height: 17px; /* functions like min-height on <td> */
}

.popup td.field-name {
	color: #aaa;
	padding-right: 7px;
	font-weight: normal;
	min-width: 60px;
	max-width: 260px;
}

.popup .value {
	outline: none;
	word-wrap: break-word;
}

.popup .num-field {
	font-style: italic;
}

.popup .empty, .popup .null-value {
	min-width: 4px;
	display: inline-block;
	min-height: 13px;
}

.popup .null-value {
	color: #aaa;
}

.popup .note {
	font-style: italic;
	min-height: 16px;
}

.popup .editable-cell .value.editing {
	color: black;
	border-bottom: none;
}

.popup .editable-cell .value::selection {
	color: white;
	background: black;
}

.popup .editable-cell .value::-moz-selection {
	color: white;
	background: black;
}


/* --- Map ---------------------- */

.map-layers {
	z-index: 0;
	position: relative;
	height: 100%;
}

.mshp-main-map {
	background-color: #fff;
}

.map-layers.symbol-hit {
	cursor: pointer;
}

.map-layers canvas {
	pointer-events: none;
	position: absolute;
}

.map-layers canvas.retina {
	transform-origin: top left;
	-webkit-transform-origin: top left;
	transform: scale3D(0.5, 0.5, 1);
	-webkit-transform: scale3D(0.5, 0.5, 1);
}

.map-layers > svg {
	position: absolute;
}

.map-layers > svg text.selected {
	stroke: #FFC3FF;
	stroke-width: 4;
	paint-order: stroke;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.map-layers > svg.dragging,
.map-layers > svg text.selected {
	cursor: pointer;
}

/* ---  MAP BUTTONS --- */

.nav-buttons {
	z-index: 20;
	position: absolute;
	top: 6px;
	right: 9px;
	padding: 2px;
	background-color: rgba(255, 255, 255, 0.85);
}

.nav-btn-wrapper {
	position: relative;
}

.nav-sub-btn {
	position: absolute;
	display: none;
	cursor: pointer;
	top: 4px;
	padding: 4px;
	right: 20px;
	z-index: -2;
}

.nav-sub-btn svg * {
	fill: black !important;
}

.nav-sub-menu {
	position: absolute;
	/* top: 5px;
	right: 21px; */
	z-index: -1;
	display: none;
	pointer-events: none;
	padding-top: 4px;
	top: 24px;
	right: -6px;
}

.nav-btn.open .nav-sub-menu {
	display: block;
	pointer-events: inherit;
}


.nav-menu-item {
	background-color: #fff;
	color: #0774a5; /* .colored-text color */
	float: right;
	clear: right;
	white-space: nowrap;
	display: inline-block;
	padding: 2px 7px 4px 7px;
	line-height: 13px;
	cursor: pointer;
}

.nav-menu-item:hover,
.nav-btn:hover .nav-sub-menu:not(.active):not(:hover) .nav-menu-item[data-name=info] {
	font-weight: bold;
}

.nav-menu-item.selected {
	color: black;
	font-weight: bold;
}

/* bullets https://www.w3schools.com/charsets/ref_utf_geometric.asp */
.nav-sub-menu.active .nav-menu-item.selected:before {
	content: "\25B8  "
}

.nav-btn {
	position: relative;
	cursor:pointer;
	padding: 3px;
	margin-bottom: 1px;
	line-height: 1;
}

.nav-btn.selected {
	background-color: black;
	border-radius: 4px;
}
.nav-btn.hover:not(.disabled) svg * {
	fill: black;
}

.nav-btn.selected:not(.disabled) svg * {
	fill: white;
}

.nav-btn.disabled {
	opacity: 0.4;
	cursor: default;
}

.zoom-box {
	position: absolute;
	border: 1px solid #f74b80;
	z-index: 15;
	pointer-events: none;
}

.zoom-box.zooming {
	border-color: #0774a5;
}


/* Simplification control ------------ */

@media (max-width: 765px) {
	body.simplify  .simplify-control-wrapper {
		top: 22px;
	}

	body.simplify .page-header {
		height: 52px;
	}

	body.simplify .main-area {
		margin-top: 52px;
	}
}

.simplify-control-wrapper {
	display: none;
	position: absolute;
	width: 100%;
	overflow: hidden;
	margin: 0 auto 0 auto;
	top: 0px;
}

.simplify-control {
	text-align: center;
	white-space: nowrap;
	padding: 0 90px 0 12px;
}

.simplify-control .slider {
	margin: 15px 5px 0 3px;
	position: relative;
	vertical-align: top;
	display: inline-block;
}

.simplify-control .track {
	border-radius: 2px;
	width: 340px;
	background-color: #fff;
	height: 2px;
}

.simplify-control .handle {
	position: absolute;
	top: -3px;
}

.simplify-control .handle img {
	width: 20px;
	height: 20px;
	margin-left: -10px;
	margin-top: -10px;
}

.simplify-control .clicktext {
	width: 56px;
	background: rgba(255, 255, 255, 0.5);
	text-align: center;
	border: 1px solid rgba(0,0,0,0);
	font-size: 13px;
}

.simplify-control .clicktext:focus {
	background: #fff;
}
