*,
*::before,
*::after {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	outline: none;
	color: #555555;
	font-family: "Alegreya Sans SC", sans-serif;
}

body {
	justify-content: center;
	align-items: center;
	height: 100vh;
	width: 100%;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	margin: 0;
	padding: 32px 16px;
	background-color: #faf6f1;
	font-family: Helvetica, Sans-Serif;
}

.signature-pad {
	position: relative;
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr 1fr;
	grid-auto-rows: max-content;
	font-size: 10px;
	width: 100%;
	max-width: 600px;
	background-color: #fff;
	border-radius: 25px;
	padding: 20px 25px;
	margin: auto;
	filter: drop-shadow(0 0 10px rgba(0,0,0,.2));
}

h1 {
	margin: 0;
}

.signature-pad h1,
.signature-pad .signature,
.signature-pad--footer,
.signature-pad .name,
.signature-pad .iban {
	grid-column: 1 / span 2;
}

.signature-pad > div {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.signature-pad::before {
	left: 20px;
	-webkit-transform: skew(-3deg) rotate(-3deg);
	transform: skew(-3deg) rotate(-3deg);
}

.signature-pad::after {
	right: 20px;
	-webkit-transform: skew(3deg) rotate(3deg);
	transform: skew(3deg) rotate(3deg);
}

.signature-pad input {
	padding: 10px 15px;
	border-radius: 20px;
	border: none;
	background-color: rgba(0, 0, 0, 0.07);
	font-size: 170%;
	width: 100%;
	min-width: 100%;
	font-family: "Alegreya Sans", sans-serif;
}

.signature-pad input#date {
	-webkit-min-logical-width: calc(100% - 20px);
}

.signature-pad label {
	font-size: 130%;
	font-weight: 600;
	width: 100%;
	margin-bottom: 3px;
}

.signature-pad--body {
	position: relative;
	-webkit-box-flex: 1;
	-ms-flex: 1;
	flex: 1;
	border-radius: 20px;
	min-height: 140px;
	
}

.signature-pad--body canvas {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border-radius: 20px;
	background-color: rgba(0, 0, 0, 0.07);
}

.signature-pad--footer {
	color: #C3C3C3;
	text-align: center;
	font-size: 1.2em;
	margin-top: 8px;
}

.signature-pad--actions {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: stretch;
	margin-top: 8px;
	gap: 5px;
}

.button {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	border: none;
	color: white;
	background-color: #686868;
	border-radius: 20px;
	padding: 6px 15px;
	width: 100%;
	font-weight: 600;
}

.button img {
	width: 30px;
	filter: invert(1);
}

.button[data-action="send"] {
	font-size: 150%;
	padding: 10px 20px;
	background-color: #004bac;
}

footer {
	margin: 20px 10px;
	text-align: center;
}

#loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
	justify-content: center;
	align-items: center;
	flex-direction: column;
  	gap: 15px;
	background-color: rgba(250, 246, 241, 0.7);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: none;
}

html[message=true] #loader {
    display: flex;
}

.lds-ripple {
    position: relative;
    width: 40px;
    height: 40px;
}

.lds-ripple div {
    position: absolute;
    border: 2px solid #686868;
    opacity: 1;
    border-radius: 50%;
    animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.lds-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes lds-ripple {
    0% {
        top: 18px;
        left: 18px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 18px;
        left: 18px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 18px;
        left: 18px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 36px;
        height: 36px;
        opacity: 0;
    }
}

#loader .loader-emoji {
  	font-size: 300%;
}

#loader .loader-text {
  	font-weight: bold;
	text-align: center;
	padding: 0 20px;
}