/*
 * Form styles (Contact, "Send us a Query" panels, ACP signup), loaded only on pages with a form.
 */

.form-control {
	display: block;
	width: 100%;
	height: calc(1.5em + .75rem + 2px);
	padding: .375rem .75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #495057;
	background-color: #fff;
	background-clip: padding-box;
	border: 1px solid #ced4da;
	border-radius: .25rem;
	transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control::placeholder { color: #6c757d; opacity: 1; }
.form-control:focus {
	color: #495057;
	background-color: #fff;
	border-color: #80bdff;
	border-width: 2px;
	outline: 0;
	box-shadow: none;
}
textarea.form-control { height: auto; }
.form-control-lg {
	height: calc(1.5em + 1rem + 2px);
	padding: .5rem 1rem;
	font-size: 1.25rem;
	line-height: 1.5;
	border-radius: .3rem;
}
.form-select {
	padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right .75rem center;
	background-size: 16px 12px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
input[type="file"].form-control { overflow: hidden; padding: .375rem .75rem; }
input[type="file"].form-control::file-selector-button {
	margin: -.375rem .75rem -.375rem -.75rem;
	padding: .375rem .75rem;
	color: #212529;
	background-color: #e9ecef;
	border: 0;
	border-right: 1px solid #ced4da;
	border-radius: 0;
	pointer-events: none;
}
input[type="file"].form-control:hover::file-selector-button { background-color: #dde0e3; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; }

.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }

.form-check { position: relative; display: block; padding-left: 0; }
.form-check-input {
	position: relative;
	width: 1em;
	height: 1em;
	margin: .25em 5px 0 2px;
	vertical-align: top;
	background-color: #fff;
	border: 1px solid rgba(0, 0, 0, .25);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	print-color-adjust: exact;
}
.form-check-input[type="checkbox"] { border-radius: .25em; }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked { background-color: #0d6efd; border-color: #0d6efd; }
.form-check-input[type="radio"]:checked { box-shadow: inset 0 0 0 .2em #fff; }
.form-check-input[type="checkbox"]:checked {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
	background-size: 100% 100%;
}
.form-check-input:focus-visible { outline: 2px solid #86b7fe; outline-offset: 1px; }
.form-check-label { cursor: pointer; }

/* Error messages */
.invalid-msg, .invalid-feedback { font-size: .875em; color: var(--dt-danger); }
.invalid-msg[hidden] { display: none !important; }
.form-control.is-invalid { border-color: var(--dt-danger); }
.dt-form-error { margin: .5rem 0; }
.dt-msg-block { padding: 0 15px; color: #ef3b3a; }

/* Honeypot */
.dt-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact page: floating labels (".form-outline") */
.dt-contact .form-outline { position: relative; margin-bottom: 15px; }
.form-outline .form-control { background: transparent; transition: all .2s linear; }
.form-outline .form-control:focus { box-shadow: none !important; }
.form-outline .form-control ~ .form-label {
	position: absolute;
	top: 0;
	left: 25px;
	max-width: 90%;
	margin-bottom: 0;
	padding-top: .3rem;
	overflow: hidden;
	color: rgba(0, 0, 0, 0);
	white-space: nowrap;
	text-overflow: ellipsis;
	pointer-events: none;
	transform-origin: 0 0;
	transition: all .2s ease-out;
}
.form-outline .form-control:focus ~ .form-label {
	padding: 0 5px;
	color: #0089db;
	background: #eee;
	transform: translateY(-1rem) translateY(.1rem) scale(.7);
}
.form-outline .form-control:not(:placeholder-shown) + .form-label {
	top: 0;
	padding: 5px;
	color: #939393;
	background: #eee;
	transform: translateY(-1rem) translateY(.1rem) scale(.7);
}

/* Side panel ("Send us a Query") */
.servic-rightPan .form-control {
	margin-bottom: 10px;
	padding: .375rem .3rem;
	border: none;
	border-bottom: 1px solid #025391;
	border-radius: 0;
}
.servic-rightPan .form-control:focus { border-bottom-width: 2px; }
.servic-rightPan .form-select { padding-right: 2rem; background-position: right .3rem center; }
.servic-rightPan .invalid-msg { margin: -6px 0 6px; }
.servic-rightPan .dt-msg-block { margin: 0 0 10px; }

/* ACP signup form */
.bannerForm .form-control { font-size: .9rem; }
.bannerForm .form-label { margin-bottom: .1rem; padding-left: .3rem; }
.bannerForm .row > [class*="col"] { position: relative; }
.bannerForm .invalid-msg {
	position: absolute;
	top: -12px;
	right: 15px;
	z-index: 2;
	padding: 0 5px;
	font-size: 13px;
	line-height: 20px;
	color: #f00;
	background: #dbdbdb;
	border-radius: 5px;
}
.bannerForm .invalid-msg.dt-msg-inline { position: static; display: inline-block; margin-top: 4px; }
.bannerForm .invalid-msg.dt-msg-exist { position: static; display: block; width: max-content; margin-top: 4px; }
.bannerForm .dt-form-error { position: static; }
.bannerForm .form-check-input { margin-left: .5rem; }
.bannerForm .form-check .form-check-input { margin-left: 2px; }
.bannerForm fieldset label { margin-right: .25rem; cursor: pointer; }
.bannerForm legend { margin-bottom: 4px; }
.bannerForm a { color: var(--dt-blue); }

/* Material "fill" style date field (was mat-datepicker) */
.dt-fill-field {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 52px;
	margin-bottom: 18px;
	padding: 4px 12px 2px;
	background: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, .42);
	border-radius: 4px 4px 0 0;
}
.dt-fill-field label { font-size: 12px; line-height: 16px; color: rgba(0, 0, 0, .6); }
.dt-fill-field input {
	width: 100%;
	padding: 2px 0 4px;
	font-size: .95rem;
	color: #000;
	background: transparent;
	border: 0;
	outline: 0;
}
.dt-fill-field:focus-within { border-bottom: 2px solid #3f51b5; }
.dt-fill-field:focus-within label { color: #3f51b5; }

/* Loader + toasts (were the loader.svg overlay and ngx-toastr) */
.dt-loader {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 1100;
	width: 100%;
	text-align: center;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.dt-toasts {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 1200;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: none;
}
.dt-toast {
	width: 300px;
	max-width: calc(100vw - 24px);
	padding: 15px 15px 15px 50px;
	position: relative;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	border-radius: 3px;
	box-shadow: 0 0 12px #999;
	opacity: .9;
	pointer-events: auto;
	cursor: pointer;
}
.dt-toast::before {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 20px;
}
.dt-toast--success { background-color: #51a351; }
.dt-toast--success::before { content: "\f00c"; }
.dt-toast--error { background-color: #bd362f; }
.dt-toast--error::before { content: "\f071"; }
