/**
 * Scores Display — Phase 2.F
 *
 * Styles for score badges, fit badges, and dashboard scores.
 * Profile page uses LIGHT theme (--collabable-text: #111).
 * Dashboard (My Account) uses DARK theme (white text).
 *
 * Prefix: cb- (collabable scores)
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   SCORE STATUS COLORS
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
	--cb-score-excellent: #27ae60;
	--cb-score-good: #e67e22;
	--cb-score-average: #CF0000;
	--cb-score-low: #999;
	--cb-score-neutral: #bbb;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCORE BADGE (compact, works on both light and dark backgrounds)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-score-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 6px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.cb-score-badge--sm {
	padding: 3px 8px;
	font-size: 12px;
}

.cb-score-badge--md {
	padding: 4px 10px;
	font-size: 13px;
}

.cb-score-badge--lg {
	padding: 6px 14px;
	font-size: 18px;
}

.cb-score-badge--excellent { background: rgba(39,174,96,.12); color: var(--cb-score-excellent); }
.cb-score-badge--good      { background: rgba(230,126,34,.12); color: var(--cb-score-good); }
.cb-score-badge--average   { background: rgba(207,0,0,.12);  color: var(--cb-score-average); }
.cb-score-badge--low       { background: #f0f0f0; color: var(--cb-score-low); }
.cb-score-badge--neutral   { background: #f5f5f5; color: var(--cb-score-neutral); }

.cb-score-badge__label {
	font-size: 0.85em;
	font-weight: 500;
	opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TRUST PANEL (detailed — used on dashboard / admin, dark theme)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-trust-panel {
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 20px;
}

.cb-trust-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.cb-trust-panel__title {
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	margin: 0;
}

.cb-trust-panel__dimensions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cb-trust-dim__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.cb-trust-dim__label {
	font-size: 13px;
	color: rgba(255,255,255,.7);
}

.cb-trust-dim__score {
	font-size: 13px;
	font-weight: 600;
}

.cb-trust-dim__score--excellent { color: var(--cb-score-excellent); }
.cb-trust-dim__score--good      { color: var(--cb-score-good); }
.cb-trust-dim__score--average   { color: var(--cb-score-average); }
.cb-trust-dim__score--needs_improvement { color: var(--cb-score-average); }
.cb-trust-dim__score--neutral   { color: var(--cb-score-neutral); }

.cb-trust-dim__bar {
	height: 6px;
	background: rgba(255,255,255,.1);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 4px;
}

.cb-trust-dim__fill {
	height: 100%;
	border-radius: 3px;
	transition: width 0.6s ease;
}

.cb-trust-dim__fill--excellent { background: var(--cb-score-excellent); }
.cb-trust-dim__fill--good      { background: var(--cb-score-good); }
.cb-trust-dim__fill--average   { background: var(--cb-score-average); }
.cb-trust-dim__fill--needs_improvement { background: var(--cb-score-average); }

.cb-trust-dim__explanation {
	font-size: 12px;
	color: rgba(255,255,255,.5);
	margin: 0;
	line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BOOKABILITY WIDGET (dashboard — dark theme)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-bookability {
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 20px;
	text-align: center;
}

.cb-bookability__header {
	margin-bottom: 12px;
}

.cb-bookability__title {
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	margin: 0;
}

.cb-bookability__ring-wrap {
	position: relative;
	width: 120px;
	height: 120px;
	margin: 0 auto 12px;
}

.cb-bookability__ring {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.cb-bookability__ring-bg {
	fill: none;
	stroke: rgba(255,255,255,.1);
	stroke-width: 8;
}

.cb-bookability__ring-fill {
	fill: none;
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.8s ease;
}

.cb-bookability__ring-fill--excellent { stroke: var(--cb-score-excellent); }
.cb-bookability__ring-fill--good      { stroke: var(--cb-score-good); }
.cb-bookability__ring-fill--average   { stroke: var(--cb-score-average); }
.cb-bookability__ring-fill--needs_improvement { stroke: var(--cb-score-low); }

.cb-bookability__ring-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	text-align: center;
}

.cb-bookability__score {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}

.cb-bookability__max {
	font-size: 12px;
	color: rgba(255,255,255,.5);
}

.cb-bookability__label {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
}

.cb-bookability__label--excellent { color: var(--cb-score-excellent); }
.cb-bookability__label--good      { color: var(--cb-score-good); }
.cb-bookability__label--average   { color: var(--cb-score-average); }
.cb-bookability__label--needs_improvement { color: var(--cb-score-low); }

.cb-bookability__tips {
	text-align: left;
	border-top: 1px solid rgba(255,255,255,.1);
	padding-top: 12px;
}

.cb-bookability__tips-title {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255,255,255,.7);
	margin: 0 0 8px;
}

.cb-bookability__tips ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cb-bookability__tips li {
	font-size: 12px;
	color: rgba(255,255,255,.6);
	padding: 4px 0 4px 16px;
	position: relative;
	line-height: 1.4;
}

.cb-bookability__tips li::before {
	content: '\2192';
	position: absolute;
	left: 0;
	color: var(--cb-score-good);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FRESHNESS INDICATOR (dashboard — dark theme)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-freshness {
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 20px;
}

.cb-freshness__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.cb-freshness__icon {
	color: rgba(255,255,255,.5);
	display: flex;
}

.cb-freshness__label {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	flex: 1;
}

.cb-freshness__explanation {
	font-size: 12px;
	color: rgba(255,255,255,.5);
	margin: 0;
	line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FIT BADGE (recommendation cards)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-fit-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	cursor: default;
	margin-top: 4px;
}

.cb-fit-badge--excellent { background: rgba(39,174,96,.15); color: var(--cb-score-excellent); }
.cb-fit-badge--good      { background: rgba(230,126,34,.15); color: var(--cb-score-good); }
.cb-fit-badge--average   { background: rgba(207,0,0,.15);  color: var(--cb-score-average); }
.cb-fit-badge--low       { background: #f0f0f0; color: var(--cb-score-low); }

.cb-fit-badge__icon {
	display: flex;
	opacity: 0.7;
}

.cb-fit-badge__label {
	opacity: 0.8;
	font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DASHBOARD SCORES (My Account — white card on dark page)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-dashboard-scores {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 20px;
	margin-top: 20px;
	margin-bottom: 20px;
}

/* ── Dark-page override: force black text inside white card ───────────────── */
.collabable-my-account .cb-dashboard-scores,
.collabable-my-account .cb-dashboard-scores h3,
.collabable-my-account .cb-dashboard-scores div,
.collabable-my-account .cb-dashboard-scores span,
.collabable-my-account .cb-dashboard-scores label,
.collabable-my-account .cb-dashboard-scores a,
.collabable-my-account .cb-dashboard-scores p,
.collabable-my-account .cb-dashboard-scores button,
.collabable-my-account .cb-dashboard-scores li {
	color: #000;
}

.cb-dashboard-scores__title {
	font-size: 16px;
	font-weight: 600;
	color: #000;
	margin: 0 0 16px;
}

.cb-dashboard-scores__grid {
	display: flex;
	gap: 20px;
}

.cb-dashboard-scores__item {
	flex: 1;
	text-align: center;
	padding: 12px;
	background: #fafafa;
	border-radius: 8px;
}

.cb-dashboard-scores__value {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 4px;
}

.collabable-my-account .cb-dashboard-scores div.cb-dashboard-scores__value--excellent { color: var(--cb-score-excellent); }
.collabable-my-account .cb-dashboard-scores div.cb-dashboard-scores__value--good      { color: var(--cb-score-good); }
.collabable-my-account .cb-dashboard-scores div.cb-dashboard-scores__value--average   { color: var(--cb-score-average); }
.collabable-my-account .cb-dashboard-scores div.cb-dashboard-scores__value--low       { color: var(--cb-score-low); }

.collabable-my-account .cb-dashboard-scores div.cb-dashboard-scores__value--locked {
	color: rgba(0,0,0,.25);
}

.collabable-my-account .cb-dashboard-scores__label {
	color: #666;
}

.collabable-my-account .cb-dashboard-scores .cb-score-help-btn {
	color: rgba(0,0,0,.4);
}

.cb-dashboard-scores__label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ── Value row (score + ? button) ─────────────────────────────────────────── */

.cb-dashboard-scores__value-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	position: relative;
}

/* ── Locked state ─────────────────────────────────────────────────────────── */

.cb-dashboard-scores__item--locked {
	opacity: 0.45;
}

.cb-dashboard-scores__value--locked {
	font-size: 32px;
	color: rgba(0,0,0,.25);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cb-dashboard-scores__lock {
	opacity: 0.5;
}

/* ── Help button (?) ──────────────────────────────────────────────────────── */

.cb-score-help-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,.2);
	background: rgba(0,0,0,.05);
	color: rgba(0,0,0,.4);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	flex-shrink: 0;
}

/* ── Popover ──────────────────────────────────────────────────────────────── */

.cb-score-popover {
	display: none;
	position: absolute;
	width: 260px;
	background: #333;
	border: 1px solid rgba(255,255,255,.15);
	border-radius: 10px;
	padding: 16px;
	z-index: 10000;
	box-shadow: 0 12px 40px rgba(0,0,0,.4);
	text-align: left;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.cb-score-popover--visible {
	display: block;
	opacity: 1;
}

.cb-score-popover__arrow {
	position: absolute;
	top: -6px;
	transform: translateX(-50%) rotate(45deg);
	width: 10px;
	height: 10px;
	background: #333;
	border-left: 1px solid rgba(255,255,255,.15);
	border-top: 1px solid rgba(255,255,255,.15);
}

.cb-score-popover__title {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 6px;
}

.cb-score-popover__desc {
	font-size: 12px;
	color: rgba(255,255,255,.65);
	line-height: 1.5;
	margin: 0 0 10px;
}

.cb-score-popover__tips {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
}

.cb-score-popover__tips li {
	font-size: 12px;
	color: rgba(255,255,255,.8);
	padding: 5px 0 5px 18px;
	position: relative;
	line-height: 1.4;
	border-bottom: 1px solid rgba(255,255,255,.06);
}

.cb-score-popover__tips li:last-child {
	border-bottom: none;
}

.cb-score-popover__tips li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 9px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.2);
}

.cb-score-popover__cta {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: #CF0000;
	padding: 6px 14px;
	border-radius: 6px;
	text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
	.cb-dashboard-scores__grid {
		flex-direction: column;
		gap: 12px;
	}

	.cb-dashboard-scores__value {
		font-size: 24px;
	}

	.cb-dashboard-scores__value--locked {
		font-size: 24px;
	}

	.cb-score-popover {
		width: 230px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CREDIBILITY BADGE — compact, for Collaborate cards (Phase 4.2)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-cred-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	letter-spacing: 0.3px;
	margin-top: 6px;
}

.cb-cred-badge--responsive {
	background: #f0f0f0;
	color: #666;
}

.cb-cred-badge--verified_collaborator {
	background: rgba(39, 174, 96, 0.15);
	color: #27ae60;
}

.cb-cred-badge--top_rated {
	background: rgba(230, 126, 34, 0.15);
	color: #e67e22;
}

.cb-cred-badge__text {
	text-transform: uppercase;
}

/* Dark card context (grid cards, list cards on dark bg) */
.collab-grid-card .cb-cred-badge,
.collabable-profile-card .cb-cred-badge {
	margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CREDIBILITY SECTION — profile page, 3-column layout (Phase 4.2)
   ═══════════════════════════════════════════════════════════════════════════════ */

.cb-cred-section {
	margin: 20px 0 24px;
	padding: 20px;
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
}

.cb-cred-section__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #111;
	letter-spacing: 0.3px;
}

.cb-cred-section__badge-row {
	margin-bottom: 16px;
}

.cb-cred-section__badge-row .cb-cred-badge {
	margin-top: 0;
	padding: 5px 14px;
	font-size: 12px;
}

.cb-cred-section__columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* Individual column */
.cb-cred-col {
	padding: 14px;
	border-radius: 8px;
	border: 1px solid #e5e5e5;
}

.cb-cred-col--declared {
	background: #fafafa;
	border-color: #e0e0e0;
}

.cb-cred-col--observed {
	background: #f5f5f5;
	border-color: #e0e0e0;
}

.cb-cred-col--verified {
	background: rgba(39, 174, 96, 0.08);
	border-color: rgba(39, 174, 96, 0.15);
}

/* Column header */
.cb-cred-col__header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cb-cred-col--declared .cb-cred-col__header {
	color: #999;
}

.cb-cred-col--observed .cb-cred-col__header {
	color: #666;
}

.cb-cred-col--verified .cb-cred-col__header {
	color: #27ae60;
}

/* List items */
.cb-cred-col__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cb-cred-col__list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 4px 0;
	font-size: 13px;
	line-height: 1.4;
	color: #333;
}

.cb-cred-col__list li + li {
	border-top: 1px solid #f0f0f0;
}

.cb-cred-col__label {
	color: #666;
	font-size: 12px;
}

.cb-cred-col__value {
	font-weight: 500;
	text-align: right;
}

.cb-cred-col--verified .cb-cred-col__value {
	color: #27ae60;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.cb-cred-section__columns {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.cb-cred-section {
		padding: 14px;
	}
}
