/**
 * Employer Dashboard — Widget styles.
 *
 * Stats cards, company profile preview, logo upload field, notification
 * bell, credit banners.
 *
 * Extracted from style.css (was 1774 LOC) per the upscale stabilization
 * plan (plan/upscale-stabilization-plan-2026-05-07.md F4 / Task 5.1).
 * Tokens are inherited from frontend-tokens.css via cascade — no
 * duplication.
 *
 * @package WP_Career_Board
 * @since   1.2.2
 */

/* -- Company profile -- */
.wcb-profile-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
	gap: var(--wcb-space-2xl);
}

/*
 * Stack form / live preview vertically when the panel container is too narrow
 * for the side-by-side layout — this triggers on Reign-with-sidebar pages
 * (~610px panel) and on tablet / mobile widths. Without this, the form column
 * collapses to a hostile ~200px and every input becomes unusable.
 */
@container wcb-panel (max-width: 880px) {

	.wcb-profile-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.wcb-logo-placeholder {
	width: 64px;
	height: 64px;
	border: 2px dashed var(--wcb-text-tertiary);
	border-radius: var(--wcb-radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--wcb-text-base);
	color: var(--wcb-text-secondary);
	cursor: default;
	opacity: 0.55;
	margin-bottom: var(--wcb-space-lg);
}

.wcb-logo-caption {
	font-size: var(--wcb-text-base);
	color: var(--wcb-text-secondary);
	margin: 0 0 var(--wcb-space-lg);
}

.wcb-preview-card {
	background: var(--wcb-base);
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius-lg);
	padding: var(--wcb-space-xl);
	height: fit-content;
}

.wcb-preview-title {
	font-size: var(--wcb-text-base);
	font-weight: var(--wcb-font-bold);
	color: var(--wcb-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin: 0 0 var(--wcb-space-lg);
}

.wcb-preview-name {
	font-size: var(--wcb-text-md);
	font-weight: var(--wcb-font-bold);
	color: var(--wcb-contrast);
	margin: 0 0 var(--wcb-space-xs);
}

.wcb-preview-tagline {
	font-size: var(--wcb-text-base);
	color: var(--wcb-text-secondary);
	margin: 0;
}

.wcb-preview-desc {
	font-size: var(--wcb-text-base);
	color: var(--wcb-contrast);
	margin-top: var(--wcb-space-sm);
}

.wcb-preview-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wcb-space-xs);
	margin-top: var(--wcb-space-md);
}

.wcb-preview-chip {
	display: inline-block;
	background: var(--wcb-bg-hover);
	font-size: var(--wcb-text-base);
	color: var(--wcb-text-secondary);
	padding: 2px var(--wcb-space-sm);
	border-radius: var(--wcb-radius-full);
}

/* No-company empty state */
.wcb-no-company {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--wcb-space-4xl);
	text-align: center;
	color: var(--wcb-text-secondary);
}

/* -- Logo upload field -- */
.wcb-logo-field {
	display: flex;
	align-items: center;
	gap: var(--wcb-space-md);
}

.wcb-logo-current {
	display: none;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--wcb-radius-md);
	border: 1px solid var(--wcb-border);
}

.wcb-logo-current.wcb-shown {
	display: block;
}

.wcb-logo-input {
	display: none;
}

.wcb-logo-upload-label {
	display: inline-flex;
	align-items: center;
	gap: var(--wcb-space-sm);
	padding: var(--wcb-space-sm) var(--wcb-space-md);
	border: 1px solid var(--wcb-border);
	border-radius: var(--wcb-radius-sm);
	font-size: var(--wcb-text-sm);
	font-weight: var(--wcb-font-medium);
	color: var(--wcb-contrast);
	background: var(--wcb-base);
	cursor: pointer;
	transition: border-color var(--wcb-transition-fast);
}

.wcb-logo-upload-label:hover {
	border-color: var(--wcb-primary);
	color: var(--wcb-primary);
}

.wcb-preview-logo-img {
	display: none;
	width: var(--wcb-space-4xl);
	height: var(--wcb-space-4xl);
	object-fit: cover;
	border-radius: var(--wcb-radius-sm);
	margin-bottom: var(--wcb-space-md);
}

.wcb-preview-logo-img.wcb-shown {
	display: block;
}

/* Notifications tab styles live in assets/css/wcb-ui.css (shared). */

/*
 * Credits banners — success (post-purchase) and low-balance warning. Hidden
 * by default; the .wcb-shown class toggle is bound by the Interactivity API.
 */
.wcb-credit-success-banner,
.wcb-credit-low-banner {
	display: none;
	align-items: center;
	gap: var(--wcb-space-md);
	padding: var(--wcb-space-md) var(--wcb-space-lg);
	border-radius: var(--wcb-radius-xl);
	margin-bottom: var(--wcb-space-lg);
	font-size: var(--wcb-text-base);
	border: 1px solid;
}

.wcb-credit-success-banner.wcb-shown,
.wcb-credit-low-banner.wcb-shown {
	display: flex;
}

.wcb-credit-success-banner {
	background: var(--wcb-success-bg);
	border-color: var(--wcb-success);
	color: var(--wcb-success-fg, var(--wcb-contrast));
}

.wcb-credit-low-banner {
	background: var(--wcb-warn-bg, #fff7ed);
	border-color: var(--wcb-warning, #fb923c);
	color: var(--wcb-contrast);
}

.wcb-credit-banner__icon {
	font-size: var(--wcb-text-lg);
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

.wcb-credit-banner__icon svg {
	width: 18px;
	height: 18px;
}

.wcb-credit-banner__text {
	flex: 1;
}

.wcb-credit-banner__link {
	font-weight: var(--wcb-font-semibold);
	color: var(--wcb-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wcb-credit-banner__dismiss {
	background: transparent;
	border: 0;
	font-size: var(--wcb-text-xl);
	line-height: 1;
	color: inherit;
	opacity: 0.7;
	cursor: pointer;
	padding: 0 var(--wcb-space-xs);
}

.wcb-credit-banner__dismiss:hover {
	opacity: 1;
}


@media (max-width: 1024px) {
	.wcb-profile-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.wcb-credit-success-banner,
	.wcb-credit-low-banner {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcb-logo-upload-label {
		transition: none;
	}
}
