/**
 * pwa.css - the sheet that asks a reader to keep the shop.
 *
 * One sheet, two places. On a phone it lies along the foot of the page, above
 * the bar of four tabs, because that is the part of the screen a thumb already
 * knows and a reader looks at without aiming. On a desk it is a card in the
 * corner, because a desk reader has a screen full of things and a strip across
 * the bottom would be a strip across the bottom of all of them.
 *
 * Nothing here is drawn until the browser has said, in so many words, that this
 * site can be installed. There is no state in which this file shows anything on
 * its own, which is why there is no "always visible" case to style: the element
 * carries hidden and nothing removes it except the script, when it has the
 * right to.
 *
 * The colours are the shop's own - the navy of the header, the red of the
 * button that does something - and the sizes are the ones the rest of the shop
 * is set in. A sheet offering an icon should not look like it came from
 * somewhere else, and it is read once, so it is set at the size of the body of
 * the shop rather than the size of a banner.
 */

/* The sheet itself. Hidden until there is something true to say. */

[data-ck-install] {
	background: #ffffff;
	border: 1px solid rgba( 1, 23, 82, .12 );
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba( 1, 23, 82, .18 );
	box-sizing: border-box;
	color: var( --ck-navy, #011752 );
	font-family: inherit;
	left: 0;
	opacity: 0;
	padding: 12px 14px;
	right: 0;
	transform: translateY( 12px );
	transition: opacity .22s ease, transform .22s ease;
	z-index: 950;
}

[data-ck-install].is-in {
	opacity: 1;
	transform: translateY( 0 );
}

[data-ck-install][hidden] {
	display: none;
}

/* A phone: along the foot, clear of the four tabs. */

@media ( max-width: 760px ) {

	[data-ck-install] {
		bottom: 74px;
		display: flex;
		gap: 10px;
		left: 10px;
		position: fixed;
		right: 10px;
	}
}

/* A desk: a card in the corner, out of the way of the page. */

@media ( min-width: 761px ) {

	[data-ck-install] {
		bottom: 20px;
		left: auto;
		max-width: 360px;
		padding: 14px 16px;
		position: fixed;
		right: 20px;
		width: auto;
	}
}

/* The icon the offer is about. It is the shop's own, taken from the same file
 * the manifest names. */

.ck-install__icon {
	background: #ffffff;
	border: 1px solid rgba( 1, 23, 82, .12 );
	border-radius: 8px;
	flex: 0 0 auto;
	height: 44px;
	object-fit: cover;
	width: 44px;
}

/* The words. */

.ck-install__body {
	flex: 1 1 auto;
	min-width: 0;
}

.ck-install__title {
	color: var( --ck-navy, #011752 );
	display: block;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 2px;
}

.ck-install__copy {
	color: var( --ck-muted, #6b7385 );
	display: block;
	font-size: 11px;
	line-height: 1.45;
	margin: 0;
}

.ck-install__how {
	color: var( --ck-muted, #6b7385 );
	display: block;
	font-size: 11px;
	line-height: 1.45;
	margin: 0;
}

.ck-install__how b {
	color: var( --ck-navy, #011752 );
	font-weight: 800;
}

/* The two answers. */

.ck-install__do {
	align-items: center;
	background: var( --ck-red, #d92027 );
	border: 0;
	border-radius: 8px;
	color: #ffffff;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	height: 36px;
	justify-content: center;
	min-width: 78px;
	padding: 0 14px;
}

.ck-install__do:hover,
.ck-install__do:focus-visible {
	background: #b81a20;
}

.ck-install__no {
	align-items: center;
	background: transparent;
	border: 0;
	color: var( --ck-muted, #6b7385 );
	display: inline-flex;
	flex: 0 0 auto;
	font-family: inherit;
	font-size: 12px;
	height: 36px;
	justify-content: center;
	padding: 0 6px;
	width: 32px;
}

.ck-install__no:hover,
.ck-install__no:focus-visible {
	color: var( --ck-navy, #011752 );
}

[hidden] {
	display: none !important;
}

/* Somebody who would rather not be asked again. The sheet is still there in the
 * page - it is one rule of JavaScript that keeps it away - and this is what it
 * looks like for the moment before that runs, and for a browser with the script
 * turned off, where the right thing is to show nothing at all. */
[data-ck-install][hidden] {
	display: none !important;
}