/**
 * Front-end slot styling. Deliberately small — a slot is a box that holds
 * whatever the advertiser supplied, and the theme owns everything around it.
 */

.bizads-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 16px auto;
	max-width: 100%;
	overflow: hidden;
}

.bizads-creative {
	max-width: 100%;
	line-height: 0;
}

.bizads-link {
	display: inline-block;
	max-width: 100%;
	text-decoration: none;
}

/* Images scale down but never up: an advertiser who supplies a 300px creative
   for a 728px slot should get a small ad, not a blurry one. */
.bizads-img {
	display: block;
	height: auto;
	max-width: 100%;
}

.bizads-text {
	display: block;
	line-height: 1.4;
	padding: 12px 16px;
	text-align: left;
}

.bizads-headline {
	display: block;
	font-size: 15px;
}

.bizads-copy {
	display: block;
	font-size: 13px;
	opacity: 0.85;
}

/* A rotation should register as a change without drawing attention away from
   the results the visitor actually came for. */
.bizads-creative {
	animation: bizads-fade 240ms ease-out;
}

@keyframes bizads-fade {
	from { opacity: 0.35; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.bizads-creative {
		animation: none;
	}
}

/* ------------------------------------------------------- order form + receipt */

.bizads-order,
.bizads-receipt {
	max-width: 640px;
}

.bizads-order label,
.bizads-receipt th {
	font-weight: 600;
}

.bizads-order input[type="text"],
.bizads-order input[type="url"],
.bizads-order input[type="email"],
.bizads-order input[type="date"],
.bizads-order input[type="number"],
.bizads-order select {
	max-width: 100%;
	padding: 6px 8px;
}

.bizads-order fieldset {
	border: 1px solid currentColor;
	border-radius: 4px;
	margin: 16px 0;
	opacity: 0.999; /* keeps the border colour from inheriting a faded parent */
	padding: 12px 16px;
}

.bizads-btn {
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	padding: 10px 20px;
}

.bizads-error {
	border-left: 4px solid #b32d2e;
	margin: 12px 0;
	padding: 10px 14px;
}

.bizads-note {
	margin: 12px 0;
	opacity: 0.85;
}

.bizads-summary,
.bizads-report {
	border-collapse: collapse;
	margin: 12px 0;
	width: 100%;
}

.bizads-summary th,
.bizads-summary td,
.bizads-report th,
.bizads-report td {
	border-bottom: 1px solid rgba(128, 128, 128, 0.3);
	padding: 8px 10px;
	text-align: left;
}

.bizads-report td:not(:first-child),
.bizads-report th:not(:first-child) {
	text-align: right;
}

/* A report table must never push the page sideways on a phone. */
.bizads-receipt {
	overflow-x: auto;
}

/* ------------------------------------------------------------------ labelling */

/* Once slots sit between results instead of in an obvious banner strip, position
   alone no longer tells a reader what is paid. The label is markup, not a CSS
   ::before, so it translates — this only styles it. */
.bizads-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9ca3af;
    text-align: center;
}

/* --------------------------------------------------------------- interleaving */

/* A slot dropped into a card grid takes one card's cell rather than spanning the
   row. Spanning would be closer to how the source paces its ads, but the column
   count is responsive — 3, then 2, then 1 — and the server cannot know it, so a
   full-width break would leave a hole in the row wherever it happened to land. One
   cell is correct at every breakpoint. */
.bizads-slot--inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.bizads-slot--inline img { max-width: 100%; height: auto; }

/* In prose the slot is centred with room to breathe, the way a reader expects an
   ad break to sit between paragraphs. */
.bizads-slot--incontent {
    display: block;
    margin: 28px auto;
    text-align: center;
}

.bizads-slot--incontent img { max-width: 100%; height: auto; }
