body {
	background-color: #f4f4f4;
	font-family: Arial, sans-serif;
	margin: 0;
	padding-bottom: 40vh;
	padding-top: 0.5rem;
}

hr {
	margin: 1em 0;
}

/************************************************************************/
/* ability to add clear button for an input */
/************************************************************************/

.input_container {
	border-radius: 4px;
	border: 1px solid #ccc;
	position: relative;
	width: 100%;
}

.input_container input {
	background-color: transparent;
	border: 0px;
	width: 100%;
	padding-right: 30px;
}

.input_container_wipe_icon {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	color: #666;
}

.input_container_wipe_icon:hover {
	color: #000;
}

/************************************************************************/
/* tabs */
/************************************************************************/

.tabs {
	border-bottom: 2px solid #ccc;
	display: flex;
	justify-content: flex-start;
	position: relative;
	width: 100%;
}

.tab {
	background-color: #ddd;
	border-bottom: none;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	border: 1px solid #ccc;
	cursor: pointer;
	font-size: 1rem;
	margin-right: 0.5rem;
	padding: 0.5rem 1rem;
	position: relative;
	z-index: 1;
}

.tab.active {
	background-color: #007bff;
	color: white;
	font-weight: bold;
	border-bottom: 2px solid white;
	z-index: 2;
}

.tab_content {
	align-items: center;
	background: white;
	border-top: none;
	border: 1px solid #ccc;
	display: none;
	flex-wrap: wrap;
	justify-content: center;
	padding-bottom: 1rem;
	padding-top: 1rem;
	width: calc(100% - 2px);
}

.tab_content.active {
	display: flex;
}

/************************************************************************/
/* settings */
/************************************************************************/

#settings_icon {
	cursor: pointer;
	font-size: 1.5rem;
	position: fixed;
	right: 10px;
	top: 10px;
	z-index: 2000;
}

#settings_popup {
	background: white;
	border-radius: 8px;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
	display: none;
	padding: 20px;
	position: fixed;
	right: 1rem;
	top: 1rem;
	width: 300px;
	z-index: 2001;
}

#settings_popup h3 {
	margin-top: 0rem;
}

#settings_popup h4 {
	margin-top: 2rem;
}

#settings_popup_close {
	color: red;
	cursor: pointer;
	font-size: 20px;
	position: absolute;
	right: 10px;
	top: 10px;
}

#settings_popup_api_key_input {
	box-sizing: border-box;
	padding-bottom: 8px;
	padding-top: 8px;
}

#settings_popup_save_api_key_button {
	background-color: #007bff;
	border-radius: 4px;
	border: none;
	color: white;
	cursor: pointer;
	margin-top: 5px;
	padding: 8px;
	width: 100%;
}

#settings_popup_save_api_key_button:hover {
	background-color: #0056b3;
}

/************************************************************************/
/* dictionary */
/************************************************************************/

#dictionary_input {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	width: 60vw;
}

#dictionary_input_text {
	box-sizing: border-box;
	font-size: 1.5rem;
	overflow-y: auto;
	padding-bottom: 10px;
	padding-top: 10px;
	resize: none;
	white-space: pre-wrap;
}

#dictionary_search_button {
	background-color: #007bff;
	border-radius: 5px;
	border: 1px solid #007bff;
	color: white;
	cursor: pointer;
	font-size: 1.5rem;
	padding: 10px 15px;
}

#dictionary_search_button:hover {
	background-color: #0056b3;
}

#dictionary_input_example {
	margin-top: 0.5rem;
	width: 60vw;
}

#dictionary_input_example span {
	cursor: pointer;
	text-decoration: underline;
}

#dictionary_results_container {
	display: flex;
	flex-basis: 100%;
	flex-wrap: wrap;
	margin-left: auto;
	margin-right: auto;
	margin-top: 10px;
}

#dictionary_results_container .dictionary_results_container_column {
	box-sizing: border-box;
	flex: 1 1 50%;
	padding: 1rem;
}

#dictionary_results_container > :only-child {
	flex: 1 1 100%;
	padding: 1rem;
}

.dictionary_entry {
	display: flex;
}

.dictionary_entry .dictionary_entry_kanji_written_form {
	font-size: 4rem;
	margin-right: 1rem;
	min-width: 9rem;
}

.dictionary_entry ul {
	list-style-type: none;
	padding: 0;
}

.dictionary_entry ul li {
	margin-bottom: 0.3em;
}

/************************************************************************/
/* reading assistant */
/************************************************************************/

#reading_assistant_dropdown {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 60vw;
}

#reading_assistant_dropdown select {
	font-size: 2rem;
	margin-bottom: 1rem;
}

#reading_assistant_input_output {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 60vw;
}

#reading_assistant_input_textbox {
	border-radius: 5px;
	border: 1px solid #ccc;
	box-sizing: border-box;
	font-size: 1.5rem;
	max-height: 60vh;
	min-height: 30vh;
	overflow-y: auto;
	padding: 10px;
	resize: none;
	white-space: pre-wrap;
	width: 100%;
}

#reading_assistant_output {
	border-radius: 5px;
	border: 1px solid #ccc;
	box-sizing: border-box;
	display: none;
	font-size: 1.5rem;
	margin-top: 20px;
	overflow-y: auto;
	padding: 10px;
	white-space: pre-wrap;
	width: 100%;
}

#reading_assistant_output [data-part-of-speech-english="adjectival noun"] { background-color: #d1cfe2; } /* Pastel Lavender */
#reading_assistant_output [data-part-of-speech-english="adjective"] { background-color: #fdf8c0; } /* Pastel Yellow */
#reading_assistant_output [data-part-of-speech-english="adverb"] { background-color: #f8c1d1; } /* Pastel Pink */
#reading_assistant_output [data-part-of-speech-english="conjunction"] { background-color: #f5b7b1; } /* Pastel Red */
#reading_assistant_output [data-part-of-speech-english="demonstrative"] { background-color: #d3b6e0; } /* Pastel Purple */
#reading_assistant_output [data-part-of-speech-english="filler"] { background-color: #f5deb3; } /* Pastel Beige */
#reading_assistant_output [data-part-of-speech-english="interjection"] { background-color: #ffdfa0; } /* Pastel Cream */
#reading_assistant_output [data-part-of-speech-english="noun"] { background-color: #a8d5e2; } /* Pastel Blue */
#reading_assistant_output [data-part-of-speech-english="number"] { background-color: #b0e0e6; } /* Pastel Aqua */
#reading_assistant_output [data-part-of-speech-english="other"] { background-color: #d4e2d4; } /* Pastel Sage Green */
#reading_assistant_output [data-part-of-speech-english="particle"] { background-color: #fdfd96; } /* Pastel Light Yellow */
#reading_assistant_output [data-part-of-speech-english="prefix"] { background-color: #ffe4e1; } /* Pastel Light Pink */
#reading_assistant_output [data-part-of-speech-english="pronoun"] { background-color: #ffebcd; } /* Pastel Light Peach */
#reading_assistant_output [data-part-of-speech-english="suffix"] { background-color: #d1cfe2; } /* Pastel Lavender */
#reading_assistant_output [data-part-of-speech-english="symbol"] { background-color: #eeeeee; } /* Pastel Gray */
#reading_assistant_output [data-part-of-speech-english="verb"] { background-color: #b8e0d2; } /* Pastel Mint Green */
#reading_assistant_output [data-part-of-speech-english="whitespace"] { background-color: #ffffff; } /* Pastel White */

#reading_assistant_output span.token {
	cursor: pointer;
}

#reading_assistant_drawer {
	background-color: white;
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
	bottom: 0;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
	margin-left: auto;
	margin-right: auto;
	max-height: 33%;
	overflow-y: auto;
	position: fixed;
	transform: translateY(100%);
	transition: transform 0.3s ease-in-out;
	width: calc(100% - 8rem);
	z-index: 1000;
}

#reading_assistant_drawer.active {
	transform: translateY(0);
}

#reading_assistant_drawer_wrapper {
	display: flex;
	position: relative;
}

#reading_assistant_drawer_results_container {
	display: flex;
	flex-basis: 100%;
	flex-wrap: wrap;
	margin-left: auto;
	margin-right: auto;
	margin-top: 10px;
}

#reading_assistant_drawer_results_container .reading_assistant_drawer_results_container_column {
	box-sizing: border-box;
	flex: 1 1 50%;
	padding: 1rem;
}

#reading_assistant_drawer_results_container > :only-child {
	flex: 1 1 100%;
	padding: 1rem;
}

#reading_assistant_drawer_close {
	color: red;
	cursor: pointer;
	float: right;
	font-size: 25px;
	font-weight: bold;
	position: absolute;
	right: 10px;
	top: 10px;
}

.reading_assistant_drawer_entry {
	display: flex;
}

.reading_assistant_drawer_entry .reading_assistant_drawer_entry_kanji_written_form {
	font-size: 4rem;
	margin-right: 1rem;
	min-width: 9rem;
}

.reading_assistant_drawer_entry ul {
	list-style-type: none;
	padding: 0;
}

.reading_assistant_drawer_entry ul li {
	margin-bottom: 0.3em;
}

/************************************************************************/
/* manga assistant */
/************************************************************************/

#manga_assistant_file_upload {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	width: 60vw;
}

#manga_assistant_input_file {
	box-sizing: border-box;
	font-size: 1.5rem;
	overflow-y: auto;
	padding-bottom: 10px;
	padding-top: 10px;
	resize: none;
	white-space: pre-wrap;
}

#manga_assistant_submit_button {
	background-color: #007bff;
	border-radius: 5px;
	border: 1px solid #007bff;
	color: white;
	cursor: pointer;
	font-size: 1.5rem;
	padding: 10px 15px;
}

#manga_assistant_submit_button:hover {
	background-color: #0056b3;
}

#manage_assistant_input_guidelines {
	margin-top: 0.5rem;
	width: 60vw;
}

#manga_assistant_results_container {
	border-radius: 5px;
	border: 1px solid #ccc;
	box-sizing: border-box;
	display: none;
	font-size: 1.5rem;
	margin-top: 20px;
	overflow-y: auto;
	padding: 10px;
	white-space: pre-wrap;
	width: 100%;
}

#manga_assistant_results_container .manga_assistant_results_container_column {
	box-sizing: border-box;
	flex: 1 1 50%;
	padding: 1rem;
}

/************************************************************************/
/* mobile overrides */
/************************************************************************/

@media (max-width: 768px) {
	#dictionary_input {
		width: 95vw;
	}

	#dictionary_input_example {
		width: 95vw;
	}

	#reading_assistant_dropdown {
		width: 95vw;
	}

	#reading_assistant_input_output {
		width: 95vw;
	}

	#reading_assistant_drawer {
		width: calc(100% - 2rem);
	}

	#manage_assistant_input_guidelines {
		width: 95vw;
	}
}