/* srr-ads — front-end reports: [adreport] (advertiser report) and [adinventory].
 * Same look as the admin report screens. Everything is scoped to .srr-adr and
 * written to hold up inside any station theme (Bootstrap 4 + the theme's
 * content-link underlines). */

.srr-adr {
	--r-accent: #2563eb;
	--r-good: #16a34a;
	--r-bad: #dc2626;
	--r-card: #ffffff;
	--r-border: #e2e8f0;
	--r-text: #1e293b;
	--r-text-2: #64748b;
	--r-head: #f8fafc;
	--r-radius: 10px;
	--r-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	color: var(--r-text);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 24px;
}
.srr-adr *, .srr-adr *::before, .srr-adr *::after { box-sizing: border-box; }
.srr-adr .srr-adr-muted { color: var(--r-text-2); }

/* Cards */
.srr-adr .srr-adr-card {
	background: var(--r-card); border: 1px solid var(--r-border); border-radius: var(--r-radius);
	box-shadow: var(--r-shadow); padding: 20px; margin: 0 0 16px;
}
.srr-adr .srr-adr-card--flush { padding: 0; overflow: hidden; }
/* Station themes pad forms by ID (`#content form { padding: 15px 0 }`), which
   outranks a class. The password and ad-picker cards are forms, so their
   padding carries an ID-weight :not() to win without !important. */
.srr-adr form.srr-adr-card:not(#srr-adr-none) { padding: 20px; }
.srr-adr form.srr-adr-lock:not(#srr-adr-none) { padding: 28px 24px; }
.srr-adr form.srr-adr-picker:not(#srr-adr-none) { padding: 16px 20px; }

/* Buttons */
.srr-adr .srr-adr-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 42px; padding: 8px 18px; margin: 0;
	background: #fff; color: var(--r-text); border: 1px solid var(--r-border); border-radius: 8px;
	font: 600 15px/1.2 inherit; text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.srr-adr .srr-adr-btn:hover { background: #f1f5f9; color: var(--r-text); }
.srr-adr .srr-adr-btn--primary { background: var(--r-accent); border-color: var(--r-accent); color: #fff; }
.srr-adr .srr-adr-btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.srr-adr .srr-adr-btn:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }

/* Inputs */
.srr-adr input[type="password"],
.srr-adr select {
	width: 100%; min-height: 42px; margin: 0; padding: 8px 12px;
	background: #fff; color: var(--r-text); border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px;
}
.srr-adr input[type="password"]:focus,
.srr-adr select:focus { outline: none; border-color: var(--r-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

/* Password card */
.srr-adr .srr-adr-lock { max-width: 440px; margin: 8px auto 16px; text-align: center; padding: 28px 24px; }
.srr-adr .srr-adr-lock__icon { display: block; font-size: 26px; line-height: 1; margin-bottom: 8px; }
.srr-adr .srr-adr-lock__title { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--r-text); }
.srr-adr .srr-adr-lock p { margin: 0 0 16px; }
.srr-adr .srr-adr-lock__row { display: flex; gap: 8px; }
.srr-adr .srr-adr-lock__row input { flex: 1 1 auto; }
.srr-adr .srr-adr-error { margin: 12px 0 0 !important; padding: 8px 12px; border-radius: 8px; background: rgba(220, 38, 38, .08); color: #b91c1c; font-size: 14px; font-weight: 600; }

/* Ad picker */
.srr-adr .srr-adr-picker { padding: 16px 20px; }
.srr-adr .srr-adr-picker__label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--r-text-2); }
.srr-adr .srr-adr-picker__row { display: flex; gap: 8px; }
.srr-adr .srr-adr-picker__row select { flex: 1 1 auto; }

/* Report hero */
.srr-adr .srr-adr-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.srr-adr .srr-adr-hero__creative { flex: 0 1 auto; max-width: 100%; }
.srr-adr .srr-adr-hero__creative img { display: block; max-width: 100%; max-height: 180px; height: auto; border-radius: 4px; }
.srr-adr .srr-adr-hero__type { display: inline-block; padding: 18px 22px; border-radius: 8px; background: #f1f5f9; color: var(--r-text-2); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.srr-adr .srr-adr-hero__text { flex: 1 1 220px; min-width: 0; }
.srr-adr .srr-adr-hero__title { margin: 0 0 2px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--r-text); }
.srr-adr .srr-adr-hero__text p { margin: 0 0 8px; }

/* Pills */
.srr-adr .srr-adr-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.srr-adr .srr-adr-pill--running { background: rgba(22, 163, 74, .12); color: #15803d; }
.srr-adr .srr-adr-pill--scheduled { background: rgba(37, 99, 235, .1); color: #1d4ed8; }
.srr-adr .srr-adr-pill--ended { background: #f1f5f9; color: #475569; }
.srr-adr .srr-adr-pill--over { background: rgba(220, 38, 38, .1); color: #b91c1c; }

/* Section label */
.srr-adr .srr-adr-section { margin: 20px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--r-text-2); }

/* KPIs */
.srr-adr .srr-adr-kpis { display: grid; gap: 12px; margin: 0 0 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.srr-adr .srr-adr-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.srr-adr .srr-adr-kpis--1 { grid-template-columns: 1fr; }
.srr-adr .srr-adr-kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--r-card); border: 1px solid var(--r-border); border-radius: var(--r-radius); box-shadow: var(--r-shadow); }
.srr-adr .srr-adr-kpi__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--r-text-2); }
.srr-adr .srr-adr-kpi__value { font-size: 28px; font-weight: 800; line-height: 1.2; color: var(--r-text); font-variant-numeric: tabular-nums; }
.srr-adr .srr-adr-kpi__note { font-size: 12px; color: var(--r-text-2); }

/* Chart */
.srr-adr .srr-adr-chart { position: relative; height: 260px; }
.srr-adr .srr-adr-legend { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; color: var(--r-text-2); }
.srr-adr .srr-adr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 10px; }
.srr-adr .srr-adr-legend i:first-child { margin-left: 0; }
.srr-adr .srr-adr-legend i.is-imps { background: #2563eb; }
.srr-adr .srr-adr-legend i.is-clicks { background: #16a34a; }

/* Table */
.srr-adr .srr-adr-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; background: transparent; }
.srr-adr .srr-adr-table th,
.srr-adr .srr-adr-table td { padding: 10px 16px; border: 0; border-bottom: 1px solid var(--r-border); text-align: left; vertical-align: middle; font-size: 14px; color: var(--r-text); background: transparent; }
.srr-adr .srr-adr-table thead th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--r-text-2); background: var(--r-head); }
.srr-adr .srr-adr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.srr-adr .srr-adr-table tfoot th,
.srr-adr .srr-adr-table tfoot td { border-bottom: 0; background: var(--r-head); font-weight: 700; }
.srr-adr .srr-adr-table__empty { text-align: center !important; color: var(--r-text-2) !important; padding: 24px 16px !important; }
.srr-adr .srr-adr-empty { text-align: center; color: var(--r-text-2); }

/* Inventory */
.srr-adr .srr-adr-block__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px; background: var(--r-head); border-bottom: 1px solid var(--r-border); }
.srr-adr .srr-adr-block.is-over .srr-adr-block__head { background: rgba(220, 38, 38, .06); }
.srr-adr .srr-adr-block__head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--r-text); }
.srr-adr .srr-adr-block__meta { display: inline-flex; align-items: center; gap: 10px; }
.srr-adr .srr-adr-block__price { font-weight: 700; font-size: 14px; }
.srr-adr .srr-adr-block__list { list-style: none; margin: 0; padding: 0; }
.srr-adr .srr-adr-block__list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 10px 18px; border-bottom: 1px solid var(--r-border); font-size: 14px; }
.srr-adr .srr-adr-block__list li:last-child { border-bottom: 0; }
.srr-adr .srr-adr-block__list li.is-open { color: #15803d; font-weight: 600; background: rgba(22, 163, 74, .04); }

@media (max-width: 600px) {
	.srr-adr .srr-adr-kpis, .srr-adr .srr-adr-kpis--2 { grid-template-columns: 1fr; }
	.srr-adr .srr-adr-lock__row, .srr-adr .srr-adr-picker__row { flex-direction: column; }
	.srr-adr .srr-adr-chart { height: 220px; }
	.srr-adr .srr-adr-table th, .srr-adr .srr-adr-table td { padding: 9px 12px; }
}

/* The print window opened by the report's Print button */
.srr-adr-printpage { margin: 24px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #fff; }
.srr-adr-printpage .srr-adr-printhead { margin: 0 0 16px; font-size: 18px; text-align: center; }
.srr-adr-printpage .srr-adr-card, .srr-adr-printpage .srr-adr-kpi { box-shadow: none; break-inside: avoid; }
.srr-adr-printpage .srr-adr-chart { height: auto; }
@media print { .srr-adr-printpage { margin: 0; } }
