/* ==============================================================================================
Copyright (c) 2022 Digital Nature Group, University of Tsukuba & xDiversity
Licensed under MIT (https://github.com/DigitalNatureGroup/see-through-captions/blob/main/LICENSE)
=============================================================================================== */

html,
body {
	background-color: #000;
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
		"Hiragino Sans", Meiryo, sans-serif;
	color: #fff;
	margin: 0px;
	box-sizing: border-box;
	font-size: 16px;
}

html::-webkit-scrollbar {
	display: none;
}

a:link,
a:visited,
a:hover,
a:active {
	color: #777;
}

.controller {
	width: 1200px;
	height: 689px;
	padding: 1.5rem;
}

.controller_ui {
	display: none;
}

.toast {
	box-sizing: border-box;
	position: fixed;
	top: 10px;
	left: 10px;
	max-width: 600px;
	padding: 10px;
	font-size: 2em;
	color: #fff;
	transform: translateX(-600px);
	background-color: #28a746;
	z-index: 1;
}

.toast.is_show {
	animation: anime 3s ease 1 normal;
}

@keyframes anime {
	16.666% {
		transform: translateX(0);
	}
	83.333% {
		transform: translateX(0);
	}
}

.scroll_description {
	margin: 200px auto 50px;
	width: 100%;
	height: 100%;
	font-size: 100px;
	font-weight: 500;
	text-align: center;
	display: none;
	font-family: "Noto Sans JP", sans-serif;
}
.scroll_description p {
	margin: 0;
	padding-left: 100%;
	white-space: nowrap;
	line-height: 1em;
	animation: scroll_description 20s linear infinite;
}
@keyframes scroll_description {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-400%);
	}
}

.main {
	width: 1200px;
	font-size: 16px;
}

::selection {
	opacity: 0;
	caret-color: transparent;
}

.main.display_4inch {
	width: 320px;
	font-size: 7px;
}

#screen_area {
	width: 1440px;
	height: 540px;
	background-color: #000;
}

.display_4inch #screen_area {
	width: 320px;
	height: 360px;
}

.video_wrapper {
	position: relative;
	width: 100%;
	transition: all 0.3s;
}

#video_wrapper {
	height: 400px;
	margin-bottom: 20px;
}

.display_4inch #video_wrapper {
	width: 320px;
	height: 280px;
}

#video_wrapper_flip,
#video_wrapper_flip_top {
	text-align: left;
	width: 50%;
	height: 120px;
	transform: translate(50%, 0);
}

.display_4inch #video_wrapper_flip,
.display_4inch #video_wrapper_flip_top {
	width: 100%;
	height: 60px;
	transform: none;
}

.hidden {
	opacity: 0 !important;
}

.display_none {
	display: none !important;
}

.text_overlay_wrapper {
	box-sizing: border-box;
	position: absolute;
	overflow: hidden;
	transition: all 0.5s;
}

.text_overlay_wrapper.full {
	width: 100%;
	height: 100%;
	top: 0%;
	left: 0%;
	right: 0%;
	bottom: 0%;
}

.text_overlay_wrapper.split {
	width: 100%;
	height: 100%;
	top: 0%;
	left: 0%;
}

.text_overlay_wrapper.left {
	width: 50%;
}

.text_overlay_wrapper.right {
	width: 50%;
	left: 50%;
}

.text_overlay_wrapper.top {
	height: 30%;
}

.text_overlay_wrapper.bottom {
	height: 30%;
	top: 70%;
}

.text_overlay_wrapper.full .text_bg {
	opacity: 0 !important;
}

.text_overlay_wrapper.split .text_bg {
	opacity: 0.3;
}

.text_area {
	box-sizing: border-box;
	position: absolute;
	bottom: -0.5rem;
	left: 0;
	font-family: "Noto Sans JP", sans-serif;
	font-size: 68px;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 150%;
	color: #fff;
	text-shadow: 0 0 5px #000;
	-webkit-text-stroke-width: 0.3px;
	-webkit-text-stroke-color: #000;
	/* text-align: justify; */
	opacity: 1;
	width: 100%;
}

#video_wrapper_flip .text_area,
#video_wrapper_flip_top .text_area {
	font-size: 28px;
	line-height: 140%;
	letter-spacing: 0.1em;
	padding-bottom: 1rem;
}

.display_4inch #video_wrapper_flip .text_area,
.display_4inch #video_wrapper_flip_top .text_area {
	font-size: 20px;
}

.text_overlay_wrapper.split .text_area {
	padding: 0.5rem 1.5rem;
}

.text_overlay_wrapper.left .text_area,
.text_overlay_wrapper.right .text_area {
	font-size: 50px;
	line-height: 130%;
	padding: 1.4rem 1.5rem;
}

.text_overlay_wrapper.top .text_area,
.text_overlay_wrapper.bottom .text_area {
	font-size: 50px;
	line-height: 150%;
	padding: 1rem 1.5rem;
}

.status_wrapper {
	margin-bottom: 1.5rem;
}

.controls_wrapper .status_wrapper {
	margin-top: 2rem;
	margin-bottom: 0;
	margin-left: auto;
	margin-right: auto;
}

.status_wrapper div,
.subwindow_button_wrapper div {
	box-sizing: border-box;
	background-color: #000e16;
	display: inline-block;
	min-width: 20ex;
	padding: 30px 10px;
	margin-right: 0.5rem;
	margin-bottom: 0.8rem;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.02rem;
	line-height: 100%;
	text-align: center;
	width: 270px;
	transition: all 0.2s;
}

.error_message_wrapper p {
	color: red;
	font-size: 16px;
}

.processing {
	border: 1px #ff8800 solid;
	color: #ff8800;
}

.information {
	border: 1px #888 solid;
	color: #888;
}

.switch {
	border: 1px #ffffff solid;
	color: #ffffff;
}

#language_turn_switch {
	background-color: #666666;
}

.delete {
	border: 1px #cc3333 solid;
	color: #cc3333;
}

#delete_text {
	background-color: #330000;
	width: 50%;
}

#subwindow_button {
	background-color: #000e16;
	width: 50%;
}

.switch:hover,
.delete:hover {
	cursor: pointer;
}

.ready,
.inactive {
	border: 1px #555555 solid;
	color: #555555;
}

.error {
	border: 1px #cc3333 solid;
	color: #cc3333;
}

.controls_wrapper {
	display: none;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	color: #bbb;
}

#checkbox_controls:checked ~ .controls_wrapper {
	display: flex !important;
}

.control_wrapper {
	display: flex;
	flex-wrap: wrap;
	flex: 0 0 100%;
	max-width: 100%;
	margin-bottom: 1rem;
	padding: 1rem;
	font-size: 16px;
	line-height: 200%;
	border: solid 1px #555;
}

.control_wrapper_row {
	margin-right: -5px;
	margin-left: -5px;
}

.control_wrapper_col {
	box-sizing: border-box;
	padding-right: 5px;
	padding-left: 5px;
}

.control_header {
	flex: 0 0 100%;
	max-width: 100%;
	font-size: 90%;
	margin-top: -0.5rem;
	margin-bottom: 0.1rem;
}

.col-2 {
	flex: 0 0 17%;
	max-width: 17%;
}

.col-3 {
	flex: 0 0 25%;
	max-width: 25%;
}

.col-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.col-12 {
	flex: 0 0 100%;
	max-width: 100%;
}

.control_form {
	box-sizing: border-box;
	display: grid;
	grid-gap: 0rem 0.75rem;
	position: relative;
	width: 100%;
	margin-bottom: 2rem;
}

.control_form.bottom {
	margin-bottom: 0.5rem;
}

.control_form_slider {
	grid-template-columns: 120px 140px 1fr;
}

.control_form_selector {
	grid-template-columns: 120px 1fr;
}

.control_form_slider .control_label,
.control_form_color .control_label,
.control_form_selector .control_label {
	grid-column: 1 / 2;
	line-height: 230%;
	text-align: right;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.control_form_slider .control_input {
	grid-column: 2 / 3;
}

.control_form_slider .control_value {
	grid-column: 3 / 4;
	line-height: 230%;
	display: flex;
	align-items: center;
}

.value_unit {
	font-size: 70%;
	padding-left: 0.1rem;
}

.control_form_color {
	grid-template-columns: 120px 80px 1fr;
}

.control_form_checkbox {
	grid-template-columns: 8px 1fr;
}

.control_form_checkbox .control_label {
	line-height: 230%;
	text-align: left;
}

.control_form_checkbox input {
	line-height: 230%;
	margin: auto;
}

.control_form_textarea {
	grid-template-columns: 120px 1fr;
}

.control_form_textarea input[type="text"] {
	width: 500px;
}

input[type="color"] {
	width: 100%;
	height: 40px;
	margin: auto;
	background-color: transparent;
	border: none;
}

input[type="button"] {
	padding: 0.2rem 1rem;
	margin-right: 0.3rem;
}

.control_button_wrapper {
	width: 100%;
	text-align: center;
}

.toggles_wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	place-items: center;
	margin-bottom: 1rem;
}

.toggle_wrapper {
	display: grid;
	grid-template-columns: 130px 1fr;
	align-items: center;
	justify-content: right;
	padding: 0.5rem;
}

.toggle_label {
	order: 1;
	font-size: 24px;
	font-weight: 700;
	color: #bbb;
	justify-content: center;
	align-items: right;
	padding-right: 0.4rem;
	text-align: right;
}

.toggle_body {
	order: 2;
}

.toggle_body input:hover {
	cursor: pointer;
}

.toggle_body input[type="checkbox"] {
	position: relative;
	-webkit-appearance: none;
	appearance: none;
	width: 90px;
	height: 50px;
	border-radius: 40px;
	background: #333;
	transition: all 0.2s;
}

.toggle_body input[type="checkbox"]::before {
	width: 49px;
	height: 49px;
	border-radius: 25px;
	background-color: #ccc;
	content: "";
	position: absolute;
	top: 50%;
	left: 2%;
	transform: translateY(-50%);
	transition: all 0.2s;
}

.toggle_body input[type="checkbox"]:checked {
	background-color: #2ecc71;
	transition: all 0.2s;
}

.toggle_body input[type="checkbox"]:checked::before {
	left: 46%;
	transition: all 0.2s;
}

.radios_wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
	margin-bottom: 2rem;
}

.radios_wrapper_with_button {
	display: grid;
	place-items: center;
	grid-template-columns: 1fr 100px 1fr;
	margin-bottom: 3rem;
}

.radio_label {
	font-size: 20px;
	margin-bottom: 0.5rem;
	color: #bbb;
}

.radio input {
	display: none;
}
.radio label {
	display: block;
	float: left;
	cursor: pointer;
	width: 100px;
	margin: 0;
	padding: 12px 5px;
	border: 1px solid #888;
	border-right: none;
	background: #111111;
	color: #bbb;
	font-size: 20px;
	text-align: center;
	line-height: 1;
	transition: 0.2s;
}
#recognition_language .radio label,
#translation_language .radio label {
	width: 120px;
}
.radio label:first-of-type {
	border-radius: 3px 0 0 3px;
}
.radio label:last-of-type {
	border-right: 1px solid #888;
	border-radius: 0 3px 3px 0;
}
.radio input[type="radio"]:checked + label {
	background-color: #2ecc71;
	color: #fff;
}

.radio select {
	display: block;
	float: left;
	cursor: pointer;
	width: 20px;
	height: 46px;
	margin: 0;
	padding: 12px 5px;
	border-right: 1px solid #888;
	border-radius: 0 3px 3px 0;
	background: #111111;
	color: #bbb;
	font-size: 20px;
	text-align: center;
	line-height: 1;
	transition: 0.2s;
}

#video_wrapper:-webkit-full-screen #FullScreenBtn {
	opacity: 0.4;
}

#video_wrapper:-webkit-full-screen #FullScreenBtn:hover {
	opacity: 1;
}

.checkbox_advanced {
	margin-bottom: 1rem;
	opacity: 0.5;
}

.checkbox_advanced + label {
	color: #777;
}

.mirror {
	transform: scale(-1, 1);
}

.fix_text {
	margin: 30px 0;
	text-align: center;
}

#fixText {
	display: block;
	width: 500px;
	height: 80px;
	margin: 0 auto 40px;
	font-size: 25px;
	border: 3px solid #777;
	border-radius: 0.3em;
	color: #fff;
	background-color: #000e16;
	text-align: center;
	resize: none;
}

#openModal,
#closeModal {
	font-size: 24px;
	cursor: pointer;
	width: 400px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-align: center;
	padding: 18px;
	margin: 0 auto;
	background: #28a746;
	color: white;
}

#mask {
	background: rgba(0, 0, 0, 0.4);
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	z-index: 1;
}

#mask.hidden {
	display: none;
}

#modal {
	background: #000e16;
	color: #555;
	width: 600px;
	padding: 40px;
	border: 1px solid #777;
	border-radius: 4px;
	position: absolute;
	top: 40px;
	left: 0;
	right: 0;
	margin: 0 auto;
	z-index: 2;
}

#modal.hidden {
	display: none;
}

#modalDescription {
	font-size: 16px;
	color: #777;
	margin: 20px auto 0;
}

.subwindow_button_wrapper {
	font-size: 20px;
	font-weight: 600;
	padding-bottom: 3rem;
	text-align: center;
}

footer {
	color: #777;
	font-size: 8px;
	text-align: center;
}
