@import url("light/defines.less");
@import url("light/utility.less");
@import url("light/zoom.less");
@import url("../lib/flat-ttrss/flat_combined_dark.css");

@color-accent: #b87d2c;

@color-accent-marked: @color-accent;

@color-accent-published: desaturate(@color-published, 40%);

@color-panel-bg : #222;

@default-text: #ccc;

@default-fg: @default-text;

@border-default: #222;

@default-bg : #333;

@color-icon: #999;

@border-light : #666;

@fg-text-muted: darken(@default-text, 20%);

@fg-light : lighten(@default-text, 10%);

@color-alert-info : #3a87ad;

@color-alert-danger : #b94a48;

@color-tooltip-bg : lighten(@color-accent, 10%);

body.flat.ttrss_main.ttrss_prefs {
	#main, #footer {
		background: @color-panel-bg;
	}

	#footer a {
		color : #fff;
	}

	td.filename,
	div.prefHelp {
		color : @fg-text-muted;
	}

	hr {
		border-color : @border-light;
	}
}

body.flat.ttrss_main {
	img[src*='indicator_white.gif'] {
		filter : invert(1);
	}

	a:hover {
		color : lighten(@color-link, 20%);
	}

	#main, #overlay {
		color : @default-text;
		background: @default-bg;
	}

	#toolbar-frame #toolbar {
		background : @color-panel-bg;
		color : @fg-light;
	}

	#feeds-holder {
		background : @color-panel-bg;
		box-shadow : inset -1px 0 2px -1px @border-light;

		#feedTree {
			.dijitTreeRow {

				.counterNode {
					&.aux, &.marked, &.published {
						background: @color-panel-bg;
						color: @default-text;
						border-color: @default-bg;
					}

					&.marked {
						border-color : @color-accent-marked;
					}

					&.published {
						border-color : @color-accent-published;
					}
				}

				.dijitTreeRowSelected {
					background : @default-bg;
					border-color : @default-bg transparent;
					color : @fg-light;
				}

				.dijitTreeRowSelected .dijitTreeLabel {
					text-shadow : none;
				}

				i.icon.icon-inbox {
					color : darken(@default-text, 20%);
				}

				.loadingNode {
					filter : invert(1);
				}
			}
		}
	}

	#headlines-frame {
		.hl:not(.active):not(.Selected):not(.Unread),
		.cdm.expandable:not(.active):not(.Selected):not(.Unread) {
			background : @default-bg;
		}

		.hl.Unread:not(.active):not(.Selected),
		.cdm.expandable.Unread:not(.active):not(.Selected) {
			background : @color-panel-bg;
		}

		/* .cdm.expanded {
			background: @default-bg;
		} */

		.hl.Unread .title,
		.cdm.Unread .title {
			color : @fg-light;
		}

		.hl.active,
		.hl.Selected,
		.cdm.expandable.Selected {
			> * {
				filter : invert(1);

				img {
					filter : invert(1);
				}
			}

			.dijitCheckBox {
				filter : invert(1);
			}
		}

		.hl.Selected.marked,
		.cdm.expandable.Selected.marked,
		.hl.active.marked {
			i.marked-pic {
				filter : invert(1);
			}
		}

		.hl.Selected.published,
		.cdm.expandable.Selected.published,
		.hl.active.published {
			i.pub-pic {
				filter : invert(1);
			}
		}

		.cdm.expanded.active .title,
		.cdm.expandable.active .title {
			color : @color-accent;
		}

		.cdm.expandable.active {
			background : @color-panel-bg ! important;
		}

		.hl, .cdm {
			color : @default-text;

			.title {
				color : @default-text;
			}

			.author {
				color : @fg-text-muted;
			}

			.updated, .content {
				color : @default-text;
			}

			.feed a {
				color : @fg-light;
			}
		}

		.cdm .footer {
			border-color : @color-panel-bg;
			color : @default-text;
		}

		.left {
			i.material-icons,
			.dijitCheckBox {
				opacity: 0.7;
			}
		}

	}

	.dijitToolbar {
		.dijitSelect {
			.dijitButtonContents, .dijitButtonNode {
				transition: background-color 0.3s linear;
			}
		}

		.dijitSelect:not(.dijitHover) {
			.dijitButtonContents, .dijitButtonNode {
				background-color: @color-panel-bg;
			}
		}
	}

	.dijitSplitterHover {
		background-color: rgba(255, 255, 255, 0.25);
	}

	.dijitCheckBox:not(.dijitChecked):before {
		color : @fg-text-muted;
		background: @color-panel-bg;
	}

	.text-muted {
		color : @fg-text-muted;
	}

	.dijitAccordionInnerContainerSelected .dijitAccordionTitle {
		color : white;
	}

	.dijitDialog .dijitDialogPaneContent {
		background : @color-panel-bg;
	}

	.dijitTab:not(.dijitTabChecked) {
		background : @color-panel-bg;
	}

	.dijitTab.dijitTabChecked.dijitTabHover {
		color : @fg-light;
	}

	label.dijitButton {
		border: 1px solid @border-light;
	}

	label.dijitButton:hover {
		border-color : lighten(@border-default, 5%);
		background-color: @default-bg;
	}

	textarea {
		color : @fg-light;
	}

	code {
		color : #c90 ! important;
	}

	.panel {
		background-color : @color-panel-bg;
		border-color : @border-light;
	}

	.dijitDialog .panel {
		background-color : @default-bg;
	}

	#headlines-frame blockquote,
	#content-insert blockquote {
		color : @default-text;
		border-color : @color-accent;
	}

	pre {
		color : @default-text;
		background : @color-panel-bg ! important;
	}

	ul#filterDlg_Matches, ul#filterDlg_Actions {
		background: @color-panel-bg;
		border-color : @border-light;
	}

	.post .content,
	.cdm .content-inner {
		img, video {
			filter: saturate(0.9) brightness(0.8);
		}
	}

	.article-note {
		background : @color-accent;
		border-color : @color-accent;
		color : @default-bg;

		i.material-icons {
			color : @default-bg;
		}
	}

	::-webkit-scrollbar {
		width: 4px;
	}

	::-webkit-scrollbar-thumb {
		background-color: @border-light;
	}

	::-webkit-scrollbar-track {
		background-color: @color-panel-bg;
	}

	.alert {
		background: @color-panel-bg;
		border-color : darken(@color-accent, 20%);
		color : @color-accent;
	}

	.alert.alert-info {
		color : @color-alert-info;
		border-color: darken(@color-alert-info, 20%);
	}

	.alert.alert-danger {
		color : @color-alert-danger;
		border-color : darken(@color-alert-danger, 20%);
	}

	#filterNewRuleDlg {
		.dijitValidationTextAreaError {
			background : #503030;
		}
		.dijitValidationTextArea:not(.dijitValidationTextAreaError) {
			background : #305030;
		}
	}

	.dijitDialog {
		#feed_add_spinner {
			filter : invert(1);
		}
	}

}
