:root {
	--primary: #fa5555;
	--secondary: #f5f5f5;
	--background: #fbfbfb;
	--text: black;
	--light-text: #555555;
}

* {
	font-family: 'PT Sans', sans-serif;
}

a {
	text-decoration: none;
	color: #555;
}

a:hover {
	text-decoration: underline;
	color: var(--primary);
}

.notice {
	background-color: var(--primary);
	padding: 1em;
	color: white;
	border-radius: 0.5em;
}

.welcome {
	width: 48%;
	float: left;
}

.news {
	width: 48%;
	float: right;
}

.news.fullwidth {
	width: 100%;
}

.news-author {
	padding-top: 0.5em;
	font-weight: bold;
	padding-bottom: 1em;
}

.news-author::before {
	content: '\2014';
	position: relative;
	left: 0.2em;
}

.notice a {
	color: white;
}

.notice p:first-child {
	margin-top: 0;
}

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

.timeoption {
	font-size: 0.9rem;
	color: var(--light-text);
	white-space: nowrap;
}

.timeoption select {
	background-color: transparent;
	border: none;
	color: var(--light-text);
	font-size: 0.9rem;
	border-bottom: 1px var(--light-text) dashed;
}

html {
	background-color: var(--background);
	margin: 1.5em 3em;
}

header.main h1 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.4em 1em;
	background-color: var(--primary);
	padding: 0.5em;
	border-radius: 0.2em 0.2em 0.2em 0.2em;
	margin-bottom: 0.5em;
	padding-left: 0.7em;
}

header.main h1 a {
	color: white;
	text-decoration: none;
	font-weight: 500;
}

.ai-ribbon {
	position: absolute;
	top: 0;
	right: 0;
	width: 160px;
	height: 160px;
	overflow: hidden;
	pointer-events: none;
	z-index: 10;
}

.ai-banner {
	position: absolute;
	top: 36px;
	right: -48px;
	width: 220px;
	transform: rotate(45deg);
	background: #a52323;
	color: white;
	padding: 0.55em 0;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	box-shadow: 0 3px 8px #0003;
}

@media (max-width: 600px) {
	.ai-ribbon {
		width: 115px;
		height: 115px;
	}
	.ai-banner {
		top: 25px;
		right: -42px;
		width: 170px;
		font-size: 12px;
	}
}

.new-badge {
	display: inline-block;
	align-self: center;
	background: #a52323;
	color: white;
	border-radius: 0.3em;
	padding: 0.1em 0.4em;
	margin-right: 0.45em;
	font-size: 0.65em;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.ai-disclaimer { color: var(--light-text); }
.ai-generated-quote blockquote { overflow-wrap: anywhere; }
#ai-quote-card { margin-bottom: 1em; }
#ai-status { margin: 1em 0; }
#ai-generate:disabled { opacity: 0.6; cursor: wait; }
#ai-status:empty { display: none; }
#ai-captcha { padding: 1.5rem 0 0.5rem; }
#ai-captcha .grecaptcha-badge {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	transform: none;
	max-width: 100%;
}

nav.main ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	background-color: #e9e9e9;
	border-radius: 0.3em 0.3em 0 0;
}

nav.main ul li {
	display: flex;
}

nav.main ul li a {
	color: var(--light-text);
	text-decoration: none;
	display: flex;
	align-items: center;
	flex: 1;
	padding: 0.3em 1em;
}

nav.main ul li.active:hover, nav.main ul li.active {
	background-color: white;
	cursor: pointer;
}

nav.main ul li:first-child {
	border-radius: 0.3em 0 0 0;
}

nav.main ul li:hover {
	background-color: #f5f5f5;
	cursor: pointer;
}

nav.main ul li:hover a, nav.main ul li.active a {
	color: black;
}

section.main {
	background-color: white;
	padding: 2em;
	border-radius: 0 0 0.5em 0.5em;
}

section.main::after {
	content: ' ';
	display: block;
	height: 0;
	clear: both;
}

section.main h1:first-child {
	font-weight: normal;
	margin-top: 0;
	margin-bottom: 1em;
}

div.quote {
	background-color: var(--background);
	border-radius: 0.5em;
	margin-bottom: 1.5em;
}

div.quote:last-child {
	margin-bottom: 0;
}

div.quote header {
	background-color: var(--secondary);
	padding: .5em .75em;
	border-radius: 0.5em 0.5em 0 0;
}

div.quote header * {
	display: inline;
	font-size: 1em;
}

div.quote header h1, div.quote header h1 a {
	font-size: 1em;
	font-weight: normal;
	color: var(--light-text);
}

div.quote header h1 a:hover {
	color: var(--primary);
}

div.quote header button {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 1em;
	color: var(--light-text);
	padding-left: 0;
	outline: 0;
}

div.quote header button:hover {
	text-decoration: underline;
}

div.quote header button.vote.up {
	margin-left: 0.5em;
	margin-right: -0.2em;
}

div.quote header button.vote.up::after {
	content: '';
	transform: rotate(-135deg);
    border: solid var(--light-text);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 0.3em;
}

div.quote header button.vote.down {
	margin-right: 0.5em;
	margin-left: -0.1em;
}

div.quote header button.vote.down::after {
	content: '';
	transform: rotate(45deg);
    border: solid var(--light-text);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    margin-left: 0.3em;
    margin-bottom: 4px;
}

div.quote header button.vote.voted::after {
	border-color: var(--primary);
}

div.quote header .votes {
	font-size: 0.9em;
	color: var(--light-text);
}

div.quote header .score::after {
	content: '/';
	color: var(--light-text);
	font-size: 0.9em;
}

div.quote header .timestamp {
	font-size: 0.9em;
	color: var(--light-text);
}

div.quote blockquote, blockquote {
	font-family: Consolas, Monaco, Courier New, monospace;
	font-size: .8em;
	margin: 1em;
	padding: .75em 1em;
	border-left: .15em solid var(--primary);
	white-space: pre-wrap;
	line-height: 1.75em;
}

div.quote footer {
	border-top: .08em solid #bbb;
	margin-left: 1em;
	margin-right: 1em;
	padding-top: .3em;
	padding-bottom: 0.5em;
}

div.quote footer.empty {
	border: none;
	padding-bottom: 0.25em;
}

div.quote footer p {
	margin: 0;
	margin-top: 0.3em;
}

div.quote footer .notes::before {
	content: 'Notes: ';
	color: var(--light-text);
}

div.quote footer .notes {
	color: var(--light-text);
	font-size: 0.8em;
}

div.quote footer .tags::before {
	content: 'Tags: ';
	color: var(--light-text);
}

div.quote footer .tags {
	color: var(--light-text);
	font-size: 0.8em;
}

.page_nav, .refresh_button {
	float: right;
	font-size: 1rem;
	margin-top: 0.5em;
}

.page_nav a, .refresh_button a {
	background-color: var(--secondary);
	color: var(--light-text);
	padding: 0.5em 1.5em;
	text-decoration: none;
	font-weight: normal;
}

.refresh_button a {
	border-radius: 0.5em;
}

.page_nav a:first-child {
	border-radius: 0.5em 0 0 0.5em;
	border-right: .08em solid #bbb;
}

.page_nav a:last-child {
	border-radius: 0 0.5em 0.5em 0;
}

.page_nav a.disabled {
	color: var(--secondary);
}

.page_nav a:hover, .refresh_button a:hover {
	color: var(--primary);
	cursor: pointer;
}

.page_nav a.disabled:hover {
	color: var(--secondary);
	cursor: default;
}

.tag {
	color: var(--light-text);
}

.cloud.tag {
	margin-right: 10px;
}

.search {
	width: 100% !important;
}

.select2-dropdown {
	margin-left: 3em;
	margin-top: 1.5em;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	margin-top: -1px;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
	margin-bottom: 5px !important;
}

input[type=text], textarea {
	border-radius: 4px;
	border: 1px solid #aaa;
	height: 28px;
	outline: none;
	padding-left: 0.5em;
	width: 100%;
	font-size: 1em;
	line-height: 28px;
}

#quoteForm input[type=text] {
	height: 32px;
}

textarea {
	height: 8em;
}

form input[type=text], form textarea {
	margin-bottom: 0.5em;
	color: #444;
}

form label {
	display: block;
	color: var(--light-text);
	font-size: 0.9em;
	padding-bottom: 0.2em;
}

form button, #ai-generate {
	border-radius: 4px;
	background-color: white;
	border: 1px solid #aaa;
	outline: none;
	color: var(--light-text);
	cursor: pointer;
	font-size: 1em;
	margin-top: 0.7em;
	padding: 0 0.8em;
	height: 28px;
}

#ai-generate { margin-top: 0; }

form button:hover, #ai-generate:hover {
	background-color: #fcfcfc;
}

form button:focus, #ai-generate:focus {
	background-color: #fafafa;
}

.messages {
	margin-bottom: 1em;
}

.message {
	font-style: italic;
}

.report {
	padding-left: 0.5em;
	color: var(--light-text);
	cursor: pointer;
}

.report:hover {
	color: black;
	text-decoration: none;
}

.report.reported {
	color: black;
	cursor: default;
}

body div:last-child div:last-child[style*="z-index: 2000000000;"] {
	position: fixed !important;
	top: 50% !important;
	transform: translateY(-50%);
}

div.grecaptcha-badge {
	position: relative !important;
	top: -0.8em;
	left: 0;
	transform-origin: left center;
	transform: scale(0.7, 0.7);
}

div.g-recaptcha {
	height: 0;
}

.chart {
	max-width: 40em;
	width: 45%;
	display: block;
	background-color: var(--secondary);
	border-radius: .5em;
	padding: 0.5em 1em;
	margin: 1em;
}

.charts-container {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.desktop-spacer {
	height: 1.5em;
}

@media only screen and (max-width: 1470px) {
	.chart {
		width: 100%;
	}	
}

@media only screen and (max-width: 830px) {
	.chart .title {
		font-size: 2em !important;
	}

	.chart .legend text {
		font-size: 1.5em !important;
	}

	.chart .axis text {
		font-size: 1em !important;
	}
}

@media only screen and (max-width: 600px) {
	.chart {
		margin: 0.5em;
	}

	.chart svg {
		padding-bottom: 6vw;
		padding-top: 0.5em;
		padding-left: 0.2em;
	}

	.chart .title {
		font-size: 2em !important;
	}

	.chart .legend text {
		font-size: 1.5em !important;
	}

	.chart .axis text {
		font-size: 1em !important;
	}

	html {
		margin: 0.5em;
	}

	.spacer {
		height: 3.5em;
	}

	.desktop-spacer {
		height: 0em;
	}

	.page_nav, .refresh_button {
		float: none;
		font-size: 1rem;
		margin-top: 1.5em;
		text-align: center;
	}

	.page_nav[style="visibility: hidden"], .refresh_button[style="visibility: hidden"] {
		margin: 0;
		height: 0;
	}

	section.main {
		padding: 1em;
	}

	nav.main ul {
		display: flex;
		flex-wrap: wrap;
	}

	nav.main ul li {
		flex: 1 1 4em;
	}

	nav.main ul li a {
		justify-content: center;
	}

	.welcome, .news {
		width: 100%;
	}
	.welcome {
		margin-bottom: 2em;
	}

	div.grecaptcha-badge {
		top: 1.4em;
		left: 50%;
		transform: scale(0.7, 0.7) translateX(-50%);
	}

	.select2-dropdown {
		margin-left: 0.5em;
		margin-top: 0.5em;
	}
}
