/* ========================================
   Sol Documentation - CSS Design System
   ======================================== */

:root {
    --sol-primary: #f59e0b;
    --sol-primary-dark: #d97706;
    --sol-code-bg: #0f172a;
    --sol-bg-dark: #1e293b;
    --sol-bg-darker: #0f172a;
    --sol-text: #e2e8f0;
    --sol-text-muted: #94a3b8;
    --sol-border: rgba(245, 158, 11, 0.2);
    --sidebar-width: 280px;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--sol-bg-dark) 0%, var(--sol-bg-darker) 100%);
    min-height: 100vh;
    color: var(--sol-text);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sol-border);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--sol-primary) !important;
}

.nav-link {
    color: var(--sol-text-muted) !important;
    transition: all 0.3s;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sol-primary) !important;
    background: rgba(245, 158, 11, 0.1);
}

/* Docs Layout */
.docs-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.docs-sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid var(--sol-border);
    padding: 1.5rem;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sol-primary);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sol-border);
    margin-bottom: 1rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sol-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--sol-text);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--sol-primary);
    padding-left: 1rem;
}

.sidebar-nav a.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--sol-primary);
    font-weight: 500;
    border-left: 3px solid var(--sol-primary);
}

/* Main Content */
.docs-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

.docs-content.full-width {
    max-width: 100%;
    padding: 0;
}

.docs-content.with-sidebar {
    margin-left: 0;
}

/* Content Styles */
.content {
    padding: 3rem 0;
}

h1,
h2,
h3 {
    color: var(--sol-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--sol-border);
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* Sticky Header Scroll Offset */
h1[id],
h2[id],
h3[id] {
    scroll-margin-top: 100px;
}

/* API Items Styling - Standardized Pattern */
.api-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--sol-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.api-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--sol-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.api-item h3 {
    color: var(--sol-primary);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.api-item h3::before {
    content: "ƒ";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15);
    color: var(--sol-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.9rem;
    margin-right: 12px;
    font-family: 'Segoe UI', sans-serif;
    font-style: italic;
    font-weight: bold;
}

/* API Details Grid */
.api-details {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.api-detail-group {
    border-left: 2px solid rgba(245, 158, 11, 0.2);
    padding-left: 1rem;
}

.api-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sol-text-muted);
    margin-bottom: 0.25rem;
}

.api-content {
    font-size: 0.95rem;
    color: var(--sol-text);
}

.api-content ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: none;
}

.api-content ul li {
    margin-bottom: 0.25rem;
    position: relative;
}

.api-content ul li::before {
    content: "•";
    color: var(--sol-primary);
    position: absolute;
    left: -1rem;
}

.api-content code {
    color: var(--sol-primary);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

/* Code Blocks */
.code-block {
    background: var(--sol-code-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    border: 1px solid var(--sol-border);
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block .keyword {
    color: #c084fc;
}

.code-block .string {
    color: #4ade80;
}

.code-block .comment {
    color: #64748b;
    font-style: italic;
}

.code-block .function {
    color: #60a5fa;
}

.code-block .number {
    color: #f472b6;
}

.code-block .label {
    color: #fbbf24;
}

/* Friendly Boxes */
.tip-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.tip-box::before {
    content: "💡 Dica: ";
    font-weight: 600;
    color: #22c55e;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.warning-box::before {
    content: "⚠️ Atenção: ";
    font-weight: 600;
    color: var(--sol-primary);
}

.success-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}

.success-box::before {
    content: "🎉 ";
}

/* Hero Section (Home) */
.hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    color: var(--sol-primary);
}

/* Feature Cards */
.feature-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--sol-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--sol-primary);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--sol-primary);
    margin-bottom: 1rem;
}

/* Type Cards */
.type-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--sol-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s;
}

.type-card:hover {
    border-color: var(--sol-primary);
}

.badge-primitive {
    background: rgba(245, 158, 11, 0.2);
    color: var(--sol-primary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Buttons */
.btn-sol {
    background: linear-gradient(135deg, var(--sol-primary) 0%, var(--sol-primary-dark) 100%);
    color: #000;
    font-weight: 600;
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-sol:hover {
    background: linear-gradient(135deg, var(--sol-primary-dark) 0%, var(--sol-primary) 100%);
    color: #000;
    transform: translateY(-2px);
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--sol-primary);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 1000;
    opacity: 0.6;
    text-decoration: none;
}

.btn-back-to-top:hover {
    background: var(--sol-primary-dark);
    transform: translateY(-5px);
    opacity: 1;
    color: #000;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--sol-border);
    padding: 1.5rem 0;
    text-align: center;
}

/* Tables */
.table-dark {
    background: rgba(30, 30, 30, 0.5);
}

/* List Group */
.list-group-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: var(--sol-border);
    color: var(--sol-text);
}

.list-group-item.list-group-item-action:hover,
.list-group-item.list-group-item-action:focus {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--sol-primary);
    border-color: var(--sol-primary);
    z-index: 2;
}

/* Fun Elements */
.emoji-big {
    font-size: 3rem;
    display: block;
    text-align: center;
    margin: 1rem 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--sol-primary);
    color: #000;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 0.75rem;
}

/* Responsive */
@media (max-width: 992px) {
    .docs-sidebar {
        display: none;
    }

    .docs-content {
        padding: 1.5rem;
    }
}
/* Copy Button */
.btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--sol-text-muted);
    padding: 0.4rem;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}
.code-block:hover .btn-copy {
    opacity: 1;
}
.btn-copy:hover {
    background: var(--sol-primary);
    color: #000;
}
