/* ─── Sidebar ad slot ──────────────────────────────────────────────────────
   .widget is added alongside .hgnews-ad-slot so it automatically matches
   the theme's existing sidebar card styling (Search, Recent Posts, etc.). */
.hgnews-ad-slot a {
	display: block;
}

.hgnews-ad-slot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-md, 8px);
}

/* ─── Dashboard card + form (front-end "My Ad" page) ────────────────────── */
.hgnews-ads-card,
.hgnews-ads-form {
	max-width: 480px;
	margin: 0 0 2em;
	padding: 1.5rem;
	border: 1px solid var(--border-color, #ccc);
	border-radius: var(--radius-md, 8px);
	background: var(--bg-card, transparent);
	color: var(--text-primary, inherit);
}

.hgnews-ads-card-title,
.hgnews-ads-form h3 {
	margin-top: 0;
}

.hgnews-ads-preview img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-md, 8px);
}

.hgnews-ads-actions {
	margin-top: 1rem;
	display: flex;
	gap: 0.5rem;
}

.hgnews-ads-field {
	margin: 0 0 1.25em;
}

.hgnews-ads-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4em;
}

.hgnews-ads-field .required {
	color: #d63638;
}

.hgnews-ads-form input[type="text"],
.hgnews-ads-form input[type="url"],
.hgnews-ads-form input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.75em;
	font-size: 1rem;
	border: 1px solid var(--border-color, #ccc);
	border-radius: 4px;
	background: var(--bg-input, transparent);
	color: inherit;
}

.hgnews-ads-submit button,
.hgnews-ads-actions button {
	padding: 0.6em 1.4em;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	background: var(--accent-primary, #2563eb);
	color: #fff;
}

.hgnews-ads-submit button:hover,
.hgnews-ads-actions button:hover {
	background: var(--accent-bright, #1d4ed8);
}

.hgnews-ads-notice {
	padding: 0.85em 1.1em;
	border-radius: 4px;
	margin: 0 0 1.5em;
	font-weight: 500;
}

.hgnews-ads-notice--success {
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.5);
	color: #15803d;
}

.hgnews-ads-notice--error {
	background: rgba(220, 38, 38, 0.12);
	border: 1px solid rgba(220, 38, 38, 0.5);
	color: #b91c1c;
}
