/**
 * Branch Console dashboard styles. Scoped under .branches-dash. Button states are
 * pinned (default/hover/focus/active) because Hello Elementor's reset repaints
 * focused buttons — same defensive reason as the onboarding buttons.
 */

.branches-dash {
	max-width: 1040px;
	margin: 0 auto;
	padding: 8px 16px 48px;
	color: #1a1a2e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.branches-dash * {
	box-sizing: border-box;
}

/* Header */
.branches-dash-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 8px 0 20px;
	border-bottom: 1px solid #ececf3;
	margin-bottom: 24px;
}

.branches-dash-head h1 {
	margin: 0;
	font-size: 26px;
	line-height: 1.2;
}

.branches-dash-sub {
	margin: 4px 0 0;
	color: #6b6b80;
	font-size: 14px;
}

/* Sections */
.branches-dash-section {
	margin-bottom: 32px;
}

.branches-dash-section > h2 {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
}

.branches-dash-note {
	font-weight: 400;
	font-size: 13px;
	color: #9a9aae;
	margin-left: 6px;
}

.branches-dash-empty {
	color: #9a9aae;
	font-size: 14px;
	margin: 0;
}

/* Insight tiles */
.branches-dash-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}

.branches-dash-tile {
	background: #f7f7fb;
	border: 1px solid #ececf3;
	border-radius: 12px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.branches-dash-tile-val {
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.branches-dash-tile-label {
	font-size: 12px;
	color: #6b6b80;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Post grids */
.branches-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.branches-dash-post {
	border: 1px solid #ececf3;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.branches-dash-post img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.branches-dash-post-body {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.branches-dash-post-body p {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: #33334d;
}

.branches-dash-post-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: #6b6b80;
	margin-top: auto;
}

.branches-dash-post-meta a {
	margin-left: auto;
	color: #2d6cdf;
	text-decoration: none;
	font-weight: 600;
}

/* Approval queue */
.branches-dash-queue {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.branches-dash-card {
	border: 1px solid #ececf3;
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(20, 20, 50, 0.04);
}

.branches-dash-card.is-done {
	opacity: 0.72;
}

.branches-dash-card > img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.branches-dash-caption {
	border: none;
	border-bottom: 1px solid #ececf3;
	resize: vertical;
	padding: 12px;
	font: inherit;
	font-size: 13px;
	line-height: 1.4;
	width: 100%;
}

.branches-dash-caption:focus {
	outline: 2px solid #cddafc;
	outline-offset: -2px;
}

.branches-dash-channels {
	display: flex;
	gap: 16px;
	padding: 12px;
	font-size: 13px;
}

.branches-dash-channels label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.branches-dash-card-actions {
	display: flex;
	gap: 8px;
	padding: 0 12px 12px;
}

/* Buttons — every state pinned so Hello Elementor's reset can't repaint them */
.branches-dash .branches-dash-btn,
.branches-dash .branches-dash-btn:link,
.branches-dash .branches-dash-btn:visited,
.branches-dash .branches-dash-btn:hover,
.branches-dash .branches-dash-btn:focus,
.branches-dash .branches-dash-btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #2d6cdf;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 10px 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease;
}

.branches-dash .branches-dash-btn:hover,
.branches-dash .branches-dash-btn:focus {
	background: #1f57c2;
}

.branches-dash .branches-dash-btn[disabled] {
	background: #a9bde8;
	cursor: default;
}

.branches-dash .branches-dash-approve {
	flex: 1;
}

.branches-dash .branches-dash-btn-ghost,
.branches-dash .branches-dash-btn-ghost:link,
.branches-dash .branches-dash-btn-ghost:visited,
.branches-dash .branches-dash-btn-ghost:hover,
.branches-dash .branches-dash-btn-ghost:focus,
.branches-dash .branches-dash-btn-ghost:active {
	background: #fff;
	color: #33334d;
	border: 1px solid #d6d6e2;
}

.branches-dash .branches-dash-btn-ghost:hover,
.branches-dash .branches-dash-btn-ghost:focus {
	background: #f2f2f8;
}

/* Publish status */
.branches-dash-status {
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.5;
	border-top: 1px solid #ececf3;
	word-break: break-word;
}

.branches-dash-status.is-ok {
	color: #1f7a4d;
	background: #f0faf4;
}

.branches-dash-status.is-err {
	color: #b02a37;
	background: #fdf2f3;
}

.branches-dash-status a {
	color: #2d6cdf;
}

/* Locked / error view */
.branches-dash-locked {
	max-width: 460px;
	margin: 48px auto;
	text-align: center;
	padding: 32px 24px;
	border: 1px solid #ececf3;
	border-radius: 14px;
	background: #fff;
}

.branches-dash-locked h2 {
	margin: 0 0 10px;
	font-size: 20px;
}

.branches-dash-locked p {
	margin: 0 0 20px;
	color: #6b6b80;
}

@media (max-width: 600px) {
	.branches-dash-head h1 {
		font-size: 22px;
	}
}
