/*
 *
 */
html, body, form {
	margin: 0;
	padding: 0;
	font-family: arial;
}

p, div, span, h1, h2, h3, h4 {
	margin:  0;
	padding: 0;
}

.clear { clear: both; }
.left  { float: left; }
.right { float:right; }

a {
	color: #0099FF;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:active {
	color: #ff9932;
}

img {
	border: none;
}


/* general, page wide */

#c-main {
	margin-left: 48px;
	width: 55%;
}

body.single-column #c-main, body.single-column #sidebar  {
	width: 90%;
	margin: 0 auto;
	max-width: 900px;
}

#footerbar {
	margin-top: 24px;
	margin-bottom: 12px;
	margin-left: -12px;
}

#footerbar a {
	font-weight: bold;
}

#footerbar a.scroll-link {
	display: none;
}

.single-column #footerbar a.scroll-link {
	display: inline;
}

#c-main > .c-new {
	margin-left: -12px;
	margin-bottom: 12px;
}


/* sidebar */

#sidebar {
	position: fixed;
	top:0;
	left: 60%;
	width: 40%;
	height: 100%;

	background-color: #eee;
	border-left: 1px solid #ccc;
}

#sidebar.on-top {
	margin-left: 48px;
	padding:0;

	width: 55%;
	position: static !important;

	border-bottom: 1px solid #ccc;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
}

#sidebar-wrap {
	height: 100%;
	padding:8px;
}

#sidebar.on-top #sidebar-wrap  {
	margin-right: 0;
}

/* sidebar - login stuff */
#user-bar {
	background-color: #222;
	border-bottom: 4px solid #ccc;
	color: gray;
	font-size: 9pt;
	
	margin-left: -1px;
	margin-right: -1px;
	padding: 12px;
}

#user-bar a {
	font-size: 9pt;
	font-weight: bold;
	margin-top:0;
	padding-top:0;
}

#user-bar.out #ub-logout, #user-bar.out .payment-info {display: none;}
#user-bar.in #ub-login {display: none;}
#user-bar.in-http .payment-info > span {display: none;}

.page-info  {
	float: left;
	font-size: 9pt;
	color: gray;
	text-align: left;
}

#user-bar a.git-version {
	color: gray;
	font-weight: normal;
}

.page-info .beta-flag {
	color: red;
	font-weight: bold;
}

.account-info {
	float: right;
	text-align: right;
}

.payment-info span {
	color: gray;
	font-size: 9pt;
}

.payment-info span.expired {
	color: red;
	font-weight: bold;
}

.payment-info span.valid.almost_expired {
	color: yellow;
	font-weight: bold;
}

.payment-info span.valid a {
	font-weight: normal !important;
}

/* sidebar post info / title */
#sidebar #post-title {
	font-size: 20pt;
}

#post-title {
	margin-top: 6px;
}

#post-title a {
	color: #222;
}

#post-title a:hover {
	text-decoration: none;
}

#post-sub {
	font-size: 9pt;
	font-weight: bold;
	color: gray;
	margin-top: 8px;
}

#post-sub a {
	text-decoration: underline;
	color: gray;
}

#post-info {
	font-size: 9pt;
}

#post-info p {
	margin-top: 3px;
}

#post-info table {
	border-collapse: collapse;
	min-width: 80%;
}

#post-info table td {
	border: 1px solid gray;
	min-width: 24px;
	padding: 2px;
}

/* main body */

#c-list #main-loading {
	font-size: 22pt;
	text-align: center;
	margin-top: 32px;
}

#c-list #slow-loading-message {
	font-size: 12pt;
}

/* comments */
.comment {
	margin-top: 12px;
}

.comment.has-image > .c-body:hover, .comment.has-video > .c-body:hover {
	cursor: pointer;
	background: #ddd;
}

/* comment header */
.comment .c-header {
	font-size: 10pt;
}

.c-header a.c-username {
	font-weight: bold;
	color: black;
}

.c-header a {
	font-weight: bold;
}

.c-header a.r-link {
	padding: 2px 4px;
}

.c-header a.has-replies {
	background: #FFF6BF;
}

.comment .voting {
	margin-left: -18px;
}

/* comment body */

.c-body {
	border: 1px solid #ccc;
	background: #eee;
	margin-top: 4px;

	padding-left: 8px;
	padding-right: 8px;
	padding-top: 2px;
	padding-bottom: 8px;

	word-wrap: break-word;
}

.c-body p {
	margin-top: 4px;
}

.c-body blockquote {
	font-style: italic;
	margin-left: 12px;
	padding-left: 12px;
	border-left: 3px solid #ccc;
}

.c-body .c-image, .c-body .c-video {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ccc;
}

.c-body .c-right-info {
	float: right;
	margin-top: 4px;
}

.c-body .c-time {
	border: 1px solid #ccc;
	background: white;
	display: inline-block;
	font-size: 9pt;
	padding: 2px;
}

.c-body .c-icon {
	background-repeat: no-repeat;
	background-position: center;
	display: inline-block;
	margin-bottom: -4px;
	height: 16px;
	width: 16px;
}

/* 
 * some css to make spoilers work. Each subreddit does them its own way
 * but this is a common one. A more general solution would be better in the
 * future...
 */
.c-body a[href="#s"] {
	color: white;
	background: #222;
	padding: 2px;
	cursor: text;
}

.c-body a[href="#s"]::after {
	content: attr(title);
	color: #222;
	padding: 0px 10px 0px 10px;
}

.c-body a[href="#s"]:hover {
	text-decoration: none;
}

.c-body a[href="#s"]:hover::after {
	color: white;
}

div.comment.has-image .c-body .c-icon {
	background-image: url(../imgs/icon-images.png);
}

div.comment.has-video .c-body .c-icon {
	background-image: url(../imgs/icon-video.png);
	margin-bottom: -2px;
}

.c-body div.hidden {
	display:none;
}

.c-body .c-image img {
	max-width: 100%;
	max-height: 800px;
}

/* comment replies */

.comment .c-replies {
	margin-left: 24px;
}

.c-replies .comment, .c-new {
	padding-left: 26px;
	border-left: 1px solid #ddd;
}

.c-replies div.loading {
	margin-top: 12px;
	font-style: italic;
	padding-left: 8px;
	border-left: 1px solid #ddd;
}

.c-flair {
	border: 1px solid #ddd;
	font-size: smaller;
	padding: 1px;
}

.c-flair.hidden {
	display: none;
}

/* new comment */

.c-new {
	margin-top: 12px;
	margin-left: 24px;
}

.c-new textarea {
	width: 500px;
	height: 100px;

	font-family: verdana, arial;
	padding: 3px;
}

/* comment voting */

.v-link {
	height: 14px;
	width: 15px;
	background-image: url(../imgs/vote-arrows.png);
	background-repeat: no-repeat;
	cursor: pointer;
}

.uv-link {background-position: -63px -612px;}
.dv-link {background-position: -31px -612px; margin-top: 2px;}
.uv-link.has-voted {background-position: -79px -612px;}
.dv-link.has-voted {background-position: -47px -612px;}

/* login window */

#login-dialog {
	position: fixed;

	left: 50%;
	top: 30%;
	width: 270px;

	padding: 12px;

	margin-left: -160px;

	background: white;
	border: 2px solid black;

	z-index: 3;

}

#login-dialog input[type=text], #login-dialog input[type=password] {
	margin-top: 3px;
	width: 90%;
}

#login-dialog input {
	font-size: 14pt;
	padding: 3px;
}

#ld-buttons {
	margin-top: 6px;
}

#ld-inputs {
	margin-top: 6px;
}

#login-dialog div.error-text {
	margin-top: 6px;
	font-size: 9pt;
	color: red;
}

#login-dialog div.info-text {
	margin-top: 6px;
	font-size: 9pt;
	color: gray;
}

/* little bluetick ad down the bottom */
#rs-ad-row {
	background-color: #FFF6BF;
	font-size:10pt;
	line-height: 1.5;
	padding: 3px;
	vertical-align: middle;
}

#rs-ad-row a {
	color: #0099FF !important;
	text-decoration: none;
	font-weight: normal;
}

#rs-ad-row a:hover {
	text-decoration: underline;
}

/* oauth login dialog */
#login-dialog a.close {
	color: gray;
	font-size: 1.2em;
	float: right;
	margin-top: -2px;
	text-align: right;
}

#login-dialog a.close:hover {
	text-decoration: none;
}

#login-dialog.type-oauth form.oauth-form { display: block; }
#login-dialog.type-oauth form.http-form { display: none; }
#login-dialog.type-http form.oauth-form { display: none; }
#login-dialog.type-http form.http-form {  display: block; }

#login-dialog .oauth-form {
	text-align: center;
}

#login-dialog .oauth-form h2 {
	margin-top: -10px;
}

#login-dialog .oauth-form .login {
	border-top: 1px solid #ccc;
	padding-top: 24px;
	padding-bottom: 8px;
}

#login-dialog .oauth-form .login a {
	border: 2px solid #0099FF;
	color: #0099FF;
	background-color: white;
	padding: 8px 16px;
	font-size: 22pt;
}

#login-dialog .oauth-form .login a:hover {
	text-decoration: none;
}

#login-dialog .oauth-form .login a:active {
	border-color: black;
}

#login-dialog .oauth-form .change-type-link {
	font-size: 9pt;
	color: gray;
}

#login-dialog .http-form .change-type-link {
	font-size: 9pt;
	font-weight: bold;
}

#login-dialog .block {
	border-bottom: 1px solid #ccc;
	color: gray;
	font-size: 9pt;
	padding: 8px 0;
}


#login-dialog .block.last {
	border-bottom: none;
}

#login-dialog #pay-message {
	margin-top: 12px;
	text-align: left;
}

#login-dialog h2 {
	color: #ccc;
}

#login-dialog #pay-message h3 {
	color: #ccc;
	font-size: 11pt;
}

div.cover {
	background-color: black;
	height: 100%;
	left:0;
	opacity: 0.5;
	position: fixed; 
	top:0; 
	width: 100%;
	z-index: 2; 
}

.logo-heading {
	padding-left: 38px;
	background-image: url(/imgs/favicon.png);
	background-repeat: no-repeat;
	background-position: left center;
}

/* tabview css */
.tabbed .tab-bar > span {
	background-color: #f8f8f8;
	border: 1px solid #ccc;
	color: gray;
	cursor: pointer;
	display: inline-block;
	font-family: verdana;
	font-size: 10pt;
	margin-bottom: -1px;
	padding: 4px 8px;
	text-transform: uppercase;
}

.tabbed .tab-bar > span.active {
	background-color: white;
	border-bottom: 1px solid white;
}

.tabbed .tab-content {
	border: 1px solid #ccc;
	padding: 8px;
}

.tabbed .tab-content > div { display: none; }
.tabbed .tab-content > div.active { display: block;}

/* custom tab stuff for redditstream */
#info-tabs {
	margin-top: 8px;
	height: 100%;
}

#info-tabs .tab-content {
	background-color: white;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* formatting for the top comments tab */
#top-posts .c-header {
	color: gray;
	font-size: 9pt;
}

#top-posts .c-flair-block .c-flair {
	display: none;
}

#top-posts .c-flair-block:hover .c-flair {
	display: inline;
}

#top-posts .c-body {
	background-color: white;
	border: none;
	font-size: 9pt;
	margin-top: 2px;
	margin-bottom: 8px;
	padding: 0;
}

#top-posts a.c-seemore {
	color: gray;
	font-size: 9pt;
	font-weight: normal;
	font-style: italic;
	text-decoration: underline;
}

#top-posts .c-to-reddit {
	color: gray;
	font-weight: normal;
	text-decoration: underline;
}

/*
 * classes for read-only mode
 *
 * This does what it says - the user should only be able to read threads
 * but not vote or comment in anyway.
 */

.read-only-warning {
	color: red;
	display: none;
	float: right;
	text-align: right;
}

body.read-only .comment .voting { display: none; }
body.read-only .reply-link { display: none; }
body.read-only .account-info { display: none; }
body.read-only .read-only-warning { display: block; }
 
 /* more header stuff */
#user-bar .row {
	border-top: 1px solid gray;
	margin-top: 8px;
	padding-top: 8px;
}


#main .toolbar {
	border-bottom: 1px solid #ccc;
	padding: 6px;
}

#main .toolbar .breadcrumb {
	color: #ccc;
	font-weight: bold;
	text-transform: capitalize;
}

#sidebar a.button {
	background-color: transparent;
	border: 2px solid #0099FF;
	color: #0099FF;
	display: inline-block;
	padding: 6px 14px;
	text-align: center;
}

#sidebar a.button:active { border-color: #ff9932; }
#sidebar a.button:hover { text-decoration: none; }

/* offers bar */
#sidebar .offer {
	font-size: 1.5em;
}

#sidebar .offer .button {
	border-color: #ff9932;
	color: #ff9932;
	font-size: 1.0em;
}

#sidebar .offer .button:active {
	border-color: #eee;
}


#sidebar .offer > span {
	color: black;
	background-color: #eee;
	line-height: 150%;
	padding: 1px 4px;
	vertical-align: middle;
}

#sidebar .offer span.em {
	font-weight: bold;
}



/* 
 * now we have some media specific fixes
 * for handling things as the screen gets
 * narrower
 */
@media only screen and (max-width: 1300px) {
	#user-bar .page-info {
		float: none;
	}

	#user-bar .account-info {
		border-top: 1px solid gray;
		float: none;
		margin-top: 6px;
		padding-top: 6px;
		text-align: left;
	}

	.read-only-warning {
		float: left;
		padding-top: 4px;
		text-align: left;
	}
}

@media only screen and (max-width:900px) {
	/* because of the way the box model works this is required to stop
	 * from getting overlapping effects as the window gets smaller
	 */
	#c-main {
		width: 50%;
	}
}
