/* GreenRoom Public Styles */

/* Submission page — renders inside the active theme */
.grbios-submission-page {
	color: #333;
	padding: 20px 0;
}

.grbios-container {
	max-width: 700px;
	margin: 0 auto;
	padding: 30px;
}

.grbios-container h1 {
	margin: 0 0 5px;
	font-size: 24px;
}

.grbios-container h2 {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 400;
	color: #666;
}

.grbios-role-info {
	color: #888;
	margin-bottom: 20px;
}

/* Fields */
.grbios-field {
	margin-bottom: 24px;
}

.grbios-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.grbios-field-desc {
	font-size: 13px;
	color: #666;
	margin: 0 0 8px;
}

.grbios-field textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	box-sizing: border-box;
}

.grbios-field textarea:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

.grbios-field textarea[readonly] {
	background: #f5f5f5;
	color: #666;
}

/* Contenteditable bio editor */
.grbios-bio-editor {
	width: 100%;
	min-height: 12em;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 0 0 4px 4px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	box-sizing: border-box;
	overflow-y: auto;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.grbios-bio-editor:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

.grbios-bio-editor[contenteditable="false"] {
	background: #f5f5f5;
	color: #666;
}

.grbios-bio-editor:empty::before {
	content: attr(data-placeholder);
	color: #999;
	pointer-events: none;
}

.grbios-toolbar {
	margin-top: 12px;
	margin-bottom: 0;
	padding: 6px 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f5f5f5;
	border: 1px solid #ccc;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
}

.grbios-toolbar-hint {
	font-size: 12px;
	color: #666;
}

.grbios-toolbar-hint kbd {
	display: inline-block;
	padding: 1px 5px;
	font-family: inherit;
	font-size: 11px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 3px;
	box-shadow: 0 1px 0 #bbb;
}

.grbios-toolbar-btn {
	padding: 4px 12px;
	border: 1px solid #aaa;
	background: #fff;
	border-radius: 3px;
	cursor: pointer;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 14px;
	font-weight: 700;
	font-style: italic;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.grbios-toolbar-btn:hover {
	background: #e8e8e8;
	border-color: #666;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.grbios-toolbar-btn:active {
	background: #ddd;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.grbios-char-count {
	text-align: right;
	font-size: 12px;
	color: #888;
	margin-top: 4px;
	transition: color 0.2s;
}

.grbios-limit-notice {
	margin-top: 8px;
	margin-bottom: 0;
	font-size: 13px;
}

.grbios-count-ok {
	color: #166534;
	font-weight: 600;
}

.grbios-count-under {
	color: #856404;
}

.grbios-count-over {
	color: #dc3232;
	font-weight: 600;
}

/* Name fields */
.grbios-name-row {
	display: flex;
	gap: 12px;
}

.grbios-name-row div {
	flex: 1;
}

.grbios-name-row input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	box-sizing: border-box;
}

.grbios-name-row input:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

.grbios-name-row input[readonly] {
	background: #f5f5f5;
	color: #666;
}

.grbios-name-middle {
	flex: 0 0 80px;
}

.grbios-name-suffix {
	flex: 0 0 80px;
}

.grbios-display-name-row {
	margin-top: 8px;
}

/* Role input */
#roles {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	box-sizing: border-box;
}

#roles:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

#roles[readonly] {
	background: #f5f5f5;
	color: #666;
}

.grbios-label-note {
	font-weight: 400;
}

/* Required / optional labels */
.grbios-required {
	color: #dc3232;
	font-weight: 400;
}

.grbios-optional {
	color: #888;
	font-weight: 400;
	font-size: 13px;
}

/* Steps intro (shown to first-time submitters) */
.grbios-steps {
	background: #f0f7fb;
	border: 1px solid #b4d5e7;
	border-radius: 4px;
	padding: 16px 20px;
	margin-bottom: 24px;
}

.grbios-steps-intro {
	margin: 0 0 8px;
	font-weight: 600;
}

.grbios-steps ol {
	margin: 0;
	padding-left: 20px;
}

.grbios-steps li {
	margin-bottom: 4px;
	line-height: 1.5;
}

/* Example bio */
.grbios-example {
	margin: 8px 0 12px;
	font-size: 13px;
}

.grbios-example summary {
	cursor: pointer;
	color: #0073aa;
	font-size: 13px;
}

.grbios-example summary:hover {
	text-decoration: underline;
}

.grbios-example-text {
	margin: 8px 0 0;
	padding: 12px 16px;
	background: #f9f9f9;
	border-left: 3px solid #ccc;
	font-style: italic;
	line-height: 1.6;
	color: #555;
}

.grbios-tips-intro {
	margin: 10px 0 4px;
	font-size: 13px;
	font-weight: 600;
	color: #555;
}

.grbios-tips-intro:first-child {
	margin-top: 8px;
}

.grbios-tips-list {
	margin: 4px 0 0;
	padding-left: 20px;
	font-size: 13px;
	color: #555;
	line-height: 1.6;
}

.grbios-tips-list li {
	margin-bottom: 4px;
}

/* Styled file upload */
.grbios-upload-label {
	display: inline-block;
	padding: 8px 18px;
	background: #f0f0f0;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
}

.grbios-upload-label:hover {
	background: #e0e0e0;
}

.grbios-upload-input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Upload spinner */
.grbios-upload-progress {
	font-size: 14px;
	color: #555;
	margin-top: 8px;
}

.grbios-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #ccc;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: grbios-spin 0.6s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}

@keyframes grbios-spin {
	to { transform: rotate(360deg); }
}

/* AI error notice (inserted by JS below toolbar) */
.grbios-ai-notice {
	margin-top: 8px;
	font-size: 13px;
}

/* AI hint text */
.grbios-ai-hint {
	display: block;
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

.grbios-ai-actions {
	margin-top: 10px;
	display: flex;
	gap: 8px;
}

.grbios-btn-accept {
	background: #d4edda;
	border-color: #c3e6cb;
	color: #155724;
}

.grbios-btn-accept:hover {
	background: #c3e6cb;
}

/* Success notice detail text */
.grbios-notice-detail {
	font-size: 13px;
	margin: 6px 0 0;
	opacity: 0.85;
}

/* Submit button */
.grbios-submit-btn {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 12px 32px;
	font-size: 16px;
	border-radius: 4px;
	cursor: pointer;
}

.grbios-submit-btn:hover {
	background: #005a87;
}

/* Notices */
.grbios-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
}

.grbios-notice--success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.grbios-notice--error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.grbios-notice--warning {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffeeba;
}

.grbios-notice--info {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

.grbios-deadline-note {
	margin-top: 30px;
	font-size: 13px;
	color: #888;
	text-align: center;
}

/* Headshot */
.grbios-headshot-preview {
	max-width: 200px;
	border-radius: 4px;
	margin-bottom: 10px;
	display: block;
}

#grbios-headshot-file {
	margin-top: 8px;
}

/* Shortcode bio listing */
.grbios-show-bios {
	margin: 20px 0;
}

.grbios-group {
	margin-bottom: 30px;
}

.grbios-group-title {
	border-bottom: 2px solid #333;
	padding-bottom: 5px;
	margin-bottom: 15px;
}

.grbios-bio-entry {
	margin-bottom: 20px;
	overflow: hidden; /* contain the float */
}

.grbios-bio-entry .grbios-headshot {
	float: left;
	width: 100px;
	height: auto;
	margin: 0 16px 8px 0;
	border-radius: 4px;
}

.grbios-bio-entry p {
	margin: 0 0 6px;
	line-height: 1.6;
}

.grbios-socials {
	font-size: 13px;
	color: #666;
}

/* AI Format */
.grbios-ai-format {
	margin-top: 10px;
}

.grbios-btn-secondary {
	background: #f0f0f0;
	color: #333;
	border: 1px solid #ccc;
	padding: 6px 16px;
	font-size: 13px;
	border-radius: 4px;
	cursor: pointer;
}

.grbios-btn-secondary:hover {
	background: #e0e0e0;
}

#grbios-ai-status {
	margin-left: 8px;
	font-size: 13px;
	color: #666;
}

.grbios-ai-preview-box {
	margin: 10px 0;
	padding: 12px;
	background: #f5f9fc;
	border: 1px solid #b4d5e7;
	border-radius: 4px;
	line-height: 1.6;
}

#grbios-ai-preview label {
	font-weight: 600;
	font-size: 13px;
}

#grbios-ai-accept,
#grbios-ai-reject {
	margin-top: 8px;
	margin-right: 8px;
}

/* Program Preview */
.grbios-preview-section {
	margin-top: 30px;
	margin-bottom: 36px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.grbios-preview-section h3 {
	margin: 0 0 4px;
	font-size: 16px;
}

.grbios-preview-box {
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 14px;
	line-height: 1.7;
	color: #222;
}

.grbios-preview-box p {
	margin: 0;
}

#grbios-preview-body:empty::after {
	content: "...";
	color: #ccc;
}

/* Shows list shortcode */
.grbios-shows-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.grbios-show-card {
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
}

.grbios-show-card--archived {
	opacity: 0.7;
}

.grbios-show-card-title {
	margin: 0 0 8px;
	font-size: 18px;
}

.grbios-show-card-meta {
	font-size: 13px;
	color: #666;
	line-height: 1.6;
}

.grbios-show-card-meta span {
	display: block;
}

.grbios-show-card-count {
	font-size: 13px;
	color: #166534;
	margin: 8px 0 0;
}

.grbios-show-card-badge {
	display: inline-block;
	margin-top: 8px;
	padding: 2px 8px;
	background: #e2e3e5;
	color: #383d41;
	border-radius: 3px;
	font-size: 12px;
}

/* Mobile responsive */
@media (max-width: 600px) {
	.grbios-name-row {
		flex-direction: column;
		gap: 8px;
	}

	.grbios-name-row input {
		font-size: 16px; /* prevents iOS zoom */
	}

	.grbios-container {
		padding: 20px 16px;
	}

	.grbios-container h1 {
		font-size: 20px;
	}

	.grbios-container h2 {
		font-size: 16px;
	}

	.grbios-field textarea,
	.grbios-bio-editor {
		font-size: 16px; /* prevents iOS zoom on focus */
	}

	.grbios-submit-btn {
		width: 100%;
		padding: 14px;
		font-size: 18px;
	}

	.grbios-headshot-preview {
		max-width: 150px;
	}

	.grbios-upload-label {
		display: block;
		text-align: center;
	}

	.grbios-ai-actions {
		flex-direction: column;
	}

	/* Bio listing: smaller headshot on mobile */
	.grbios-bio-entry .grbios-headshot {
		width: 70px;
		margin: 0 12px 6px 0;
	}

	#grbios-ai-status {
		margin-left: 0;
		width: 100%;
	}

	/* Preview box */
	.grbios-preview-box {
		padding: 14px;
		font-size: 13px;
	}

	/* Remove headshot button full width */
	#grbios-headshot-remove {
		display: block;
		margin-top: 8px;
	}
}
