/* SurelyCrm Help Center Styles */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    background: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection */
::selection {
    background: rgba(37, 99, 235, 0.15);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 35;
}

.sidebar-overlay.open {
    display: block;
}

/* Sidebar nav items */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #475569;
    border-radius: 0.375rem;
    margin: 0 0.5rem;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* Main content offset */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
}

/* Content typography */
.content-body h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.content-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    scroll-margin-top: 6rem;
}

.content-body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 6rem;
}

.content-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-body p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #475569;
}

.content-body ul, .content-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
    color: #475569;
}

.content-body li::marker {
    color: #94a3b8;
}

.content-body a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.content-body a:hover {
    text-decoration: underline;
}

.content-body code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

.content-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.content-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

.content-body blockquote {
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #1e40af;
}

.content-body blockquote p:last-child {
    margin-bottom: 0;
}

.content-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.content-body th {
    background: #f8fafc;
    font-weight: 600;
    text-align: left;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.content-body td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.content-body tr:hover td {
    background: #f8fafc;
}

.content-body img {
    max-width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.content-body strong {
    color: #0f172a;
    font-weight: 600;
}

/* Callout boxes */
.callout {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.callout-info code {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.callout-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.callout-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.callout-danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #2563eb;
}

/* Search */
.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fff;
    transition: all 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 50;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* On this page nav */
.toc-nav {
    position: fixed;
    right: 2rem;
    top: 6rem;
    width: 200px;
    display: none;
}

.toc-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.toc-link {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    text-decoration: none;
    transition: all 0.15s;
}

.toc-link:hover {
    color: #334155;
}

.toc-link.active {
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-toggle {
        display: flex;
    }
    .toc-nav {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .toc-nav {
        display: block;
    }
    .content-wrapper {
        max-width: 720px;
    }
}

/* Print */
@media print {
    .sidebar, .mobile-toggle, .toc-nav {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation: none !important;
        transition: none !important;
    }
}
