/*
*
* main.css
*
*/

/*
* Main and generic elements
*/

body {
	--color-primary: #43a5a6;
	--color-primary-dark: #00a6aa;

	background-color: #fff4ff;
	color: #00333a;
	margin: 0;
	font-family: "Nunito", sans-serif;
	line-height: 1.33em;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	transition-timing-function: cubic-bezier(0,0,0,1) !important;
	font-size: calc(7.7px + 1vh);
}

@media screen and (max-height: 568px) {
	/* really small devices */
	body {
		font-size: calc(7px + 1vh);
	}
}


div {
	box-sizing: border-box;
}

[v-cloak] {
	display: none;
}

#wallet {
	position: relative;
	max-width: 740px;
	overflow: hidden;
	margin: 0 auto;
	background-color: #fff4ff;
}

button, a.button {
	display: inline-block;
	background-color: var(--color-primary);
	color: #fff;
	padding: 16px 4vh;
	text-decoration: none;
	font-size: 100%;
	border-radius: 4px;
	border: 1px solid var(--color-primary);
	font-family: "Nunito", sans-serif;
	font-weight: 400;
	transition: background-color .2s, color .2s;
	letter-spacing: .6px;
}
button:not(:disabled):hover, button.hollow {
	cursor: pointer;
	background-color: transparent;
	color: var(--color-primary);
}
button:hover {
	cursor: pointer;
}
button.hollow:hover {
	background-color: var(--color-primary);
	color: #ffeffd;
}
button:focus {
	outline: 0;
}

button:disabled {
	opacity: .5;
	cursor: default;
}

button.strong {
	font-weight: 800;
}

button.inline {
	vertical-align: middle;
	padding: 14px 2vh;
}

button.--margin-bottom {
	margin-bottom: 1.2vh;
}

/* @media (prefers-color-scheme: dark) { */
	body {
		background-color: black;
		--color-primary: #00d6c0;
		--color-primary-dark: #00d6c0;
	}
	#wallet {
		color: #f9ecef;
		background: radial-gradient(circle, rgba(0, 0, 0, 1) 28%, rgba(0, 24, 24, 1) 95%);
	}
	button, a.button, button.hollow:hover {
		color: #000;
	}
/* } */

p {
	margin: 1.2vh 0;
}

@media screen and (max-height: 550px) {
	/* really small devices */
	p {
		margin: .8vh 0;
	}
}

strong {
	font-weight: 800;
}

p.top-margin {
	margin-top: 3.6vh;
}

p.bottom-margin {
	margin-bottom: 3.6vh;
}

a {
	color: var(--color-primary-dark);
	font-weight: bold;
	display: inline-block;
	text-decoration: none;
	border-bottom: 1px solid var(--color-primary-dark);
	position: relative;
	transition: border-color .2s, color .2s;
}

a:hover, a.active {
	border-color: var(--color-primary-dark);
}

.center {
	text-align: center;
}

.light {
	font-weight: 300;
}


@media screen and (max-height: 640px) {
	br.desktop { /* br only for desktop */
		display: none;
	}
}



/*
* Transitions
*/

.go-right-enter-from, .go-left-leave-to {
	left: 100% !important;
	opacity: .5;
}

.go-right-leave-to, .go-left-enter-from {
	left: -100% !important;
	opacity: .5;
}

.go-up-enter {
	top: 100% !important;
	opacity: 0;
}

.go-up-leave-to {
	top: -100% !important;
	opacity: 0;
}

.pop-out-enter-active {
	transition: transform 1s;
}
.pop-out-enter-from {
	transform: scale(.8);
}

.fade-enter-active, .fade-leave-active {
	transition: opacity .15s;
}
.fade-enter-from, .fade-leave-to {
	opacity: 0;
}

div.rotate {
	display: none;
	position: fixed;
	top: 30vh;
	width: 100%;
	text-align: center;	
	font-size: 20px;
}



/*
* Viewport
*/


#viewport {
	position: relative;
	left: 0;
	display: block;
	height: 100vh;
	transition: left .5s, opacity .2s;
	/*opacity: 0;  hide until vue has loaded */
}
#viewport.no-transition {
	transition: none;
}

#viewport > div {
	position: absolute;
	left: 0;
	transition: left .4s, opacity .4s;
	width: 100%;
	overflow: hidden;
	padding: 0 2vh;
	height: 100%;
}

#viewport > div > div.middle {
	position: absolute;
	width: 100%;
	padding: 0 8%;
	left: 0;
	top: 46%;
	transform: translateY(-50%);
}

@media screen and (max-height: 568px) {
	/* really small devices */
	#viewport > div > div.middle {
		padding: 0 11%;
	}
}

#viewport > div > h2 {
	margin: 2vh 0 1vh;
	font-size: 3vh;
	line-height: 3vh;
}

#viewport p:not(.align-left),
#viewport h2 {
	text-align: center;
}

#viewport h2 {
	color: #ff28cf;
}

#viewport label {
	display: inline-block;
	vertical-align: middle;
	text-align: right;
	font-weight: 300;
	padding: .5rem .5rem .5rem 0;
	width: calc(50% - 65px);
}

#viewport label:last-child {
	width: 130px;
	font-size: 75%;
	line-height: 1.33em;
	margin-left: 5px;
	text-align: left;
}

@media screen and (max-height: 568px) {
	/* really small devices */
	#viewport label:last-child {
		width: 120px;
	}
}

/*
* Forms in viewport
*/

#viewport input,
#viewport select {
	-webkit-appearance: none;
	background-color: transparent;
	color: var(--color-primary-dark);
	vertical-align: middle;
	font-family: sans-serif;
	font-size: calc(7px + 1vh);
	font-weight: 300;
	padding: 1rem;
	margin: 0;
	border: 1px solid;
	border-radius: 4px;
}

#viewport input[type="checkbox"],
#viewport input[type="checkbox"] + label {
	cursor: pointer;
}

#viewport input[type="checkbox"]:checked {
	background-color: transparent;
	background-image: url('../gfx/tick.svg');
	background-position: center center;
	background-repeat: no-repeat;
	background-size: 20px 20px;
}

#viewport input {
	max-width: 99px;
}

#viewport select {
	background-color: transparent;
	background-image: url('../gfx/arrow-down.svg');
	background-repeat: no-repeat;
	background-size: 20px 10px;
	background-position: right 12px center;
	padding-right: 40px;
}

#viewport input:focus,
#viewport select:focus {
	outline: none;
	border-color: #8ae9cd;
}

#viewport input[type='number']::-webkit-outer-spin-button,
#viewport input[type='number']::-webkit-inner-spin-button {
    /* remove chrome spinbox */
    -webkit-appearance: none;
    margin: 0;
}

#viewport input::placeholder {
	color: #aaddcc;
}

#viewport input.amount {
	width: 50px;
	text-align: right;
}

#viewport input.amount_cents {
	width: 20px; 
	border-color: #eee !important;
}

#viewport input[readonly='readonly'],
#viewport input[readonly='readonly'] {
	border-color: #eee !important;
}

#viewport input.long {
	max-width: 125px;
}

#viewport input.--margin-bottom {
	margin-bottom: 1.2vh;
}


/*
* Copiable links
*/

#viewport span.copyable-link {
	display: inline-block;
	position: relative;
	padding: 1vh 1.4vh;
	background-color: #e5f0f1;
	border-radius: 4px;
	word-break: break-all;
	font-weight: bold;
	cursor: pointer;
}

#viewport span.copyable-link.is-copied {
	background-color: #bfd5dd;
}

#viewport span.copyable-link.is-copied::after {
	content: 'COPIED';
	display: block;
	position: absolute;
	width: 100px;
	text-align: center;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding: 5px;
	font-weight: bold;
	background-color: white;
	box-shadow: 0 0 30px rgba(0, 0, 0, .15);
	border-radius: 4px;
}

/* @media (prefers-color-scheme: dark) { */
	#viewport span.copyable-link {
		background-color: #09605f;
		border: 2px solid var(--color-primary);
	}
	#viewport span.copyable-link.is-copied {
		background-color: transparent;
	}
	#viewport span.copyable-link.is-copied::after {
		background-color: var(--color-primary);
		color: black;
	}
/* } */


/*
* Bottom links
*/

.view-swipe-links {
	position: absolute;
	bottom: 4%;
	left: 2%;
	width: 96%;
	font-weight: 200;
}

.view-swipe-links a {
	font-weight: 600;
	border-color: transparent;
	transition: border-color .2s, color .2s;
	padding: .3rem .1rem .2rem;
	line-height: 1em;
	max-width: 38%;
	white-space: nowrap;
}

.view-swipe-links a:hover, .view-swipe-links a.active {
	border-color: var(--color-primary-dark);
}

a.view-swipe-links__left, a.view-swipe-links__clear {
	margin-left: 36px;
	float: left;
}

a.view-swipe-links__right {
	margin-right: 36px;
	float: right;
}

a.view-swipe-links__clear {
	margin-left: 42px;
	float: left;
}

a.view-swipe-links__left::before,
a.view-swipe-links__right::after,
a.view-swipe-links__clear::before {
	display: block;
	position: absolute;
	content: '';
	bottom: 0px;
	width: 24px;
	height: 24px;
	background-size: contain;
	background-repeat: no-repeat;
}

a.view-swipe-links__left::before {
	background-image: url('../gfx/arrow-left.svg?2');
	background-position: left center;
	left: -24px;
}

a.view-swipe-links__right::after {
	background-image: url('../gfx/arrow-right.svg?2');
	background-position: right center;
	right: -24px;
}

a.view-swipe-links__clear::before {
	background-image: url('../gfx/clear.svg');
	background-position: left center;
	width: 48px;
	left: -32px;
}



/*
* Welcome view
*/

object.view-welcome__symbol {
	max-width: 170px;
	margin: 7vh 0 1vh;
}
img.view-welcome__logo {
	max-width: 250px;
	margin-bottom: 4vh;
}


/*
* Divert view
*/

div#view-divert {
	padding: 2vh 10%;
}

@media screen and (max-height: 550px) {
	/* really small devices */
	div#view-divert {
		padding: 0 8%;
	}
}

label[for='view-divert__url'] {
	width: auto !important;
}

#view-divert__url {
	width: 50%;
	max-width: none !important;
}


/*
* Home view
*/

object.view-home__symbol {
	max-width: 150px;
	margin-bottom: 5vh;
}
img.view-home__logo {
	max-width: 250px;
	margin-bottom: 4vh;
}

p.view-home__wallet-title {
	text-transform: uppercase;
}


/*
* History view
*/

#view-history > *:not(img) {
	width: 96%;
	left: 2%;
	position: absolute;
}

#view-history ul {
	top: 2vh;
	box-sizing: border-box;
	list-style: none;
	padding: 0 0 5vh 0;
	margin: 0;
	display: block;
	max-height: 78%;
	overflow: auto;
}

.view-history__item {
	box-sizing: border-box;
	width: 100%;
	padding: 1.5vh 2% .8vh;
	overflow: auto;
}

.view-history__item:not(:last-child) {
	border-bottom: 1px solid;
}

.view-history__item span {
	display: block;
	float: left;
	padding-bottom: .5vh;
}

.view-history__item__desc {
	width: 100%;
	font-weight: 200;
}

.view-history__item__date {
	width: 70%;
	font-weight: 200;
}
.view-history__item__date a {
	font-weight: 200;
	margin-left: 5px;
}
.view-history__item__date a.watched::after {
	content: '';
	display: inline-block;
	width: 24px;
	height: 16px;
	background-image: url('../gfx/eye.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: right bottom;
	vertical-align: -3px;
}

.view-history__item__amount {
	width: 30%;
	font-weight: bold;
	text-align: right;
}

.view-history__item--debit .view-history__item__amount {
	color: #ff2d97;
}

.view-history__item--in-progress {
	background-color: #fdf;
}
.view-history__item:not(.view-history__item--in-progress) {
	transition: background-color 5s;
}

.view-history__total {
	top: 80%;
	left: 0;
	font-size: 140%;
	font-weight: bold;
	padding: 3vh 2%;
	border-top: 1px solid;
}

.view-history__total::before {
	content: '';
	display: block;
	width: 100%;
	height: 60px;
	background-image: linear-gradient(rgba(256,256,256,0), #fff4ff);
	position: absolute;
	left: 0;
	top: -61px;
	pointer-events: none;
}

.view-history__total span {
	display: block;
	float: left;
	width: 50%;
}

.view-history__total__amount {
	text-align: right;
}

/* @media (prefers-color-scheme: dark) { */
	#view-history ul {
		color-scheme: dark;
	}
	.view-history__total::before {
		background-image: linear-gradient(rgba(0,0,0,0), #000);
	}
/* } */


/*
* Buffers view
*/

#view-buffers ul {
	padding: 0;
}

.view-buffers__item {
	box-sizing: border-box;
	width: 100%;
	padding: 2vh 0;
	overflow: auto;
}

.view-buffers__item:not(:last-child) {
	border-bottom: 1px solid;
}

.view-buffers__item span {
	display: block;
	float: left;
	padding-bottom: .5vh;
}

.view-buffers__item--recallable {
	cursor: pointer;
}

.view-buffers__item__name {
	width: 50%;
	font-size: 20px;
	font-weight: 200;
}

.view-buffers__item__amount {
	width: 50%;
	text-align: right;
	font-size: 20px;
	font-weight: 600;
}

.view-buffers__item__desc {
	width: 100%;
	font-weight: 200;
}


/*
* Request QR code view
*/

#view-request-qr__code {
	text-align: center;
	margin-bottom: 4vh;
}

#view-request-qr__code img {
	display: inline-block !important;
	width: 256px;
	height: 256px;
	max-width: 60vw;
	max-height: 60vw;
}

/*
* Make payment view
*/

#view-send-on-request {
	padding-top: 2vh !important;
}


/*
* Progress view
*/

.view-progress__animation {
	margin-top: 10vh;
}

.view-progress__perc {
	margin-top: 10vh;
	font-size: 16px;
	line-height: 1.2em;
	font-weight: 200;
}

.view-progress__bar {
	margin-top: 3vh;
	background-color: #3c505a;
	height: 2px;
}


/*
* Send to buffer view
*/

#view-send-to-buffer__desc {
	max-width: 119px !important;
}


/*
* Wallet creation view
*/

#view-wallet-create__name {
	max-width: 120px !important;
}


/*
* Wallet signature creation verification view
*/

.view-progress-done__tick {
	display: inline-block;
	position: relative;
	background-color: #faffff;
	padding: 2vh;
	z-index: 999;
	border-radius: 2vh;
	border: 1px solid;
}

.view-progress-done__tick img {
	height: 10vh;	
}

/* @media (prefers-color-scheme: dark) { */
	.view-progress-done__tick {
		background: transparent;
		border: 3px solid var(--color-primary);
	}
/* } */


/*
* Wallet save views
*/

div#view-wallet-save {
	padding: 2vh 10%;
}

@media screen and (max-height: 568px) {
	/* really small devices */
	div#view-wallet-save {
		padding: 0 8%;
	}
}

div#view-wallet-save img {
	height: calc(10px + 1vh);
	vertical-align: text-top;
}


/*
* Hideable text
*/

.hideable-text {
	position: relative;
	width: 100%;
	height: 2vh;
}

.hideable-text p {
	position: absolute;
	width: 94%;
	padding: 0 3%;
	left: 0;
	top: 0;
	transition: top .2s, opacity .2s;
}

.hideable-text p:not(.signpad-output) {
	margin-top: 1vh;
}



/*
* Modal (alert and confirm)
*/

div#modal {
	position: fixed;
	top: 50%;
	left: 50%;
	display: block;
	background-color: white;
	width: 90%;
	max-width: 450px;
	border-radius: 8px;
	box-shadow: 0 0 100px rgba(0, 0, 0, .15);
	padding: 20px 30px;
	transform: translate(-50%, -50%);
	line-height: 1.5em;
}

div#modal p + p {
	margin-top: 20px;
}

div#modal button:first-child {
	min-width: 135px;
}

div#modal button:last-child {
	float: right;
}

/* @media (prefers-color-scheme: dark) { */
	div#modal {
		background: radial-gradient(circle,rgba(0, 0, 0, 1) 1%, rgba(24, 32, 32, 1) 100%);
		border: 1px solid #244;
	}
/* } */


/*
* Lock orientation
*/

@supports (-webkit-overflow-scrolling: touch) {
	@media screen and (min-width: 320px) and (max-width: 767px) and (orientation: landscape) {
		#viewport {
			display: none;
		}
		div.rotate {
			display: block;
		}
	}
}
