/**
 * Meet The Team Styles
 *
 * Redesigned to match NewsFactory theme with 3-column grid,
 * role filter tabs, and tooltip support.
 *
 * @package Blanco_Lite
 */

/* ==========================================================================
   Page Layout
   ========================================================================== */

.nf-team-page {
	background: var(--nf-surface-primary);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.nf-team-header {
	padding: 50px 0 30px;
	background: linear-gradient(135deg, var(--nf-surface-secondary) 0%, var(--nf-surface-elevated) 100%);
	border-bottom: 4px solid var(--nf-accent-primary);
	text-align: center;
}

.nf-team-title {
	margin: 0 0 10px 0;
	font-size: 36px;
	font-weight: 800;
	color: var(--nf-text-primary);
	text-transform: uppercase;
	letter-spacing: 2px;
}

.nf-team-subtitle {
	margin: 0;
	font-size: 16px;
	color: var(--nf-text-secondary);
}

/* ==========================================================================
   Filter Tabs
   ========================================================================== */

.nf-team-filters {
	padding: 25px 0;
	background: var(--nf-surface-secondary);
	border-bottom: 1px solid var(--nf-border-primary);
}

.nf-team-tabs {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.nf-team-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--nf-surface-elevated);
	border: 1px solid var(--nf-border-primary);
	border-radius: 6px;
	color: var(--nf-text-secondary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.nf-team-tab:hover {
	background: var(--nf-surface-primary);
	color: var(--nf-text-primary);
	border-color: var(--nf-accent-primary);
}

.nf-team-tab--active {
	background: var(--nf-accent-primary);
	border-color: var(--nf-accent-primary);
	color: #fff;
}

.nf-team-tab--active:hover {
	background: var(--nf-accent-primary-hover);
	color: #fff;
}

.nf-team-tab i {
	font-size: 14px;
}

.nf-team-tab__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 11px;
	font-size: 12px;
	font-weight: 700;
}

.nf-team-tab--active .nf-team-tab__count {
	background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Content Section
   ========================================================================== */

.nf-team-content {
	padding: 40px 0 60px;
}

/* ==========================================================================
   Team Grid - 3 Columns
   ========================================================================== */

.nf-team-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* ==========================================================================
   Team Card
   ========================================================================== */

.nf-team-card {
	--agent-accent: var(--nf-accent-primary);
	position: relative;
	background: var(--nf-surface-secondary);
	border-radius: 8px;
	border: 1px solid var(--nf-border-primary);
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nf-team-card:hover {
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	border-color: var(--agent-accent);
}

.nf-team-card.is-hidden {
	display: none;
}

/* Card Header */
.nf-team-card__header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	background: linear-gradient(135deg, var(--nf-surface-elevated) 0%, var(--nf-surface-secondary) 100%);
	border-bottom: 1px solid var(--nf-border-primary);
	border-radius: 8px 8px 0 0;
}

.nf-team-card__avatar-wrap {
	flex-shrink: 0;
}

.nf-team-card__avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--agent-accent);
}

.nf-team-card__avatar--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--nf-surface-primary);
	color: var(--nf-text-muted);
	font-size: 24px;
	font-weight: 700;
}

.nf-team-card__info {
	flex: 1;
	min-width: 0;
}

.nf-team-card__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	margin-left: auto;
}

.nf-team-card__name {
	margin: 0 0 4px 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--agent-accent);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nf-team-card__role {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--nf-text-secondary);
	font-weight: 600;
}

.nf-team-card__role i {
	font-size: 12px;
}

.nf-team-card__owner {
	margin-top: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.56);
}

.nf-team-card__owner-link {
	color: var(--agent-accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.nf-team-card__owner-link:hover,
.nf-team-card__owner-link:focus {
	color: var(--agent-accent);
	border-color: currentColor;
	opacity: 0.9;
}

.nf-team-card__tier {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	color: #d9e5ff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.nf-team-card__tier--freetier,
.nf-team-card__tier--free-tier {
	background: linear-gradient(135deg, rgba(72, 103, 255, 0.18), rgba(72, 103, 255, 0.06));
	border-color: rgba(105, 136, 255, 0.35);
	color: #a9beff;
}

.nf-team-card__tier--creator {
	background: linear-gradient(135deg, rgba(255, 184, 77, 0.18), rgba(255, 184, 77, 0.06));
	border-color: rgba(255, 184, 77, 0.34);
	color: #ffd58c;
}

.nf-team-card__tier--enterprise {
	background: linear-gradient(135deg, rgba(87, 225, 179, 0.18), rgba(87, 225, 179, 0.06));
	border-color: rgba(87, 225, 179, 0.32);
	color: #8df2cc;
}

.nf-team-card__status {
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.nf-team-card__status--active {
	background: rgba(76, 175, 80, 0.2);
	color: #4CAF50;
}

.nf-team-card__status--inactive {
	background: rgba(244, 67, 54, 0.2);
	color: #F44336;
}

/* Card Body */
.nf-team-card__body {
	padding: 18px;
}

.nf-team-card__stat {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--nf-text-secondary);
}

.nf-team-card__stat i {
	width: 18px;
	color: var(--nf-text-muted);
	text-align: center;
}

.nf-team-card__timer {
	color: #7de3ff;
	font-weight: 700;
}

.nf-team-card__articles {
	color: #7dffaf;
	font-weight: 700;
}

.nf-team-card__assigner {
	color: #ff8ea1;
	font-weight: 700;
}

/* Context Buttons */
.nf-team-card__context {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.nf-team-card__context-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 10px;
	background: var(--nf-surface-elevated);
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	cursor: help;
	transition: background 0.2s ease;
}

.nf-team-card__context-item:hover {
	background: var(--nf-surface-primary);
}

.nf-team-card__context-item[data-type="soul"] {
	color: #f1b74a;
}

.nf-team-card__context-item[data-type="workflow"] {
	color: #bb9bff;
}

.nf-team-card__context-item[data-type="memory"] {
	color: #70e0cf;
}

/* Sections */
.nf-team-card__section {
	margin-bottom: 14px;
}

.nf-team-card__section h4 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px 0;
	font-size: 12px;
	font-weight: 700;
	color: var(--nf-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.nf-team-card__section h4 i {
	font-size: 12px;
}

.nf-team-card__skill {
	display: inline-block;
	padding: 5px 10px;
	background: rgba(137, 169, 255, 0.15);
	color: #89a9ff;
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	cursor: help;
}

.nf-team-card__actions {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.nf-team-card__actions li {
	margin: 0;
}

.nf-team-card__action {
	display: inline-block;
	padding: 5px 10px;
	background: rgba(255, 194, 102, 0.15);
	color: #ffc266;
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	cursor: help;
}

.nf-team-card__free-action {
	display: block;
	padding: 6px 10px;
	background: rgba(255, 170, 70, 0.16);
	color: #ffcb8a;
	border: 1px solid rgba(255, 170, 70, 0.22);
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	line-height: 1.35;
}

/* Card Footer */
.nf-team-card__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	background: var(--nf-surface-elevated);
	border-top: 1px solid var(--nf-border-primary);
	border-radius: 0 0 8px 8px;
}

.nf-team-card__model,
.nf-team-card__cost {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--nf-text-muted);
}

.nf-team-card__model i {
	color: #8fc6ff;
}

.nf-team-card__cost i {
	color: #7dffaf;
}

.nf-team-card__model span,
.nf-team-card__cost span {
	max-width: 140px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

.nf-tooltip-wrap {
	position: relative;
	display: inline-flex;
}

.nf-tooltip-panel {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%) translateY(-4px);
	width: max(280px, 100%);
	max-width: min(400px, calc(100vw - 40px));
	max-height: 280px;
	padding: 14px;
	background: var(--nf-surface-primary);
	border: 1px solid var(--nf-border-primary);
	border-radius: 6px;
	color: var(--nf-text-secondary);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
	overflow: auto;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s ease;
	z-index: 1000;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.nf-tooltip-wrap:hover .nf-tooltip-panel,
.nf-tooltip-wrap:focus .nf-tooltip-panel,
.nf-tooltip-wrap.is-open .nf-tooltip-panel {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.nf-team-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: var(--nf-text-muted);
}

.nf-team-empty i {
	font-size: 48px;
	margin-bottom: 16px;
	display: block;
}

.nf-team-empty p {
	font-size: 18px;
	margin: 0;
}

/* ==========================================================================
   Responsive - Tablet (2 columns)
   ========================================================================== */

@media (max-width: 992px) {
	.nf-team-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.nf-team-title {
		font-size: 30px;
	}

	.nf-team-tabs {
		gap: 8px;
	}

	.nf-team-tab {
		padding: 8px 14px;
		font-size: 13px;
	}

	.nf-team-tab span:not(.nf-team-tab__count) {
		display: none;
	}
}

/* ==========================================================================
   Responsive - Mobile (1 column)
   ========================================================================== */

@media (max-width: 600px) {
	.nf-team-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.nf-team-header {
		padding: 35px 0 25px;
	}

	.nf-team-title {
		font-size: 24px;
	}

	.nf-team-subtitle {
		font-size: 14px;
	}

	.nf-team-content {
		padding: 25px 0 40px;
	}

	.nf-team-card__header {
		padding: 14px;
		flex-wrap: wrap;
	}

	.nf-team-card__avatar {
		width: 50px;
		height: 50px;
	}

	.nf-team-card__name {
		font-size: 18px;
	}

	.nf-team-card__meta {
		width: 100%;
		flex-direction: row;
		justify-content: flex-end;
	}

	.nf-team-card__body {
		padding: 14px;
	}

	.nf-team-card__footer {
		padding: 12px 14px;
		flex-direction: column;
		gap: 8px;
		align-items: flex-start;
	}
}
