/* = TABBED CONTAINERS */

.tabbed-page,
.tabbed-container {
	display: flex;
	flex-direction: column;
}

.tabbed-page .tablist,
.tabbed-container .tablist {
	position: relative;
	bottom: -2px;
	display: flex;
	flex-direction: row;
	flex-shrink: 0;
	overflow-x: auto;
	overflow-y: hidden;
}

.tabbed-page .tablist .tab,
.tabbed-container .tablist .tab,
.tabbed-container .tablist .faketab {
	cursor: pointer;
}

.tablist a,
.tablist a:link, .tablist a:visited {
	color: var(--main-text);
	text-decoration: none;
}

.tabbed-page .tablist .tab,
.tabbed-container .tablist .tab,
.tabbed-container .tablist .faketab {
	background-color: var(--tab-inactive);
	border: var(--tab-border);
	display: inline-block;
	padding: 8px;
	position: relative;
	margin: auto 2px 0px 2px;
	bottom: -2px;
	text-align: center;
	font-family: var(--primary-font);
}

.tabbed-container .tablist .tab *:not(.userlink) img,
.tabbed-container .tablist .faketab img {
	vertical-align: middle;
}

.tabbed-page .tablist .tab.selected,
.tabbed-container .tablist .tab.selected, 
.tabbed-container .tablist .faketab.selected {
	background: var(--tab-selected, #d3d3d3);
	background: -moz-linear-gradient(0deg, var(--tab-selected) 50%, var(--tab-gradient) 100%);
	background: -webkit-linear-gradient(0deg, var(--tab-selected) 50%, var(--tab-gradient) 100%);
	background: linear-gradient(0deg, var(--tab-selected) 50%, var(--tab-gradient) 100%);
	bottom: -2px;
	/*border-bottom: none;*/
}

.tabbed-page .box:not(table),
.tabbed-container .box:not(table),
.tabbed-container .dropdown {
	display: block;
}

.tabbed-page .box,
.tabbed-container .box,
.tabbed-container .dropdown {
	background-color: var(--tab-selected);
	border: var(--tab-border);
	padding: 4px;
	flex: auto;
}

/* JS should handle positions and shit */
.tabbed-container .dropdown {
	position: absolute;
	border-top: none;
}

.tabbed-container > .tablist > .tab > .tab-close {
	display: inline-block;
	width: 16px; height: 16px;
	margin-left: 4px;
	background-image: url('icons/close');
	background-size: 100%;
	cursor: pointer;
}

@media only screen and (orientation: landscape) {
	.tabbed-container.vertical {
		flex-direction: row;
	}

	.tabbed-container.vertical > .tablist {
		position: relative;
		right: -1px;
		bottom: 0px;
		display: flex;
		flex-direction: column;
		overflow-x: hidden;
		overflow-y: auto;
		flex-shrink: 0;
	}

	.tabbed-container.vertical > .tablist .tab,
	.tabbed-container.vertical > .tablist .faketab {
		margin: 2px 0px;
		right: -1px;
		bottom: 0px;
	}

	.tabbed-container.vertical > .tablist .tab.selected,
	.tabbed-container.vertical > .tablist .faketab.selected {
		background: var(--tab-selected, #d3d3d3);
		background: -moz-linear-gradient(-90deg, var(--tab-selected) 25%, var(--tab-gradient) 100%);
		background: -webkit-linear-gradient(-90deg, var(--tab-selected) 25%, var(--tab-gradient) 100%);
		background: linear-gradient(-90deg, var(--tab-selected) 25%, var(--tab-gradient) 100%);
		border: var(--tab-border);
	}
}