.udn-core {
	margin: 1.5em 0;
}

/* Extra breathing room above each section heading (e.g. "Manage Countries"
   on the Members page) — the theme's own default h2 margin reads too tight
   directly under whatever table/disclosure content ends the section above
   it. */
.udn-core h2 {
	margin-top: 2em;
}

.udn-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}

.udn-table th,
.udn-table td {
	border: 1px solid #ddd;
	padding: 0.5em 0.75em;
	text-align: left;
	vertical-align: top;
}

.udn-table th {
	background: #f5f5f5;
}

/* Scoped to the Introduction table specifically (not the Members roster or
   Countries management tables, which also share .udn-table) — matches the
   centered DEMOCRACY (Y/N) data cells already applied there. */
.udn-intro-table th {
	text-align: center;
}

.udn-table th a {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.udn-table th a:hover {
	text-decoration: underline;
}

.udn-dem-y {
	color: #146c2e;
	font-weight: bold;
}

.udn-vote-text {
	white-space: nowrap;
}

.udn-vote-detail summary {
	color: #1a5fb4;
	text-decoration: underline;
	cursor: pointer;
	list-style: none;
}

.udn-vote-detail summary::-webkit-details-marker {
	display: none;
}

.udn-vote-breakdown {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
	margin-top: 0.5em;
	/* The Vote cell itself (.udn-vote-cell) is center-aligned, which this
	   would otherwise inherit — left-align explicitly so the labels and
	   country-name lists read naturally rather than centered. */
	text-align: left;
}

.udn-vote-breakdown-label {
	font-size: 0.85em;
	font-weight: bold;
	margin: 0 0 0.25em;
}

.udn-vote-yes .udn-vote-breakdown-label {
	color: #146c2e;
}

.udn-vote-no .udn-vote-breakdown-label {
	color: #a3242a;
}

.udn-vote-breakdown ul {
	margin: 0;
	padding-left: 1.1em;
	font-size: 0.85em;
	color: #555;
}

@media screen and (max-width: 480px) {
	.udn-vote-breakdown {
		grid-template-columns: 1fr;
	}
}

.udn-dem-n {
	color: #a3242a;
	font-weight: bold;
}

.udn-dem-n-a {
	color: #666;
}

.udn-table td.udn-dem-y,
.udn-table td.udn-dem-n,
.udn-table td.udn-dem-n-a,
.udn-table td.udn-vote-cell {
	text-align: center;
}

/* Generic reusable class for a single Y/N-style data cell, used across
   different tables (the Members roster's Admin/Active columns, the
   Countries management table's Active column) rather than one-off classes
   per table. */
.udn-table td.udn-cell-center {
	text-align: center;
}

.udn-notice {
	padding: 0.75em 1em;
	border-radius: 4px;
	margin-bottom: 1em;
}

.udn-notice-success {
	background: #eaf7ea;
	border: 1px solid #b7dfb7;
	color: #146c2e;
}

.udn-notice-error {
	background: #fbeaea;
	border: 1px solid #f0b7b7;
	color: #a3242a;
}

.udn-notice-warning {
	background: #fdf6e3;
	border: 1px solid #edd58a;
	color: #7a5c00;
}

.udn-form label {
	display: block;
	margin-bottom: 0.5em;
}

/* Scoped to the Introduction table's year picker specifically: label and
   select sit inline on one line, rather than the generic .udn-form
   stacked-label layout above (which every other form on the site keeps
   using unchanged). */
.udn-year-form {
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex-wrap: wrap;
}

.udn-year-form label {
	display: inline;
	margin-bottom: 0;
	font-size: 1.15em;
	font-weight: bold;
}

.udn-year-form select {
	margin-top: 0;
}

.udn-form input[type="text"],
.udn-form input[type="password"],
.udn-form input[type="date"],
.udn-form input[type="url"],
.udn-form select,
.udn-form textarea {
	display: block;
	width: 100%;
	max-width: 360px;
	margin-top: 0.25em;
}

/* Login Name / Country / Password laid out as a 2-column grid: Login Name
   top-left, Country top-right, Password bottom-left under Login Name
   (relying on the browser's default grid auto-placement — items fill left
   to right, top to bottom — rather than named grid-column/grid-row rules,
   since that placement already matches the 3 labels' order in the markup).
   Collapses back to a single stacked column on narrow screens, matching
   every other form in the plugin. */
.udn-login-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 1.5em;
}

@media screen and (max-width: 480px) {
	.udn-login-grid {
		display: block;
	}
}

.udn-add-member,
.udn-add-country,
.udn-members-table details,
.udn-countries-table details,
.udn-forgot-password,
.udn-change-password {
	margin-top: 0.75em;
}

/* Manage Countries used to be an always-visible <h2> section; collapsed
   behind a <details> now since it's rarely touched (see
   templates/members-directory.php). Keeps roughly the same breathing room
   above it that the h2 used to have (.udn-core h2's margin-top: 2em,
   above), and gives its <summary> enough visual weight to still read as a
   real section header rather than a minor inline toggle like "Add new
   country" beneath it. */
.udn-manage-countries {
	margin-top: 2em;
}

.udn-manage-countries > summary {
	font-size: 1.2em;
	font-weight: bold;
	cursor: pointer;
}

.udn-voting-identity p {
	margin: 0 0 0.15em;
}

.udn-members-identity {
	margin-top: 2.5em;
	margin-bottom: 1.25em;
}

/* Hides the Elementor-authored "Apply for Membership" paragraph + accordion
   whenever a Member is logged in — see UDN_Auth::add_logged_in_body_class().
   Targets the widgets' own Elementor "ID" field (Advanced/General tab)
   rather than a CSS class: this site's Elementor version gates custom CSS
   classes/attributes behind Pro, but the plain ID field is free. */
body.udn-logged-in-member #udn-apply-membership-para,
body.udn-logged-in-member #udn-apply-membership-accordion {
	display: none;
}

.udn-members-identity p {
	margin: 0 0 0.15em;
}

.udn-voting-country {
	color: #666;
	font-size: 0.9em;
}

.udn-own-country {
	opacity: 0.55;
}

.udn-own-country-note {
	margin-left: 0.5em;
	font-size: 0.85em;
	color: #666;
	font-style: italic;
}

.udn-members-only {
	font-size: 1.2em;
	font-weight: bold;
}

.udn-status-bar {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 9999;
	background: rgba(30, 30, 30, 0.9);
	color: #fff;
	padding: 0.4em 0.9em;
	font-size: 0.85em;
	display: flex;
	align-items: center;
	gap: 0.75em;
	border-bottom-left-radius: 6px;
}

/* WordPress's own admin toolbar is also fixed at top:0 with a higher
   z-index (99999), which would otherwise sit on top of and completely
   hide this bar for anyone who's also logged into wp-admin while
   viewing the front end. Push down below it instead, matching WP
   core's own admin-bar height (32px desktop, 46px on its own <=782px
   breakpoint). */
body.admin-bar .udn-status-bar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .udn-status-bar {
		top: 46px;
	}
}

.udn-status-bar a {
	color: #fff;
	text-decoration: underline;
}

.udn-status-bar-name {
	white-space: nowrap;
}

.udn-status-bar-form {
	margin: 0;
	display: inline;
}

/* One block per pending membership claim (see
   templates/membership-claims-partial.php) — the field table plus its two
   action forms read as a single unit, with breathing room before the next
   claim's block starts. */
.udn-claim {
	margin-bottom: 2em;
}

/* Approve/Reject render as two small single-button forms rather than one
   shared form (each posts to a different admin-post action) — inline-block
   keeps them side by side instead of stacking as separate block-level
   forms would by default. */
.udn-claim-action {
	display: inline-block;
	margin-right: 0.5em;
}

.udn-status-bar-form button {
	background: none;
	border: 1px solid #fff;
	color: #fff;
	padding: 0.15em 0.6em;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9em;
}
