/* KVS Download Plus — front end.
   One button, one row of fields, nothing else. Colours come from the brand
   palette and can be overridden by the theme with these custom properties. */

.kdp-wrap {
	--kdp-gold: #b8860b;
	--kdp-gold-dark: #9c7209;
	--kdp-ink: #1a1a1a;
	--kdp-muted: #7d7568;
	--kdp-line: #d8cdb4;
	--kdp-accent: #8a5c2e;
	--kdp-good: #2e5e34;
	--kdp-bad: #8a1f21;
	margin: 1.4em 0;
	font-size: 15px;
	line-height: 1.6;
}

.kdp-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: var(--kdp-gold);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	letter-spacing: .01em;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.3;
	transition: background .15s ease;
}

.kdp-btn:hover,
.kdp-btn:focus {
	background: var(--kdp-gold-dark);
	color: #fff;
}

.kdp-btn[disabled] {
	opacity: .6;
	cursor: default;
}

.kdp-ic {
	font-size: 15px;
	line-height: 1;
}

.kdp-sub {
	font-size: 12.5px;
	color: var(--kdp-muted);
	margin: 6px 0 0;
}

.kdp-welcome {
	color: var(--kdp-accent);
}

.kdp-fields {
	display: flex;
	gap: 9px;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
}

.kdp-input {
	padding: 11px 13px;
	border: 1px solid var(--kdp-line);
	border-radius: 4px;
	font: inherit;
	font-size: 14px;
	background: #fff;
	color: var(--kdp-ink);
	min-width: 190px;
	flex: 1 1 190px;
	max-width: 260px;
	margin: 0;
}

.kdp-input:focus {
	outline: 2px solid var(--kdp-accent);
	outline-offset: 1px;
}

select.kdp-input {
	max-width: 280px;
}

.kdp-input.kdp-invalid {
	border-color: var(--kdp-bad);
}

.kdp-hint {
	font-size: 12.5px;
	margin: 7px 0 0;
	color: var(--kdp-accent);
	font-weight: 600;
}

/* The author rules below would otherwise beat the browser's own
   [hidden] { display: none }, leaving every stage on screen at once. */
.kdp-wrap [hidden] {
	display: none !important;
}

.kdp-hint a,
.kdp-linkbtn {
	color: var(--kdp-accent);
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 600;
}

.kdp-hint .kdp-sep {
	color: var(--kdp-muted);
	font-weight: 400;
	margin: 0 6px;
}

.kdp-error {
	font-size: 12.5px;
	margin: 7px 0 0;
	color: var(--kdp-bad);
	font-weight: 600;
}

.kdp-consent {
	display: block;
	font-size: 12px;
	color: var(--kdp-muted);
	margin-top: 10px;
	max-width: 560px;
	line-height: 1.55;
}

.kdp-consent input {
	margin-right: 6px;
	vertical-align: -1px;
}

.kdp-done {
	font-size: 14px;
	color: var(--kdp-good);
	font-weight: 600;
	margin: 0;
}

.kdp-retry a {
	color: var(--kdp-accent);
	cursor: pointer;
	text-decoration: underline;
}

/* The honeypot: present for a bot, invisible and unreachable for a person. */
.kdp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kdp-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* style="link" — an inline text link instead of a button. */
.kdp-as-link {
	display: inline;
	margin: 0;
}

.kdp-as-link .kdp-stage-rest {
	display: inline;
}

.kdp-as-link .kdp-btn.kdp-open {
	background: none;
	color: var(--kdp-accent);
	padding: 0;
	font-weight: 700;
	text-decoration: underline;
	font-size: inherit;
	display: inline;
}

.kdp-as-link .kdp-btn.kdp-open:hover {
	background: none;
	color: var(--kdp-gold-dark);
}

.kdp-as-link .kdp-sub {
	display: inline;
	margin-left: 6px;
}

.kdp-resend-intro {
	margin: 0 0 10px;
}

.kdp-admin-warning {
	display: inline-block;
	background: #fdf6e3;
	border-left: 3px solid #dba617;
	padding: 6px 12px;
	font-size: 13px;
	color: #8a6d08;
}

@media (max-width: 520px) {
	.kdp-input,
	.kdp-fields .kdp-btn {
		width: 100%;
		max-width: none;
		flex: 1 1 100%;
	}
	.kdp-fields .kdp-btn {
		justify-content: center;
	}
}

/* ---------------------------------------------------------------------------
   The block: image beside the message on a wide screen, stacked on a phone.
   Widths come from the two per-download settings, handed in as custom
   properties so one download can be laid out differently from another without
   a line of extra CSS anywhere.
   ------------------------------------------------------------------------ */

.kdp-wrap.kdp-has-image {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
}

.kdp-wrap.kdp-has-image > .kdp-media {
	flex: 0 0 auto;
	width: var(--kdp-img-w, 40%);
	max-width: 100%;
}

.kdp-wrap.kdp-has-image > .kdp-body {
	flex: 1 1 260px;
	min-width: 0;
}

.kdp-media .kdp-img,
.kdp-media img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.kdp-heading {
	margin: 0 0 .4em;
	font-size: 1.6em;
	line-height: 1.25;
	color: var(--kdp-ink);
}

.kdp-intro {
	margin: 0 0 1.1em;
	color: var(--kdp-ink);
}

.kdp-intro p:last-child {
	margin-bottom: 0;
}

.kdp-field-intro {
	margin: 0 0 8px;
	font-size: 13.5px;
	color: var(--kdp-muted);
}

.kdp-done-hint {
	margin-top: 4px;
}

/* The draft notice is for one reader only: the person who forgot to set it
   Live. It has to look like a warning, not like part of the page. */
.kdp-admin-warning {
	flex: 1 0 100%;
	margin: 0 0 14px;
	padding: 9px 13px;
	border-left: 3px solid #b8860b;
	background: #fdf6e3;
	color: #6b5518;
	font-size: 13px;
	border-radius: 2px;
}

@media (max-width: 767px) {
	.kdp-wrap.kdp-has-image {
		gap: 18px;
	}

	.kdp-wrap.kdp-has-image > .kdp-media {
		width: var(--kdp-img-w-small, 100%);
		margin: 0 auto;
	}

	.kdp-wrap.kdp-has-image > .kdp-body {
		flex: 1 1 100%;
	}

	.kdp-heading {
		font-size: 1.35em;
	}
}
