/* ===================================
   MichoSMS Documentation Styles
   Based on CraftCart Documentation Design
   =================================== */

:root {
    /* Primary Colors */
    --doc-primary: #2563eb;
    --doc-primary-dark: #1e40af;
    --doc-primary-light: #3b82f6;

    /* Neutral Colors */
    --doc-text-primary: #1f2937;
    --doc-text-secondary: #6b7280;
    --doc-text-muted: #9ca3af;
    --doc-bg-primary: #ffffff;
    --doc-bg-secondary: #f9fafb;
    --doc-bg-tertiary: #f3f4f6;
    --doc-border: #e5e7eb;

    /* Accent Colors */
    --doc-success: #10b981;
    --doc-warning: #f59e0b;
    --doc-danger: #ef4444;
    --doc-info: #3b82f6;

    /* Shadows */
    --doc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --doc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --doc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --doc-spacing-xs: 0.5rem;
    --doc-spacing-sm: 1rem;
    --doc-spacing-md: 1.5rem;
    --doc-spacing-lg: 2rem;
    --doc-spacing-xl: 3rem;

    /* Typography */
    --doc-font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --doc-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===================================
   Base Styles
   =================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

.documentation-page {
    font-family: var(--doc-font-family);
    color: var(--doc-text-primary);
    line-height: 1.6;
    background-color: var(--doc-bg-secondary);
    -webkit-font-smoothing: antialiased;
}

.documentation-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* ===================================
   Documentation Header/Navbar
   =================================== */

.doc-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--doc-border);
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 0.75rem 0;
}

.doc-navbar-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--doc-text-primary);
}

.doc-navbar-logo {
    height: 36px;
    width: auto;
}

.doc-navbar-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.doc-navbar-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Mobile Menu Toggle */
.doc-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--doc-border);
    color: var(--doc-text-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.doc-mobile-toggle:hover {
    background: var(--doc-bg-tertiary);
}

.doc-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-btn-primary {
    background-color: var(--doc-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.doc-btn-primary:hover {
    background-color: var(--doc-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.doc-btn-outline {
    background-color: white;
    color: var(--doc-text-primary);
    border: 1px solid var(--doc-border);
}

.doc-btn-outline:hover {
    background-color: var(--doc-bg-secondary);
    border-color: var(--doc-text-muted);
}

/* ===================================
   Layout Structure
   =================================== */

.doc-layout {
    display: flex;
    position: relative;
}

/* Sidebar Navigation */
.doc-sidebar {
    width: 300px;
    background-color: var(--doc-bg-primary);
    border-right: 1px solid var(--doc-border);
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
    padding: 1.5rem 0;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.doc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: var(--doc-border);
    border-radius: 10px;
}

.doc-search-container {
    padding: 0 1.25rem 1.5rem;
}

.doc-search-wrapper {
    position: relative;
}

.doc-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    background: var(--doc-bg-secondary);
    border: 1px solid var(--doc-border);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.doc-search-input:focus {
    outline: none;
    background: white;
    border-color: var(--doc-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.doc-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--doc-text-muted);
    pointer-events: none;
}

.doc-sidebar-section {
    margin-bottom: 2rem;
}

.doc-sidebar-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--doc-text-muted);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

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

.doc-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    color: var(--doc-text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.doc-sidebar-link:hover {
    color: var(--doc-primary);
    background: var(--doc-bg-secondary);
}

.doc-sidebar-link.active {
    color: var(--doc-primary);
    background: rgba(37, 99, 235, 0.05);
    border-left-color: var(--doc-primary);
    font-weight: 600;
}

/* Main Content Area */
.doc-content {
    flex: 1;
    min-width: 0;
    padding: 3rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Table of Contents (Right Sidebar) */
.doc-toc {
    width: 240px;
    padding: 3rem 1.5rem;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
}

.doc-toc-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--doc-text-primary);
    margin-bottom: 1rem;
}

.doc-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--doc-border);
}

.doc-toc-link {
    display: block;
    padding: 0.35rem 1rem;
    color: var(--doc-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-left: -1px;
    border-left: 1px solid transparent;
}

.doc-toc-link:hover {
    color: var(--doc-primary);
}

.doc-toc-link.active {
    color: var(--doc-primary);
    border-left-color: var(--doc-primary);
    font-weight: 600;
}

/* ===================================
   Typography
   =================================== */

.doc-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--doc-text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.doc-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--doc-text-primary);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.doc-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--doc-text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.doc-content p {
    margin-bottom: 1.25rem;
    color: var(--doc-text-secondary);
    font-size: 1.05rem;
}

.lead {
    font-size: 1.25rem !important;
    color: var(--doc-text-primary) !important;
    font-weight: 500;
}

/* ===================================
   Components
   =================================== */

.doc-alert {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    margin: 2rem 0;
    border: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-alert-info {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.doc-alert-success {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.doc-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.doc-feature-card {
    background: white;
    border: 1px solid var(--doc-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-feature-card:hover {
    border-color: var(--doc-primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.doc-feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--doc-bg-secondary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--doc-primary);
    font-size: 1.75rem;
}

/* ===================================
   Responsive Mobile
   =================================== */

@media (max-width: 1200px) {
    .doc-toc {
        display: none;
    }

    .doc-content {
        padding: 3rem 2rem;
    }
}

@media (max-width: 992px) {
    .doc-mobile-toggle {
        display: block;
    }

    .doc-sidebar {
        position: fixed;
        left: 0;
        top: 73px;
        width: 280px;
        transform: translateX(-100%);
        box-shadow: var(--doc-shadow-lg);
    }

    .doc-sidebar.open {
        transform: translateX(0);
    }

    .doc-layout {
        display: block;
    }

    .doc-content {
        padding: 2rem 1.5rem;
    }

    .doc-navbar-actions {
        display: none;
        /* Hide on mobile to focus on hamburger */
    }

    .doc-navbar-actions.show {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 2rem;
        flex-direction: column;
        border-bottom: 1px solid var(--doc-border);
        box-shadow: var(--doc-shadow-md);
    }
}

@media (max-width: 576px) {
    .doc-navbar-logo {
        height: 28px;
    }

    .doc-content h1 {
        font-size: 2.25rem;
    }
}

/* Highlighting Search Results */
mark {
    background: rgba(255, 231, 0, 0.5);
    border-radius: 2px;
    padding: 0 2px;
}

.doc-hidden {
    display: none;
}

.doc-visible {
    display: block;
}