@import "minerva.variables";
@import "minerva.mixins";

@borderBottomColor: #CACACA;

@titleSectionSpacingTop: 20px;
@titleSectionSpacingBottom: 25px;

// hide menu items when not possible to use
.client-nojs #ca-watch,
.client-nojs #ca-edit,
.client-nojs #ca-upload,
#ca-talk.selected {
	display: none;
}

.pre-content {
	padding: 12px @contentMargin 7px;
}

#section_0 {
	// FIXME: Use a gray defined in variables e.g. @grayMediumLight
	border-bottom: dotted 1px @colorGray12;
}

#page-actions {
	@verticalMargin: 8px;
	// FIXME: Use a gray defined in variables e.g. @grayMediumLight
	border-bottom: solid 1px @colorGray12;

	padding: @verticalMargin @contentMargin @verticalMargin @contentMargin - 8;

	li {
		// Needed for non-JavaScript users
		position: relative;
		cursor: pointer;
		// Override .hlist rule.
		margin-right: 0;

		// FIXME: use .cloaked class
		// file inputs are notoriously difficult to style
		input {
			opacity: 0;
		}

		input,
		a,
		span {
			// Needed for non-JavaScript users
			position: absolute;
			display: block;
			width: 100%;
			height: 100%;
			// needed for ContentOverlay pointer arrow
			margin: 0 0 @verticalMargin;
		}

		// FIXME: Remove when mw-ui-icon moved to stable
		&.icon {
			vertical-align: top;
			height: 30px;
			width: 40px;
			background-position: 50% 0;
			margin: 0 16px 0 0;
		}
	}
}

// On small devices that don't support Javascript, hide the page actions bar
@media all and (max-width: @wgMFDeviceWidthMobileSmall) {
	.client-nojs {
		#page-actions {
			display: none;
		}

		#section_0 {
			border: none;
		}
	}
}

#ca-upload {
	// FIXME: Remove when cache clears
	&.icon {
		.background-image('images/pagemenu/upload-locked.png');
	}

	input {
		display: none;
	}
	&.enabled {
		// FIXME: Remove when cache clears
		&.icon {
			.background-image('images/pagemenu/upload.png');
		}
		input {
			display: block;
		}
		// webkit-file-upload-button for pointer cursor in chrome.
		input, ::-webkit-file-upload-button {
			cursor: pointer;
		}
	}
}
