/* styles for FILL CODE AS FORM  (info: https://github.com/4eDo/mybb/tree/main/fill_code_as_form#readme )*/

/* Кнопка под формой ответа*/
#templateBtn {}
.tmpl_overlay {}
.tmpl_popup {}

#tmpl_close-button {
	position: absolute !important;
	top: 12px;
	float: right;
	font-size: 33px !important;
	text-decoration: none;
	border: 0px !important;
	user-select: none;
	font-weight: lighter;
}

#targetFormTitle {
	height: revert-layer !important;
}

#tmpl_back-button,
#tmpl_get-code-button {
	display:block;
	background: rgb(var(--text-primary), .05);
	color: rgb(var(--text-primary));
	border: none;
	border-radius: 5px;
	padding: 2px 15px 3px 15px;
	cursor: pointer;
	font: var(--fw400) var(--fs12) var(--font-second-sa);
	margin: 0 5px;
	outline: none;
	-webkit-transition: background var(--anim-hover);
	-o-transition: background var(--anim-hover);
	transition: background var(--anim-hover);
	width: 100px;
	text-transform: lowercase;
	user-select: none;
	text-align: center;
	justify-content: center;
}

#tmpl_back-button:hover,
#tmpl_get-code-button:hover,
#tmpl_get-code-button {
	background-color: rgb(var(--accent)) !important;
	color: #fff !important;
}

#targetForm table {
	width: 100%;
	border-collapse: collapse;
	flex-grow: 1;
}

#targetForm td {
	padding: 5px;
	vertical-align: top;
}

#targetForm td:first-child {
	text-align: right;
	width: 35%;
}

#targetForm td:first-child label {
	font-weight: 700;
}

#targetForm td:first-child div {
	font-style: italic;
}

#targetForm input,
#targetForm select,
#targetForm textarea {
	width: 95%;
	color: #000000 !important;
	padding: 2px 11px;
	height: -webkit-fill-available;
}

#targetForm,
#templatesList {
	height: 450px;
	display: flex;
	margin-top: 10px;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: auto;
	clear: both;
	max-height: 30em;
	max-height: 46vh;
	padding: 5px;
}

#templateFormName {
	align-self: center;
	font-size: large;
	padding: 2px;
}

.tmpl_template {
	text-align: justify;
	padding: 8px;
	font-size: 11px;
	text-transform: lowercase;
	background: rgb(var(--text-primary), .05);
	color: rgb(var(--text-primary));
	border: 1px solid rgba(var(--accent), 0.2);
	border-radius: 5px;
	cursor: pointer;
	font: var(--fw400) var(--fs12) var(--font-second-sa);
	margin: 10px 5px;
	outline: none;
	-webkit-transition: background var(--anim-hover);
	-o-transition: background var(--anim-hover);
	transition: background var(--anim-hover);
}

.tmpl_template:hover {
	background: rgb(var(--accent), 0.2);
}

/* Подсветка кода */
#targetForm code {
	background-color: rgb(var(--text-primary), .05);
	border-radius: 2px;
	cursor: pointer;
	border: 1px solid rgba(var(--accent), 0.1);
	font-family: monospace;
	font-style: normal;
	font-size: medium;
	position: relative;
	word-wrap: break-word;
}

#targetForm code::after {
	content: "";
	position: absolute;
	top: -25px;
	left: 50%;
	transform: translateX(-50%);
	background-color: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.3s ease-in-out, top 0.3s ease-in-out;
	pointer-events: none;
	z-index: 1;
}

#targetForm code.copied::after {
    content: "Скопировано!";
    opacity: 1;
    top: -35px;
}
/* END styles for FILL CODE AS FORM*/