/* =====================================================
   Rankifly AI Content Optimizer — Editor Sidebar CSS
   ===================================================== */

.rankifly-panel {
	background: #0f1117;
	color: #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
	border: 1px solid rgba(255,255,255,0.07);
}

/* ── Header ── */
.rankifly-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #6066E8 0%, #4A51D8 100%);
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rankifly-header svg {
	flex-shrink: 0;
}

.rankifly-title {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.02em;
}

/* ── No API key banner ── */
.rankifly-no-key {
	margin: 14px;
	padding: 12px 14px;
	background: rgba(255, 160, 50, 0.1);
	border: 1px solid rgba(255, 160, 50, 0.3);
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.5;
	color: #fbbf24;
}

.rankifly-no-key strong {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
}

.rankifly-no-key a {
	color: #fbbf24;
	text-decoration: underline;
}

/* ── Body padding ── */
.rankifly-body {
	padding: 14px;
}

/* ── Input group ── */
.rankifly-input-group {
	margin-bottom: 14px;
}

.rankifly-input-group label {
	display: block;
	margin-bottom: 5px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #94a3b8;
}

.rankifly-input-group input {
	width: 100%;
	padding: 8px 10px;
	background: #1e2130;
	border: 1px solid rgba(255,255,255,0.1);
	color: #e2e8f0;
	border-radius: 6px;
	font-size: 13px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.rankifly-input-group input:focus {
	outline: none;
	border-color: #6066E8;
	box-shadow: 0 0 0 2px rgba(96, 102, 232, 0.2);
}

/* ── Buttons ── */
.rankifly-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.rankifly-btn {
	width: 100%;
	padding: 9px 12px;
	border: none;
	border-radius: 7px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.2s;
	background: #1e2130;
	color: #cbd5e1;
	border: 1px solid rgba(255,255,255,0.08);
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.rankifly-btn:hover:not(:disabled) {
	background: #262d42;
	border-color: rgba(255,255,255,0.15);
	color: #fff;
}

.rankifly-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.rankifly-btn-primary {
	background: linear-gradient(135deg, #6066E8 0%, #4A51D8 100%);
	color: #fff;
	border-color: transparent;
	box-shadow: 0 2px 10px rgba(96, 102, 232, 0.35);
}

.rankifly-btn-primary:hover:not(:disabled) {
	background: linear-gradient(135deg, #7278f0 0%, #5a61e8 100%);
	box-shadow: 0 4px 16px rgba(96, 102, 232, 0.5);
}

/* ── Status bar ── */
.rankifly-status {
	padding: 9px 12px;
	margin-bottom: 12px;
	border-radius: 6px;
	background: rgba(59, 130, 246, 0.12);
	border-left: 3px solid #3b82f6;
	font-size: 12px;
	color: #93c5fd;
}

.rankifly-status.error {
	background: rgba(239, 68, 68, 0.1);
	border-left-color: #ef4444;
	color: #fca5a5;
}

.rankifly-status.success {
	background: rgba(34, 197, 94, 0.1);
	border-left-color: #22c55e;
	color: #86efac;
}

.hidden {
	display: none !important;
}

/* ── Scores ── */
.rankifly-score-box {
	display: flex;
	gap: 10px;
	margin-bottom: 14px;
}

.rankifly-score-item {
	flex: 1;
	text-align: center;
	background: #1e2130;
	border: 1px solid rgba(255,255,255,0.07);
	border-radius: 8px;
	padding: 12px 8px;
}

.rankifly-score-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #64748b;
	margin-bottom: 6px;
}

.rankifly-score-val {
	font-size: 26px;
	font-weight: 800;
	color: #e2e8f0;
}

.score-good   { color: #22c55e !important; }
.score-medium { color: #f59e0b !important; }
.score-bad    { color: #ef4444 !important; }

/* ── Section headings ── */
.rankifly-section-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
	margin: 14px 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── List (improvements / links) ── */
.rankifly-list {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rankifly-list li {
	padding: 8px 10px;
	background: #1e2130;
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.45;
	color: #cbd5e1;
	border-left: 2px solid #6066E8;
}

/* ── FAQ items ── */
.faq-item {
	margin-bottom: 10px;
	background: #1e2130;
	padding: 10px;
	border-radius: 7px;
	border: 1px solid rgba(255,255,255,0.06);
}

.faq-item input,
.faq-item textarea {
	width: 100%;
	background: #0f1117;
	border: 1px solid rgba(255,255,255,0.08);
	color: #e2e8f0;
	padding: 6px 8px;
	border-radius: 5px;
	font-size: 12px;
	box-sizing: border-box;
}

.faq-item input {
	margin-bottom: 6px;
}

.faq-item textarea {
	min-height: 56px;
	resize: vertical;
}

.faq-empty {
	font-size: 12px;
	color: #475569;
	font-style: italic;
	text-align: center;
	padding: 10px 0;
}
