/**
 * TeamworkFX MCP Styles
 * Matches TeamworkFX branding
 */

/* Inter Font */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/static/fonts/inter-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/static/fonts/inter-700.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('/static/fonts/inter-900.woff2') format('woff2');
}

:root {
	/* Brand */
	--brand: #4c74b9;
	--success: #1e8d57;

	/* Grays */
	--gray-00: #fff;
	--gray-05: #f8f9fb;
	--gray-10: #eef1f6;
	--gray-15: #e2e6ee;
	--gray-20: #ced4da;
	--gray-40: #7f8a9f;
	--gray-45: #636e83;
	--gray-50: #2f394e;
	--gray-60: #21252c;
	--gray-80: #0b1720;

	/* Blues */
	--vivid-blue-05: #f7fbff;
	--vivid-blue-10: #f2f8ff;
	--vivid-blue-15: #cce4ff;
	--vivid-blue-50: #207ee9;
	--vivid-blue-60: #1359b4;

	/* Semantic */
	--color-bg: var(--gray-05);
	--color-bg-secondary: var(--gray-00);
	--color-bg-tertiary: var(--gray-10);
	--color-border: var(--gray-15);
	--color-border-hover: var(--gray-20);
	--color-text: var(--gray-60);
	--color-text-muted: var(--gray-40);
	--color-text-light: var(--gray-45);
	--color-accent: var(--vivid-blue-50);
	--color-accent-hover: var(--vivid-blue-60);
	--color-accent-light: var(--vivid-blue-10);
	--color-accent-muted: var(--vivid-blue-05);
	--color-success: var(--success);

	/* Typography */
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
	--font-size-small: 0.75rem;
	--font-size-default: 0.875rem;
	--font-size-large: 1rem;

	/* Spacing */
	--radius-sm: 4px;
	--radius-md: 6px;
	--radius-lg: 8px;

	/* Shadows */
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-sans);
	font-size: var(--font-size-default);
	background: var(--color-bg);
	color: var(--color-text);
	line-height: 1.5;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--color-accent-hover);
	text-decoration: underline;
}

code {
	font-family: var(--font-mono);
	font-size: 0.8125em;
	background: var(--color-bg-tertiary);
	padding: 0.125rem 0.375rem;
	border-radius: var(--radius-sm);
	color: var(--gray-50);
}

.container {
	max-width: 1050px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Header */
.header {
	background: var(--brand);
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}

.logo {
	display: flex;
	align-items: center;
}

.logo:hover {
	text-decoration: none;
}

.logo-bg {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1c2c48;
	padding: 0 0.75rem;
	height: 56px;
	margin-left: -1.5rem;
}

.logo-img {
	height: 28px;
	width: auto;
}

.nav {
	display: flex;
	gap: 0.25rem;
}

.nav a {
	color: rgba(255, 255, 255, 0.7);
	font-size: var(--font-size-default);
	font-weight: 500;
	padding: 0.5rem 0.875rem;
	border-radius: var(--radius-md);
	transition: all 0.15s ease;
}

.nav a:hover {
	color: var(--gray-00);
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

/* Main */
.main {
	padding: 2rem 0 3rem;
}

.content-wrapper {
	background: var(--gray-00);
	border-radius: var(--radius-lg);
	padding: 2rem;
	box-shadow: var(--shadow-md);
}

/* Hero */
.hero {
	text-align: center;
	padding: 2.5rem 0 2rem;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0.875rem;
	background: var(--color-accent-light);
	border: 1px solid var(--vivid-blue-15);
	border-radius: 999px;
	font-size: var(--font-size-small);
	font-weight: 500;
	color: var(--color-accent);
	margin-bottom: 1.25rem;
}

.hero-badge-dot {
	width: 6px;
	height: 6px;
	background: var(--color-success);
	border-radius: 50%;
	animation: pulse 2s infinite;
}

@keyframes pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.5;
	}
}

.hero h1 {
	font-size: 2.5rem;
	font-weight: 900;
	line-height: 1.2;
	margin-bottom: 0.75rem;
	color: var(--gray-60);
}

.hero-gradient {
	color: var(--brand);
}

.hero>p {
	font-size: 1.0625rem;
	color: var(--color-text-muted);
	max-width: 540px;
	margin: 0 auto;
	line-height: 1.6;
}

/* Tabs */
.tabs-container {
	margin-top: 1.5rem;
}

.tabs {
	display: flex;
	gap: 0.125rem;
	padding: 0.25rem;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	width: fit-content;
	margin: 0 auto 1.5rem;
	box-shadow: var(--shadow-sm);
}

.tab {
	padding: 0.5rem 1rem;
	font-family: var(--font-sans);
	font-size: var(--font-size-default);
	font-weight: 500;
	color: var(--color-text-muted);
	background: transparent;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.15s ease;
}

.tab:hover {
	color: var(--color-text);
	background: var(--color-bg-tertiary);
}

.tab.active {
	color: var(--gray-00);
	background: var(--brand);
	box-shadow: var(--shadow-sm);
}

.tab-panel {
	display: none;
	animation: fadeIn 0.2s ease;
}

.tab-panel.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tab-header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.tab-header h2 {
	font-size: 1.5rem;
	font-weight: 900;
	margin-bottom: 0.25rem;
	color: var(--gray-60);
}

.tab-header p {
	color: var(--color-text-muted);
}

/* Info Box */
.info-box {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 1rem 1.25rem;
	background: var(--color-accent-light);
	border: 1px solid var(--vivid-blue-15);
	border-radius: var(--radius-lg);
	margin-bottom: 1.5rem;
}

.info-icon {
	font-size: 1.25rem;
	line-height: 1;
}

.info-box strong {
	display: block;
	margin-bottom: 0.125rem;
	color: var(--gray-60);
	font-weight: 600;
}

.info-box p {
	color: var(--color-text-light);
	font-size: var(--font-size-default);
	margin: 0;
	line-height: 1.5;
}

/* Cards & Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.875rem;
}

.card {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 1rem 1.25rem;
	transition: all 0.15s ease;
	box-shadow: var(--shadow-sm);
}

.card:hover {
	border-color: var(--color-border-hover);
	box-shadow: var(--shadow-md);
}

.card-title {
	font-size: var(--font-size-default);
	font-weight: 600;
	margin-bottom: 0.375rem;
	color: var(--gray-60);
}

.card-description {
	color: var(--color-text-muted);
	font-size: var(--font-size-default);
	line-height: 1.5;
}

/* Setup Steps */
.setup-steps {
	max-width: 600px;
	margin: 0 auto;
}

.setup-step {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.setup-number {
	width: 28px;
	height: 28px;
	background: var(--brand);
	border-radius: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: var(--font-size-default);
	color: var(--gray-00);
	flex-shrink: 0;
}

.setup-content {
	flex: 1;
	padding-top: 0.125rem;
}

.setup-content h3 {
	font-size: var(--font-size-large);
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: var(--gray-60);
}

.setup-content>p {
	color: var(--color-text-muted);
	margin-bottom: 0.75rem;
	font-size: var(--font-size-default);
	line-height: 1.5;
}

.config-paths {
	list-style: none;
	margin: 0.5rem 0;
}

.config-paths li {
	color: var(--color-text-muted);
	font-size: var(--font-size-default);
	margin-bottom: 0.375rem;
	line-height: 1.5;
}

.config-paths strong {
	color: var(--color-text);
	font-weight: 500;
}

/* Code Blocks */
.code-block {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
	margin: 0.5rem 0;
	box-shadow: var(--shadow-sm);
}

.code-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0.875rem;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg-tertiary);
}

.code-filename {
	font-family: var(--font-mono);
	font-size: var(--font-size-small);
	color: var(--color-text-muted);
}

.copy-btn {
	padding: 0.25rem 0.5rem;
	font-size: var(--font-size-small);
	font-family: var(--font-sans);
	font-weight: 500;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all 0.15s ease;
}

.copy-btn:hover {
	background: var(--gray-00);
	color: var(--color-text);
	border-color: var(--color-border-hover);
}

.copy-btn.copied {
	background: var(--color-success);
	color: var(--gray-00);
	border-color: var(--color-success);
}

.code-content {
	padding: 0.875rem;
	overflow-x: auto;
	background: var(--gray-80);
}

.code-content pre {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--gray-15);
}

/* Tools Summary */
.tools-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.tool-category-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.75rem;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	font-size: var(--font-size-small);
	color: var(--color-text-muted);
}

.badge-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 0.25rem;
	background: var(--brand);
	color: var(--gray-00);
	border-radius: 0.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
}

/* Table of Contents */
.toc {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-sm);
}

.toc h4 {
	font-size: var(--font-size-small);
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.625rem;
}

.toc-links {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.toc-link {
	padding: 0.5rem 0.75rem;
	background: var(--color-bg-tertiary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-size: var(--font-size-default);
	color: var(--color-text-muted);
	transition: all 0.15s ease;
}

.toc-link:hover {
	color: var(--color-accent);
	border-color: var(--color-accent);
	background: var(--color-accent-muted);
	text-decoration: none;
}

/* Documentation Sections */
.docs-section {
	margin-bottom: 2rem;
	scroll-margin-top: 80px;
}

.docs-category-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: var(--gray-60);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.docs-category-title::before {
	content: '';
	display: inline-block;
	width: 3px;
	height: 1em;
	background: var(--brand);
	border-radius: 2px;
}

.docs-category-desc {
	color: var(--color-text-muted);
	margin-bottom: 0.875rem;
	font-size: var(--font-size-default);
}

.docs-tools {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.docs-tool {
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	transition: border-color 0.15s ease;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.docs-tool:hover {
	border-color: var(--color-border-hover);
}

.docs-tool-header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 0.875rem 1rem;
	cursor: pointer;
}

.docs-tool-main {
	flex: 1;
	min-width: 0;
}

code.docs-tool-name {
	display: inline-block;
	font-size: 0.8125rem;
	padding: 0.25rem 0.5rem;
	background: var(--color-accent-light);
	color: var(--color-accent);
	font-weight: 600;
	margin-bottom: 0.375rem;
}

.docs-tool-desc {
	font-size: var(--font-size-default);
	color: var(--color-text-muted);
	margin: 0;
	line-height: 1.4;
}

.docs-tool-toggle {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--color-bg-tertiary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-text-muted);
	cursor: pointer;
	transition: all 0.15s ease;
	margin-top: 0.125rem;
}

.docs-tool-toggle:hover {
	background: var(--color-bg-secondary);
	color: var(--color-text);
	border-color: var(--color-border-hover);
}

.docs-tool-toggle .chevron-icon {
	transition: transform 0.2s ease;
}

.docs-tool-toggle[aria-expanded="true"] .chevron-icon {
	transform: rotate(180deg);
}

.docs-tool-params {
	display: none;
	padding: 0 1rem 1rem 1rem;
	border-top: 1px solid var(--color-border);
	margin-top: 0;
	background: var(--gray-05);
}

.docs-tool-params.expanded {
	display: block;
}

.params-header {
	font-size: var(--font-size-small);
	font-weight: 600;
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.75rem 0 0.5rem 0;
}

.params-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.param-item {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 0.75rem;
	font-size: var(--font-size-default);
	padding: 0.375rem 0;
	border-bottom: 1px solid var(--color-border);
}

.param-item:last-child {
	border-bottom: none;
}

.param-name {
	display: flex;
	align-items: baseline;
	gap: 0.25rem;
}

.param-name code {
	font-size: 0.75rem;
	padding: 0.125rem 0.375rem;
	background: var(--gray-10);
	color: var(--gray-50);
	font-weight: 500;
}

.param-required {
	color: #e91317;
	font-weight: 700;
	font-size: 0.875rem;
}

.param-desc {
	color: var(--color-text-muted);
	line-height: 1.4;
}

/* FAQ List */
.faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faq-item {
	padding: 1rem 1.25rem;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

.faq-item h4 {
	font-size: var(--font-size-large);
	font-weight: 600;
	color: var(--gray-60);
	margin-bottom: 0.5rem;
}

.faq-item p {
	font-size: var(--font-size-default);
	color: var(--color-text-muted);
	line-height: 1.5;
	margin: 0;
}

.faq-item a {
	color: var(--color-accent);
}

/* Footer */
.footer {
	border-top: 1px solid var(--color-border);
	padding: 1.5rem 0;
	margin-top: auto;
	color: var(--color-text-muted);
	font-size: var(--font-size-default);
	background: var(--color-bg-secondary);
}

.footer-inner {
	display: flex;
	justify-content: center;
	align-items: center;
}

.footer-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-text-muted);
	transition: color 0.15s ease;
}

.footer-brand:hover {
	color: var(--color-text);
	text-decoration: none;
}

.footer-brand strong {
	color: var(--color-text);
	font-weight: 600;
}

.footer-teamai-logo {
	height: 18px;
	width: auto;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}

.footer-brand:hover .footer-teamai-logo {
	opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
	.hero h1 {
		font-size: 1.875rem;
	}

	.hero>p {
		font-size: var(--font-size-large);
	}

	.tabs {
		width: 100%;
		flex-wrap: wrap;
		justify-content: center;
	}

	.tab {
		padding: 0.5rem 0.75rem;
		font-size: var(--font-size-small);
	}

	.header-inner {
		flex-direction: column;
		gap: 0.75rem;
		height: auto;
		padding: 0.75rem 0;
	}

	.nav {
		flex-wrap: wrap;
		justify-content: center;
	}

	.footer-inner {
		flex-direction: column;
		gap: 0.75rem;
		text-align: center;
	}

	.docs-tool-header {
		flex-direction: row;
	}

	.param-item {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}

	.param-name {
		margin-bottom: 0.125rem;
	}
}