/**
 * Promos Options page.
 *
 * Palette is derived from the theme's own accent, #f50649. White text on that
 * exact value reaches only 4.2:1, short of the WCAG AA minimum of 4.5:1, so
 * interactive elements use #e90645 - the same hue, 5% darker, measuring 4.59:1.
 *
 * All selectors are scoped to .das-wrap. The previous version styled bare h2
 * and h3, which leaked into the surrounding admin screen.
 */

.das-wrap {
	--promos-accent: #e90645;
	--promos-accent-dark: #c30539;
	--promos-ink: #23282d;
	--promos-body: #4c4f53;
	--promos-rule: #d9d9d9;

	margin: 20px 15px;
	padding: 30px;
	background: #fff;
	box-shadow: 0 0 10px 0 rgba( 183, 192, 206, 0.7 );
	border-radius: 8px;
	color: var( --promos-body );
}

.appearance_page_promos-theme .wrap,
.appearance_page_promos-theme .promos-panel {
	font-size: 16px;
}

.das-wrap .promos-panel {
	padding: 30px 0;
	border-bottom: 1px solid var( --promos-rule );
}

.das-wrap .promos-panel:last-child {
	border-bottom: 0;
}

/* Clear the floated upgrade button so panels cannot overlap. */
.das-wrap .promos-panel::after {
	content: "";
	display: table;
	clear: both;
}

.das-wrap .promos-logo {
	max-width: 200px;
	margin: 0;
	display: inline-block;
}

.das-wrap .promos-logo img {
	max-width: 100%;
	height: auto;
}

/* Shown when about/images/promos-logo.png is not present. */
.das-wrap .ts-logo-text {
	display: inline-block;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --promos-ink );
	line-height: 1.2;
}

.das-wrap .pull-right {
	float: right;
}

/* ---------------------------------------------------------------- Buttons */

.das-wrap .btn {
	display: inline-block;
	padding: .95rem 1.5rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.2;
	border: 2px solid transparent;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.das-wrap .btn-primary,
.das-wrap .btn-success {
	background: var( --promos-accent );
	color: #fff;
	border-color: transparent;
}

.das-wrap .btn-primary:hover,
.das-wrap .btn-primary:focus,
.das-wrap .btn-success:hover,
.das-wrap .btn-success:focus {
	background: var( --promos-accent-dark );
	color: #fff;
}

.das-wrap .btn-secondary {
	background: #fff;
	color: var( --promos-ink );
	border-color: #dedede;
}

.das-wrap .btn-secondary:hover,
.das-wrap .btn-secondary:focus {
	background: #fff;
	color: var( --promos-accent-dark );
	border-color: var( --promos-accent );
}

/*
 * A visible focus ring on every interactive element. The old rules only
 * swapped the background on :focus, which keyboard users cannot rely on.
 */
.das-wrap a:focus,
.das-wrap .btn:focus,
.das-wrap .btn:focus-visible {
	outline: 2px solid var( --promos-accent-dark );
	outline-offset: 2px;
}

/* ------------------------------------------------------------ Typography */

.das-wrap .theme-title {
	margin-bottom: 1rem;
}

/*
 * A real scale. h3 previously resolved to 0.8em, which rendered the section
 * headings smaller than the body copy beneath them.
 */
.das-wrap h2 {
	color: var( --promos-ink );
	font-size: 24px;
	line-height: 1.3;
	margin: 0 0 .6em;
}

.das-wrap h3 {
	color: var( --promos-ink );
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 .6em;
}

.das-wrap .promos-panel p {
	font-size: 17px;
	line-height: 1.6;
	margin-bottom: 2rem;
	max-width: 65ch;
}

/* The affiliate disclosure. Was display:flex on a span, which fought the text flow. */
.das-wrap .promos-panel span {
	display: block;
	font-size: 13px;
	line-height: 1.6;
	font-style: italic;
	color: #6b7075;
	margin: 10px 0 1.5rem;
	max-width: 65ch;
}

/* ------------------------------------------------------------ Responsive */

@media screen and ( max-width: 782px ) {

	.das-wrap {
		margin: 10px 0;
		padding: 20px;
	}

	.das-wrap .pull-right {
		float: none;
		display: block;
		margin-top: 1rem;
	}

	.das-wrap .promos-panel p,
	.das-wrap .promos-panel span {
		max-width: none;
	}
}
