$as3cf_assets: #0769ad;

.as3cf-content,
.as3cf-updated,
.as3cf-compatibility-notice {
	box-sizing: border-box;
	max-width: 650px;
}

.settings_page_amazon-s3-and-cloudfront {
	.error,
	.notice,
	.updated {
		box-sizing: border-box;
		max-width: 650px;
	}
}

.as3cf-main.wrap {
	position: relative;

	& > h1 {
		float: left;
	}

	.as3cf-notice, .as3cf-updated, .as3cf-error {
		box-sizing: border-box;
	}

	.as3cf-error.fatal {
		clear: both;
	}

	h2.nav-tab-wrapper {
		float: none;
		margin-bottom: 15px;
		width: 650px;
		margin-top: 10px;
		padding: 9px 0 0 5px;

		.nav-tab-container {
			float: right;

			:last-child {
				margin-right: 5px;
			}
		}

		a.nav-tab-active {
			color: #464646;
			cursor: default;
		}

		a:focus {
			box-shadow: none;
		}
	}

	.more-info {
		white-space: nowrap;
	}

	.error {
		pre {
			background: #eaeaea;
			background: rgba(0, 0, 0, 0.07);
			display: block;
			padding: 10px 15px;

			code {
				padding: 0;
				background: none;
			}
		}
	}

	&[data-tab="support"] {
		.as3cf-notice, .error, .updated, .updated.show {
			display: none;
		}
		.fatal .error, .as3cf-notice.important, .dbrains-api-down {
			display: block;
		}
	}
	.as3cf-notice, .error, .updated {
		max-width: 650px;
		margin-top: 15px;
		box-sizing: border-box;
	}

	.as3cf-updated {
		display: none;
		&.as3cf-notice, &.show {
			display: block;
		}
	}

	.alignleft {
		margin-right: 20px;
		margin-bottom: 20px;
	}

	.spinner {
		min-width: 20px;
	}
}

/**
 * Show Storage Provider / Bucket Select / media Settings
 */
.as3cf-tab {
	.as3cf-main-settings {
		.as3cf-provider-select {
			display: none;
		}

		.as3cf-bucket-container {
			display: none;

			a.as3cf-change-provider {
				display: none;
			}
		}

		.as3cf-media-settings {
			display: none;
		}
	}

	&.as3cf-needs-access-keys, &.as3cf-has-access-keys.as3cf-change-provider {
		.as3cf-can-write-error {
			display: none;
		}

		.as3cf-main-settings {
			.as3cf-provider-select {
				display: block;
			}

			.as3cf-bucket-container {
				display: none;
			}

			.as3cf-media-settings {
				display: none;
			}
		}
	}

	&.as3cf-has-access-keys.as3cf-needs-bucket:not(.as3cf-change-provider), &.as3cf-has-access-keys.as3cf-change-bucket:not(.as3cf-change-provider) {
		.as3cf-can-write-error {
			display: none;
		}

		.as3cf-main-settings {
			.as3cf-provider-select {
				display: none;
			}

			.as3cf-bucket-container {
				display: block;
			}

			.as3cf-media-settings {
				display: none;
			}
		}
	}

	&.as3cf-has-access-keys.as3cf-has-bucket:not(.as3cf-change-provider):not(.as3cf-change-bucket) {
		.as3cf-main-settings {
			.as3cf-provider-select {
				display: none;
			}

			.as3cf-bucket-container {
				display: none;
			}

			.as3cf-media-settings {
				display: block;
			}
		}
	}
}

.as3cf-content {
	> section {
		margin-bottom: 20px;
	}

	> section + section.as3cf-access-keys {
		padding-top: 20px;
		border-top: 1px solid #d3d3d3;

		.as3cf-section-heading {
			margin-top: 0;
		}
	}
}

/**
 * Settings
 */
.as3cf-tab {
	display: none;
	position: relative;
	width: 650px;

	.as3cf-main-settings {
		p {
			font-size: 13px;
			a {
				color: #444;
			}
		}
	}

	.object-prefix-desc {
		em {
			white-space: nowrap;
		}
	}

	.as3cf-url-preview-wrap {
		background: #fff;
		text-align: center;
		padding: 20px 0 0;
		max-width: 650px;
		width: 100%;
		box-sizing: border-box;

		.as3cf-url-preview {
			margin-top: 10px;
			padding: 0 20px 10px;
			overflow-x: scroll;
		}
		span {
			color: #aaa;
			text-transform: uppercase;
			font-weight: bold;
		}
	}

	.as3cf-radio-group {
		label {
			display: block;
			margin-bottom: 10px;
			&.disabled, &.disabled p {
				color: #bbb;
				cursor: default;
			}
		}

		p {
			padding-left: 25px;
			color: #6b6b6b;
			margin: 0;
			font-size: 12px;
			&.as3cf-setting {
				margin-top: 5px;
			}
		}
	}

	.as3cf-switch {
		position: relative;
		display: inline-block;
		padding: 2px;
		overflow: hidden;
		border-radius: 2px;
		background-color: #d4d3d3;
		cursor: pointer;

		&.on {
			background-color: #ade7b5;
		}

		span {
			visibility: hidden;
			box-sizing: border-box;
			float: left;
			display: inline-block;
			height: 100%;
			font-size: 12px;
			line-height: 20px;
			border-radius: 2px;
			font-weight: bold;
			padding: 4px 8px;
			background: #fff;
			color: #8d8d8d;
			z-index: 1;

			&.on {
				color: #82d78b;
			}

			&.checked {
				visibility: visible;
			}
		}

		&.disabled {
			cursor: default;
			background: #e6e6e6;

			span {
				background: #f1f1f1;
				color: #d6d6d6;
			}
		}

		input[type="checkbox"] {
			position: absolute !important;
			top: 0;
			left: 0;
			opacity: 0;
			filter: alpha(opacity=0);
			z-index: -1;
		}
	}

	.as3cf-setting {
		&.hide {
			display: none;
		}
	}

	div.as3cf-setting {
		margin-top: 4px;
	}

	h3 {
		font-weight: normal;
		text-transform: uppercase;
	}

	.form-table {
		margin: 0;

		tr {
			&.as3cf-border-bottom td {
				border-bottom: 1px solid #ddd;
				padding: 20px 0px;
			}
			&.as3cf-setting-title td {
				padding-bottom: 0;
			}
			&.as3cf-setting-title:first-child td {
				padding-top: 20px;
			}
			&.configure-url:first-child td {
				padding-top: 5px;
				padding-bottom: 0;
			}
			td {
				padding: 15px 0;
				&:first-child {
					vertical-align: top;
					min-width: 120px;
					padding-top: 20px;
				}

				.as3cf-notice:last-child {
					margin-bottom: 0;
				}

				& > p:first-child {
					margin-top: 0;
				}
			}
		}

		h3 {
			padding: 0;
			margin: 0;
		}
		h4 {
			margin: 0;
		}
	}

	.as3cf-active-region {
		font-style: italic;
	}

	.as3cf-view-bucket {
		color: #444;
		text-decoration: none;
		margin-right: 10px;
		&:hover, &:active {
			color: #00a0d2;
		}
		&:focus {
			box-shadow: none;
		}
		.dashicons-external {
			margin-top: -2px;
		}
	}

	.tooltip {
		position: relative;
		z-index: 2;
		cursor: pointer;
	}

	/* Hide the tooltip content by default */
	.tooltip:before,
	.tooltip:after {
		visibility: hidden;
		-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
		filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
		opacity: 0;
		pointer-events: none;
	}

	/* Position tooltip above the element */
	.tooltip:before {
		position: absolute;
		bottom: 150%;
		left: 50%;
		margin-bottom: 5px;
		margin-left: -250px;
		padding: 10px;
		width: 500px;
		border-radius: 3px;
		background-color: #000;
		background-color: hsla(0, 0%, 20%, 0.9);
		color: #fff;
		content: attr(data-tooltip);
		text-align: center;
		font-size: 14px;
		line-height: 1.3;
	}

	/* Triangle hack to make tooltip look like a speech bubble */
	.tooltip:after {
		position: absolute;
		bottom: 150%;
		left: 50%;
		margin-left: -5px;
		width: 0;
		border-top: 5px solid #000;
		border-top: 5px solid hsla(0, 0%, 20%, 0.9);
		border-right: 5px solid transparent;
		border-left: 5px solid transparent;
		content: " ";
		font-size: 0;
		line-height: 0;
	}

	/* Show tooltip content on hover */
	.tooltip:hover:before,
	.tooltip:hover:after {
		visibility: visible;
		-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
		filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
		opacity: 1;
	}

	.as3cf-defined-in-config {
		background: #ccc;
		color: #fff;
		padding: 2px 5px;
		margin: 0 0 5px 5px;
		float: right;
		white-space: nowrap;
	}

	.as3cf-defined-setting {
		color: #bbb;

		label {
			cursor: default;
		}

		p .more-info a {
			color: #bbb;
		}

		.as3cf-radio-group p {
			color: #bbb;
		}

		.as3cf-notice {
			display: none !important;
		}
	}

	p.actions {
		margin: 20px -30px -30px;
		padding: 20px 30px;
		border-top: none;
		overflow: hidden;

		.right {
			margin-left: 15px;

			&:last-of-type {
				margin-left: 0;
			}
		}

		button {
			min-width: 90px;
		}
	}
}

/**
 * Media tab
 */
#tab-media {
	display: block;

	.as3cf-provider-setting td {
		padding-top: 20px;
		padding-bottom: 5px;
	}

	.as3cf-bucket-setting td {
		padding: 5px 0;
	}
}

/**
 * Bucket select
 */
.as3cf-bucket-container {
	h3 {
		line-height: 1.3;
		text-transform: none;
	}

	a:focus {
		box-shadow: none;
		outline: none;
	}

	input[type=text] {
		box-sizing: border-box;
		width: 100%;
	}

	select {
		box-sizing: border-box;
		width: 50%;
	}

	.form-table {
		.as3cf-provider-setting {
			h4 {
				font-weight: inherit;
				margin: 0;
			}
		}
		.as3cf-bucket-list {
			margin: 5px 0 0 0;
		}
		td {
			padding: 5px 0;

			&:first-child {
				width: 100px;
				line-height: 30px;
				vertical-align: top;
			}
		}
	}

	.bucket-actions {
		margin: 15px 0;
		border-top: 1px solid #ccc;
		padding-top: 15px;
		overflow: hidden;

		button,
		.right {
			float: right;
			margin-right: 0;
		}

		span {
			display: inline-block;
			margin-right: 20px;
			line-height: 28px;
		}
	}

	.as3cf-bucket-list {
		padding: 15px;
		max-height: 200px;
		overflow-x: hidden;
		overflow-y: auto;
		background-color: #fff;
		font-size: 14px;

		li:last-of-type {
			margin-bottom: 0;
		}

		a {
			color: #444;
			text-decoration: none;

			&:hover {
				color: #0074a2;
			}

			&.selected {
				font-weight: bold;
				color: #0074a2;
			}

			.dashicons {
				margin-right: 5px;
			}
		}
	}
}

#tab-media {
	display: block;
}

#tab-support {
	min-height: 900px;
	.as3cf-sidebar {
		top: 11px;
	}

	.support-section {
		border-bottom: 1px solid #ccc;
		padding-bottom: 20px;
		margin-bottom: 20px;

		h3 {
			font-size: 20px;
		}
	}

	.debug {
		textarea {
			width: 100%;
			min-height: 200px;
			font-family: Consolas, Monaco, monospace;
			margin-bottom: 5px;
		}
	}
}

/**
 * Sidebar
 */
.as3cf-sidebar {
	position: absolute;
	top: 9px;
	left: 670px;
	width: 292px;

	.block {
		padding: 20px;
		border: 1px solid #ccc;
	}

	.subscribe {
		border-top: none;

		h2 {
			padding: 0;
			margin: 0;
			margin-bottom: 0.5em;
			color: #666;
			font-size: 20px;
			line-height: 1.2em;
			float: none;
		}

		h3 {
			font-size: 16px;
			margin: 0;
		}

		p {
			margin: 0;
		}

		.intro {
			margin-bottom: 1em;
			line-height: 1.4;
		}

		li {
			line-height: 1.4;
		}

		.links {
			margin-bottom: 2em;

			a {
				text-decoration: none;
			}
		}

		.promise {
			color: #999;
			font-size: 12px;
			line-height: 1.4em;
		}

		.field {
			margin-bottom: 0.5em;

			p {
				margin-bottom: 0.3em;
			}

			input[type=text], input[type=email] {
				width: 100%;
			}

			&.submit-button {
				margin-bottom: 1em;
			}
		}
	}

	.credits {
		border-top: 0;

		h4 {
			font-size: 16px;
			margin-top: 0;
			margin-bottom: 10px;
		}

		ul {
			margin: 0;
		}

		li {
			overflow: hidden;
		}

		li:last-child {
			margin-bottom: 0;
		}

		img {
			float: left;
			margin-right: 10px;
		}

		span {
			float: left;
			display: block;
			line-height: 32px;
		}

		a {
			display: block;
			text-decoration: none;
			color: #444;
			font-size: 16px;
			text-align: center;

			&:hover {
				color: #888;
			}
		}
	}

	@media screen and (max-width: 1052px) {
		position: relative;
		top: auto;
		right: auto;
	}
}

/**
 * Misc
 */
.as3cf-active-provider, .as3cf-active-bucket {
	font-weight: bold;
	margin-right: 10px;
}

.as3cf-banner {
	margin-top: 35px;
	width: 292px;
	height: 200px;
	display: block;
	background: #f8cfae url(../img/os3-banner.svg) left bottom / 220px 220px no-repeat;
}

.as3cf-banner:focus {
	box-shadow: none;
}

.wrap .as3cf-upgrade-details {
	background-color: #4e0d33;
	padding: 10px 20px 20px 20px;
	color: #eee;
	font-size: 13px;
	margin: 0;
	display: block;
	text-decoration: none;

	h1 {
		font-size: 28px;
		color: #eee;
		margin: 0 0 15px 0;
		padding: 0;
		text-decoration: none;
		font-weight: 200;
		line-height: 1;
	}

	p {
		margin: 0;
	}

	a {
		color: #eee;
		font-weight: bold;
		text-decoration: none;
		font-size: 16px;
		box-shadow: none;

		&:hover {
			color: #fff;
		}
	}

	ul {
		margin-top: 0;
		margin-left: 16px;
		list-style-type: disc;
	}
}

.as3cf-compatibility-notice.error {
	clear: both;
	margin: 5px 20px 5px 0;
}

.as3cf-bucket-error {
	span.title {
		font-weight: bold;
	}
}

.as3cf-invalid-bucket-name,
.as3cf-validation-error {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #a00;
}

.as3cf-notice-toggle-content {
	max-height: 100px;
	overflow-y: scroll;

	.as3cf-notice-toggle-list {
		margin-top: 0;
		margin-left: 0;
		padding-left: 40px;
		color: #dc3232;
	}
}

.as3cf-need-help {
	background-color: white;
	font-size: 16px;
	font-weight: bold;
	padding: 1em;

	a {
		text-decoration: none;
	}
}

.as3cf-settings {
	h3 {
		font-size: 20px;
	}

	p {
		font-size: 14px;
	}
}

.as3cf-addons,
.as3cf-tab .as3cf-compatibility-notice {
	max-width: cover;
}

textarea.as3cf-access-key-constants-snippet.code {
	width: 100%;
	white-space: pre;
	overflow: hidden;
	font-size: 12px;
	padding: 10px;
	height: 53px;
}

/**
 * Addons Tab
 */
.as3cf-addons {
	.as3cf-addons-list {
		margin: 20px 0 200px;
		padding-top: 5px;
	}

	.as3cf-addon {
		display: flex;
		padding: 20px;
		font-size: 14px;

		&-info {
			min-height: 100px;
		}

		&-links {
			float: right;

			span {
				padding: 4px 6px;
			}
		}

		&-icon {
			float: left;
			margin-right: 20px;
		}

		&-details {
			white-space: nowrap;
		}

		&-title,
		&-description {
			font-weight: 100;
		}

		+ .as3cf-addon {
			margin-top: 20px;
		}

		&.amazon-s3-and-cloudfront-assets-pull {
			background-color: $as3cf_assets;
			color: white;

			.as3cf-addon-title,
			.as3cf-addon-description,
			a {
				color: white;
			}

			.extra {
				background: white;
				a {
					color: $as3cf_assets;
					text-decoration: none;
				}
			}
		}
	}
}
