/**
 * Visual Prompt Builder Stylesheet
 * 
 * Clean, modern, responsive light-mode styling
 *
 * @package Afrobull_Resource_Tools
 */

:root {
	--afrb-primary: #2563eb;
	--afrb-primary-hover: #1d4ed8;
	--afrb-surface: #ffffff;
	--afrb-bg: #f8fafc;
	--afrb-border: #e2e8f0;
	--afrb-text-main: #0f172a;
	--afrb-text-muted: #475569;
	--afrb-radius: 8px;
	--afrb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--afrb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.afrb-prompt-tool-container {
	background: var(--afrb-surface);
	border: 1px solid var(--afrb-border);
	border-radius: 12px;
	padding: 32px;
	box-shadow: var(--afrb-shadow-sm);
	margin: 32px 0;
	color: var(--afrb-text-main);
	font-family: inherit;
}

@media (max-width: 640px) {
	.afrb-prompt-tool-container {
		padding: 20px 16px;
	}
}

/* Intro Header */
.afrb-tool-intro {
	margin-bottom: 24px;
	border-bottom: 1px solid var(--afrb-border);
	padding-bottom: 20px;
}

.afrb-tool-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 9999px;
	margin-bottom: 12px;
}

.afrb-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #2563eb;
}

.afrb-tool-heading {
	font-size: 26px;
	font-weight: 700;
	color: var(--afrb-text-main);
	margin: 0 0 8px;
	line-height: 1.25;
}

.afrb-tool-desc {
	font-size: 15px;
	color: var(--afrb-text-muted);
	margin: 0 0 14px;
	line-height: 1.5;
	max-width: 800px;
}

.afrb-tool-disclaimer {
	background: #f8fafc;
	border-left: 3px solid #64748b;
	padding: 8px 14px;
	font-size: 13px;
	color: #475569;
	border-radius: 0 6px 6px 0;
	line-height: 1.45;
}

/* Presets Bar */
.afrb-presets-section {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
	padding: 12px 16px;
	background: #f1f5f9;
	border-radius: var(--afrb-radius);
}

.afrb-presets-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--afrb-text-main);
}

.afrb-preset-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.afrb-preset-btn {
	background: var(--afrb-surface);
	border: 1px solid var(--afrb-border);
	color: var(--afrb-text-main);
	font-size: 12px;
	font-weight: 500;
	padding: 6px 12px;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.afrb-preset-btn:hover,
.afrb-preset-btn.active {
	background: var(--afrb-primary);
	color: #ffffff;
	border-color: var(--afrb-primary);
}

/* Main Grid Layout */
.afrb-prompt-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 32px;
	align-items: start;
}

@media (max-width: 960px) {
	.afrb-prompt-grid {
		grid-template-columns: 1fr;
	}
}

/* Form Styles */
.afrb-form-group {
	border: 1px solid var(--afrb-border);
	border-radius: var(--afrb-radius);
	padding: 18px 20px;
	margin-bottom: 20px;
	background: #fafbfc;
}

.afrb-group-legend {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	padding: 0 8px;
	margin-bottom: 6px;
	letter-spacing: -0.01em;
}

.afrb-field-row {
	margin-bottom: 14px;
}

.afrb-field-row:last-child {
	margin-bottom: 0;
}

.afrb-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

.afrb-field-grid:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.afrb-field-grid {
		grid-template-columns: 1fr;
	}
}

.afrb-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}

.afrb-input,
.afrb-select {
	width: 100%;
	padding: 9px 12px;
	font-size: 13.5px;
	color: var(--afrb-text-main);
	background: #ffffff;
	border: 1px solid var(--afrb-border);
	border-radius: 6px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.afrb-input:focus,
.afrb-select:focus,
.afrb-prompt-textarea:focus {
	outline: none;
	border-color: var(--afrb-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.afrb-field-hint {
	font-size: 11.5px;
	color: #64748b;
	display: block;
	margin-top: 4px;
}

/* Actions */
.afrb-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}

/* Sticky Output Box */
.afrb-prompt-output-panel {
	position: sticky;
	top: 24px;
}

.afrb-output-box {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 22px;
	box-shadow: var(--afrb-shadow-md);
}

.afrb-output-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.afrb-output-title-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.afrb-live-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #16a34a;
	animation: afrbPulse 2s infinite ease-in-out;
}

@keyframes afrbPulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
	.afrb-live-indicator { animation: none; }
}

.afrb-output-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--afrb-text-main);
	margin: 0;
}

.afrb-token-count {
	font-size: 11.5px;
	color: #64748b;
	font-weight: 500;
}

.afrb-textarea-wrap {
	margin-bottom: 14px;
}

.afrb-prompt-textarea {
	width: 100%;
	padding: 12px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #0f172a;
	background: #f8fafc;
	border: 1px solid var(--afrb-border);
	border-radius: 6px;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
}

/* Status Banner */
.afrb-status-banner {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 14px;
}

.afrb-status-success {
	background: #dcfce7;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.afrb-status-error {
	background: #fee2e2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

/* Copy Buttons */
.afrb-copy-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
}

.afrb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13.5px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
	text-decoration: none;
}

.afrb-btn:active {
	transform: scale(0.98);
}

.afrb-btn-primary {
	background: var(--afrb-primary);
	color: #ffffff;
}

.afrb-btn-primary:hover {
	background: var(--afrb-primary-hover);
}

.afrb-btn-large {
	padding: 11px 18px;
	font-size: 14.5px;
}

.afrb-btn-outline {
	background: transparent;
	border-color: #cbd5e1;
	color: #334155;
}

.afrb-btn-outline:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.afrb-btn-secondary {
	background: #e2e8f0;
	color: #1e293b;
}

.afrb-btn-secondary:hover {
	background: #cbd5e1;
}

.afrb-btn-ghost {
	background: transparent;
	color: #64748b;
}

.afrb-btn-ghost:hover {
	background: #f1f5f9;
	color: #0f172a;
}

/* Prompt Tips */
.afrb-prompt-tips {
	background: #f8fafc;
	border-radius: 6px;
	padding: 12px 14px;
	border: 1px solid #f1f5f9;
}

.afrb-prompt-tips h4 {
	font-size: 12px;
	font-weight: 700;
	color: #334155;
	margin: 0 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.afrb-prompt-tips ul {
	margin: 0;
	padding-left: 18px;
	font-size: 12px;
	color: #64748b;
	line-height: 1.45;
}

.afrb-prompt-tips li {
	margin-bottom: 4px;
}

.afrb-prompt-tips li:last-child {
	margin-bottom: 0;
}
