/* GreenRoom Production Dashboard */

/* Toast notifications */
.grbios-toast-container {
	position: fixed;
	bottom: 1.5em;
	right: 1.5em;
	z-index: 10000;
	display: flex;
	flex-direction: column-reverse;
	gap: 0.5em;
	max-width: 400px;
}

.grbios-toast {
	padding: 0.75em 2.5em 0.75em 1em;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.4;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s;
	position: relative;
}

.grbios-toast--visible {
	opacity: 1;
	transform: translateY(0);
}

.grbios-toast--success {
	background: #3b7e30;
}

.grbios-toast--error {
	background: #c0392b;
}

.grbios-toast--info {
	background: #2c3e50;
}

.grbios-toast-close {
	position: absolute;
	top: 0.4em;
	right: 0.5em;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.grbios-toast-close:hover {
	color: #fff;
}

@media (max-width: 600px) {
	.grbios-toast-container {
		left: 1em;
		right: 1em;
		max-width: none;
	}
}

.grbios-production {
	max-width: 900px;
	margin: 2em auto;
	padding: 0 1em;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grbios-production h1 {
	margin-bottom: 0.25em;
}

.grbios-production-meta {
	color: #666;
	margin-bottom: 2em;
}

.grbios-production-meta span {
	margin-right: 1.5em;
}

/* Status bar */
.grbios-production-status {
	background: #f0f6fc;
	border: 1px solid #c8d6e5;
	border-radius: 6px;
	padding: 1em 1.5em;
	margin-bottom: 2em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1em;
}

.grbios-production-status-text {
	font-size: 1.1em;
}

.grbios-production-status-text strong {
	font-size: 1.3em;
}

.grbios-production-progress {
	flex: 1;
	min-width: 200px;
	max-width: 300px;
	height: 10px;
	background: #dde4eb;
	border-radius: 5px;
	overflow: hidden;
}

.grbios-production-progress-bar {
	height: 100%;
	background: #3b7e30;
	border-radius: 5px;
	transition: width 0.3s ease;
}

/* Actions bar */
.grbios-production-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 2em;
}

.grbios-production-actions button,
.grbios-production-actions .grbios-btn {
	padding: 0.5em 1em;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 0.9em;
	text-decoration: none;
	color: #333;
}

.grbios-production-actions button:hover,
.grbios-production-actions .grbios-btn:hover {
	background: #f5f5f5;
}

.grbios-production-actions .grbios-btn-primary {
	background: #3b7e30;
	border-color: #3b7e30;
	color: #fff;
}

.grbios-production-actions .grbios-btn-primary:hover {
	background: #2d6324;
}

.grbios-production-actions .grbios-btn--active {
	background: #e8f0e6;
	border-color: #3b7e30;
}

.grbios-production-actions .grbios-btn--active.grbios-btn-primary {
	background: #2d6324;
}

.grbios-production-table .grbios-row-actions .grbios-resend-invite {
	margin-right: 0.75em;
}

/* Notice */
.grbios-production-notice {
	padding: 0.75em 1em;
	border-radius: 4px;
	margin-bottom: 1.5em;
}

.grbios-production-notice--success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.grbios-production-notice--error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.grbios-production-notice--info {
	background: #f0f6fc;
	border: 1px solid #c8d6e5;
	color: #1e3a5f;
}

/* Add person form */
.grbios-production-add-form {
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.5em;
	margin-bottom: 2em;
	display: none;
}

.grbios-production-add-form.active {
	display: block;
}

.grbios-production-add-form h3 {
	margin-top: 0;
}

.grbios-production-add-form .grbios-form-row {
	display: flex;
	gap: 1em;
	margin-bottom: 1em;
	flex-wrap: wrap;
}

.grbios-production-add-form .grbios-form-field {
	flex: 1;
	min-width: 150px;
}

.grbios-form-field-short {
	flex: 0 0 80px;
}

.grbios-production-add-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25em;
	font-size: 0.9em;
}

.grbios-production-add-form input,
.grbios-production-add-form select {
	width: 100%;
	padding: 0.5em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
}

.grbios-production-add-form .grbios-form-actions {
	display: flex;
	gap: 0.5em;
}

/* CSV import */
.grbios-production-csv-form {
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.5em;
	margin-bottom: 2em;
	display: none;
}

.grbios-production-csv-form.active {
	display: block;
}

/* People autocomplete */
.grbios-form-field--ac {
	position: relative;
}

.grbios-ac-list {
	display: none;
	position: absolute;
	z-index: 100;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 200px;
	overflow-y: auto;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.grbios-ac-item {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.4;
	border-bottom: 1px solid #f0f0f0;
}

.grbios-ac-item:last-child {
	border-bottom: none;
}

.grbios-ac-item:hover {
	background: #f0f7fb;
}

.grbios-ac-email {
	color: #888;
}

/* Bulk action bar */
.grbios-production-bulk {
	background: #f0f6fc;
	border: 1px solid #c8d6e5;
	border-radius: 4px;
	padding: 0.6em 1em;
	margin-bottom: 1em;
	font-size: 0.95em;
	color: #1e3a5f;
}

.grbios-link-btn {
	background: none;
	border: none;
	color: #2271b1;
	cursor: pointer;
	padding: 0;
	font-size: inherit;
	text-decoration: none;
}

.grbios-link-btn:hover {
	text-decoration: underline;
}

.grbios-link-btn.grbios-remove {
	color: #d63638;
}

/* People table */
.grbios-production-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2em;
}

.grbios-production-table th,
.grbios-production-table td {
	padding: 0.6em 0.75em;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.grbios-production-table th {
	background: #f8f8f8;
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #555;
	border-bottom: 2px solid #ddd;
}

.grbios-production-table tr:hover {
	background: #fafafa;
}

.grbios-status {
	font-size: 13px;
}

.grbios-status--submitted {
	color: #2ea043;
	font-weight: 600;
}

.grbios-status--pending {
	color: #bf8700;
	font-weight: 600;
}

.grbios-status--not-invited {
	color: #999;
	font-style: italic;
}

.grbios-production-table .grbios-row-actions {
	white-space: nowrap;
	position: relative;
}

.grbios-production-table .grbios-row-actions a,
.grbios-production-table .grbios-row-actions button {
	background: none;
	border: none;
	color: #2271b1;
	cursor: pointer;
	padding: 0;
	font-size: inherit;
	text-decoration: none;
}

.grbios-production-table .grbios-row-actions a:hover,
.grbios-production-table .grbios-row-actions button:hover {
	text-decoration: underline;
}

.grbios-production-table .grbios-row-actions .grbios-remove {
	color: #d63638;
}

.grbios-production-table .grbios-row-actions .grbios-separator {
	color: #ccc;
	margin: 0 0.25em;
}

/* Row action overflow menu */
.grbios-action-menu {
	display: inline-block;
	position: relative;
}

.grbios-action-menu-toggle {
	background: none;
	border: 1px solid #ccc;
	border-radius: 3px;
	cursor: pointer;
	padding: 0.1em 0.5em;
	font-size: 16px;
	line-height: 1;
	color: #555;
}

.grbios-action-menu-toggle:hover {
	background: #f0f0f0;
	text-decoration: none !important;
}

.grbios-action-menu-dropdown {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 2px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
	min-width: 140px;
	z-index: 50;
	padding: 4px 0;
}

.grbios-action-menu.grbios-open .grbios-action-menu-dropdown {
	display: block;
}

.grbios-action-menu-dropdown button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 6px 12px !important;
	font-size: 13px;
	white-space: nowrap;
}

.grbios-action-menu-dropdown button:hover {
	background: #f0f6fc;
	text-decoration: none !important;
}

/* Export panel */
.grbios-production-export {
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.5em;
	margin-bottom: 2em;
	display: none;
}

.grbios-production-export.active {
	display: block;
}

.grbios-production-export h3 {
	margin-top: 0;
}

.grbios-production-export .grbios-export-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

/* Section headers */
.grbios-production-section-header {
	margin-bottom: 0.5em;
}

.grbios-production-section-header h2 {
	margin: 0 0 0.25em;
}

.grbios-status-legend {
	font-size: 13px;
	color: #666;
	margin: 0.25em 0 0;
}

/* People sections */
.grbios-people-section {
	margin-bottom: 2em;
}

.grbios-section-heading {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 0.5em;
	padding-bottom: 0.3em;
	border-bottom: 2px solid #3b7e30;
	color: #333;
}

.grbios-section-count {
	font-weight: 400;
	color: #888;
	font-size: 0.9em;
}

.grbios-section-heading--withdrawn {
	border-bottom-color: #999;
	color: #666;
}

.grbios-withdrawn-section .grbios-production-table td {
	color: #888;
}

.grbios-row-actions .grbios-withdraw-person,
.grbios-row-actions .grbios-change-designation {
	color: #2271b1;
}

.grbios-drag-hint {
	font-size: 13px;
	color: #888;
	font-style: italic;
	margin: 0.5em 0 1.25em;
}

.grbios-col-roles {
	color: #555;
	font-size: 0.92em;
}

/* Inline editing */
.grbios-editable {
	cursor: pointer;
	border-radius: 3px;
	transition: background 0.15s;
}

.grbios-editable:hover {
	background: #f0f6fc;
}

.grbios-editable.grbios-editing {
	background: none;
	cursor: default;
}

.grbios-editable-name.grbios-editing {
	display: flex;
	gap: 0.3em;
	align-items: center;
}

.grbios-inline-input {
	font: inherit;
	padding: 0.2em 0.6em;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	width: 6em;
	box-sizing: border-box;
}

.grbios-inline-input:focus {
	border-color: #3b7e30;
	outline: none;
	box-shadow: 0 0 0 1px #3b7e30;
}

.grbios-inline-input--wide {
	width: 100%;
}

/* Drag-and-drop reordering */
.grbios-drag-handle {
	cursor: grab;
	color: #aaa;
	font-size: 16px;
	text-align: center;
	user-select: none;
	-webkit-user-select: none;
}

.grbios-drag-handle:hover {
	color: #666;
}

.grbios-production-table tr.grbios-dragging {
	opacity: 0.4;
	background: #f0f6fc;
}

.grbios-production-table tr.grbios-drag-over {
	border-top: 2px solid #3b7e30;
}

.grbios-production-table tr[draggable="true"]:active .grbios-drag-handle {
	cursor: grabbing;
}

/* ── Responsive: tablet (≤ 768px) ─────────────────────────────── */
@media (max-width: 768px) {
	.grbios-production-actions {
		flex-direction: column;
	}

	.grbios-production-actions button,
	.grbios-production-actions .grbios-btn {
		width: 100%;
		text-align: center;
	}

	.grbios-status-legend span {
		display: block;
		margin-bottom: 0.25em;
	}

	/* Card layout for people tables — !important overrides theme table resets */
	.grbios-production .grbios-production-table,
	.grbios-production .grbios-production-table thead,
	.grbios-production .grbios-production-table tbody,
	.grbios-production .grbios-production-table tr,
	.grbios-production .grbios-production-table th,
	.grbios-production .grbios-production-table td {
		display: block !important;
		width: auto !important;
		float: none !important;
	}

	.grbios-production .grbios-production-table {
		border: none !important;
	}

	.grbios-production .grbios-production-table thead {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		overflow: hidden !important;
		clip: rect(0, 0, 0, 0) !important;
		white-space: nowrap !important;
	}

	.grbios-production .grbios-production-table tr {
		background: #fff;
		border: 1px solid #ddd !important;
		border-radius: 6px;
		margin-bottom: 0.75em;
		padding: 0.75em;
		position: relative;
	}

	.grbios-production .grbios-production-table tr:hover {
		background: #fff;
	}

	.grbios-production .grbios-production-table td {
		border: none !important;
		border-bottom: none !important;
		padding: 0.3em 0 !important;
		text-align: left !important;
	}

	/* Data labels */
	.grbios-production .grbios-production-table td[data-label]::before {
		content: attr(data-label);
		display: inline-block;
		font-weight: 600;
		font-size: 0.8em;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		color: #888;
		width: 5em;
		margin-right: 0.5em;
		flex-shrink: 0;
	}

	.grbios-production .grbios-production-table td[data-label] {
		display: flex !important;
		align-items: baseline;
	}

	/* Checkbox — top-left corner of card */
	.grbios-production .grbios-production-table td.grbios-col-cb {
		display: block !important;
		position: absolute;
		top: 0.75em;
		left: 0.75em;
		padding: 0 !important;
	}

	/* Drag handle — top-right corner of card */
	.grbios-production .grbios-production-table td.grbios-drag-handle {
		display: block !important;
		position: absolute;
		top: 0.6em;
		right: 0.75em;
		padding: 0 !important;
		font-size: 20px;
	}

	/* Name is the card "title" */
	.grbios-production .grbios-production-table td.grbios-col-name {
		font-weight: 600;
		font-size: 1.05em;
		padding: 0 2em 0.3em 1.75em !important;
		display: block !important;
	}

	.grbios-production .grbios-production-table td.grbios-col-name::before {
		display: none;
	}

	/* Status — right-aligned badge beside the name */
	.grbios-production .grbios-production-table td.grbios-col-status {
		display: block !important;
		position: absolute;
		top: 2.6em;
		right: 0.75em;
		padding: 0 !important;
	}

	.grbios-production .grbios-production-table td.grbios-col-status::before {
		display: none;
	}

	/* Email — truncate on small screens */
	.grbios-production .grbios-production-table td.grbios-col-email {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Actions row — full width at bottom */
	.grbios-production .grbios-production-table td.grbios-row-actions {
		display: flex !important;
		align-items: center;
		gap: 0.75em;
		padding-top: 0.5em !important;
		margin-top: 0.25em;
		border-top: 1px solid #eee !important;
	}

	.grbios-production .grbios-production-table td.grbios-row-actions::before {
		display: none;
	}

	/* Withdrawn table — no checkbox/drag so name doesn't need indent */
	.grbios-withdrawn-section .grbios-production-table td.grbios-col-name {
		padding-left: 0 !important;
	}

	/* Drag hint hidden on mobile — no drag reorder on touch */
	.grbios-drag-hint {
		display: none !important;
	}

	/* Bulk bar wraps nicely */
	.grbios-production-bulk {
		font-size: 0.85em;
	}

	.grbios-production-bulk button {
		display: inline;
		margin-left: 0.5em;
	}
}

/* ── Responsive: phone (≤ 600px) ──────────────────────────────── */
@media (max-width: 600px) {
	.grbios-production {
		padding: 0 0.5em;
		margin: 1em auto;
	}

	.grbios-production h1 {
		font-size: 1.4em;
	}

	.grbios-production-meta {
		font-size: 0.9em;
	}

	.grbios-production-meta span {
		display: block;
		margin-right: 0;
		margin-bottom: 0.25em;
	}

	.grbios-production-status {
		flex-direction: column;
		align-items: stretch;
		padding: 0.75em 1em;
	}

	.grbios-production-progress {
		max-width: none;
	}

	.grbios-production-add-form .grbios-form-row {
		flex-direction: column;
	}

	.grbios-production-add-form,
	.grbios-production-csv-form,
	.grbios-production-export {
		padding: 1em;
	}

	.grbios-export-options {
		flex-direction: column;
	}

	.grbios-export-options .grbios-btn {
		width: 100%;
		text-align: center;
	}

	/* Tighter cards on phone */
	.grbios-production .grbios-production-table tr {
		padding: 0.6em;
	}

	.grbios-production .grbios-production-table td.grbios-col-cb {
		top: 0.6em;
		left: 0.6em;
	}

	.grbios-production .grbios-production-table td.grbios-drag-handle {
		top: 0.5em;
		right: 0.6em;
	}

	.grbios-production .grbios-production-table td.grbios-col-status {
		top: 2.3em;
		right: 0.6em;
	}
}
