/* ==========================================================================
   ADB Device Manager - Official Documentation CSS
   Implements a strict editorial design system matching trust_center.css:
   - Modern clean typography and spacing
   - Cohesive light grey borders and card systems
   - High visual rhythm and whitespace
   - Clean double-column layout (sidebar + main content)
   - Dynamic states for navigation links and tabs
   ========================================================================== */

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-bg-page: #ffffff;
    --color-bg-card: #fafafa;
    --color-text-title: #111111;
    --color-text-body: #444444;
    --color-text-muted: #666666;
    --color-border: #eaeaea;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme tokens */
    --color-header-bg: rgba(255, 255, 255, 0.85);
    --color-img-bg: #ffffff;
    --color-border-hover: #cbd5e1;
    --color-highlight-bg: #f0f7ff;
    --color-nav-hover-bg: #f0f7ff;
    --color-gold-text: #b45309;
    --color-gold-bg: #fffbeb;
    --color-gold-hover-text: #92400e;
    --color-gold-hover-bg: #fef3c7;

    /* Alerts */
    --alert-warning-bg: #fffbeb;
    --alert-warning-border: #fde68a;
    --alert-warning-text: #92400e;
    --alert-warning-title: #b45309;

    --alert-tip-bg: #f0fdf4;
    --alert-tip-border: #bbf7d0;
    --alert-tip-text: #166534;
    --alert-tip-title: #15803d;

    --alert-info-bg: #eff6ff;
    --alert-info-border: #bfdbfe;
    --alert-info-text: #1e40af;
    --alert-info-title: #1d4ed8;

    --alert-error-bg: #fef2f2;
    --alert-error-border: #fee2e2;
    --alert-error-text: #991b1b;
    --alert-error-title: #b91c1c;
}

[data-theme="dark"] {
    --color-bg-page: #0b0f19;
    --color-bg-card: #131b2e;
    --color-text-title: #f8fafc;
    --color-text-body: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: #1e293b;

    --color-header-bg: rgba(11, 15, 25, 0.85);
    --color-img-bg: #131b2e;
    --color-border-hover: #334155;
    --color-highlight-bg: rgba(37, 99, 235, 0.15);
    --color-nav-hover-bg: rgba(37, 99, 235, 0.12);
    --color-gold-text: #fbbf24;
    --color-gold-bg: rgba(245, 158, 11, 0.12);
    --color-gold-hover-text: #f59e0b;
    --color-gold-hover-bg: rgba(245, 158, 11, 0.2);

    /* Alerts in dark mode */
    --alert-warning-bg: rgba(245, 158, 11, 0.08);
    --alert-warning-border: rgba(245, 158, 11, 0.25);
    --alert-warning-text: #fde047;
    --alert-warning-title: #f59e0b;

    --alert-tip-bg: rgba(34, 197, 94, 0.08);
    --alert-tip-border: rgba(34, 197, 94, 0.25);
    --alert-tip-text: #86efac;
    --alert-tip-title: #22c55e;

    --alert-info-bg: rgba(59, 130, 246, 0.08);
    --alert-info-border: rgba(59, 130, 246, 0.25);
    --alert-info-text: #93c5fd;
    --alert-info-title: #3b82f6;

    --alert-error-bg: rgba(239, 68, 68, 0.08);
    --alert-error-border: rgba(239, 68, 68, 0.25);
    --alert-error-text: #fca5a5;
    --alert-error-title: #ef4444;
}

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

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

body {
    width: 100%;
    min-height: 100vh;
    background: var(--color-bg-page);
    font-family: var(--font-sans);
    color: var(--color-text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header Styling
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 32px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-title);
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: color 0.15s ease, transform 0.2s ease;
    outline: none;
    margin-left: 8px;
}

.theme-toggle-btn:hover {
    color: var(--color-primary);
    transform: translateY(-1px);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Toggle visibility of sun/moon icons depending on the theme */
[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

:root:not([data-theme="dark"]) .theme-toggle-btn .sun-icon {
    display: none;
}
:root:not([data-theme="dark"]) .theme-toggle-btn .moon-icon {
    display: block;
}

/* ==========================================================================
   Documentation Container
   ========================================================================== */
.docs-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
    position: sticky;
    top: 80px;
    width: 260px;
    height: calc(100vh - 80px);
    padding: 32px 16px 32px 0;
    overflow-y: auto;
    background: var(--color-bg-page);
    border-right: 1px solid var(--color-border);
    flex-shrink: 0;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.sidebar-title {
    color: var(--color-text-title);
    font-size: 14px;
    margin-bottom: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-title);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.nav-section-link:hover,
.nav-section-link.active {
    background: var(--color-nav-hover-bg);
    color: var(--color-primary);
}

.sidebar-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.nav-section-link:hover .sidebar-icon,
.nav-section-link.active .sidebar-icon {
    color: var(--color-primary);
}

.nav-subsection {
    list-style: none;
    margin-left: 18px;
    padding-left: 12px;
    border-left: 1px solid var(--color-border);
}

.nav-subsection li {
    margin-bottom: 4px;
}

.nav-subsection a {
    display: block;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-subsection a:hover,
.nav-subsection a.active {
    color: var(--color-primary);
    background: var(--color-nav-hover-bg);
}

.nav-subsection a.nav-gold {
    color: var(--color-gold-text);
    font-weight: 600;
    background: var(--color-gold-bg);
}

.nav-subsection a.nav-gold:hover {
    color: var(--color-gold-hover-text);
    background: var(--color-gold-hover-bg);
}

/* ==========================================================================
   Main Documentation Content
   ========================================================================== */
.docs-content {
    flex: 1;
    padding: 32px 0 64px 48px;
    max-width: 900px;
}

.intro-section {
    margin-bottom: 48px;
}

.intro-section h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text-title);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.intro-text {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 720px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Mode Legend
   ========================================================================== */
.mode-legend {
    display: flex;
    gap: 16px 24px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: var(--color-bg-card);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    margin-bottom: 48px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-body);
}

/* ==========================================================================
   Mode Badges
   ========================================================================== */
.mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.mode-badge.adb {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.mode-badge.app {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
}

.mode-badge.hybrid {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.mode-badge.beta {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    animation: betaPulse 2s ease-in-out infinite;
}

@keyframes betaPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

.mode-badge.desktop {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}

.links {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.links:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   Hotkey Badge
   ========================================================================== */
.hotkey-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
}

.hotkey-badge::before {
    content: "⌨";
    font-size: 12px;
}

/* ==========================================================================
   Documentation Sections
   ========================================================================== */
.doc-section {
    margin-bottom: 64px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    color: var(--color-text-title);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.section-intro {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ==========================================================================
   Feature Details (Clean layout cards with small border and border-radius)
   ========================================================================== */
.feature-detail {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.feature-detail:last-child {
    margin-bottom: 0;
}

.feature-detail:hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.feature-detail.highlight {
    background: var(--color-highlight-bg);
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

/* Feature Header with Title & Badges */
.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.feature-header h3 {
    font-size: 15px;
    color: var(--color-text-title);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.limit-icon {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.feature-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.feature-detail p {
    color: var(--color-text-body);
    line-height: 1.6;
    font-size: 13px;
    margin: 0;
}

/* Feature Images */
.image-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 16px;
    max-width: 100%;
}

.feature-image {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-img-bg);
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
    cursor: pointer;
}

.feature-image:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* Expand Button on Image Hover */
.image-expand-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(37, 99, 235, 0.9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.image-expand-btn svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.image-wrapper:hover .image-expand-btn {
    opacity: 1;
    transform: scale(1);
}

.image-expand-btn:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.05);
}

/* ==========================================================================
   Fullscreen Lightbox Overlay
   ========================================================================== */
#image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

#image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    cursor: default;
}

#image-lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: #ef4444;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    z-index: 10000;
}

.lightbox-close:hover {
    background: #dc2626;
    transform: scale(1.08) rotate(90deg);
}

/* ==========================================================================
   Utility Classes & Typography
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code {
    background: var(--color-bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--color-text-title);
    border: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================================================
   Security & Privacy Section
   ========================================================================== */
.security-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 48px;
}

.security-section h2 {
    color: var(--color-text-title);
    font-size: 20px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-section .section-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.security-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.25s ease;
}

.security-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.security-card .card-icon {
    width: 40px;
    height: 40px;
    background: #f0f7ff;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-primary);
}

.security-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-text-title);
}

.security-card p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Permissions Table */
.permissions-table {
    margin-top: 32px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.permissions-table h4 {
    padding: 14px 20px;
    background: var(--color-bg-card);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-title);
    margin: 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-page);
    gap: 16px;
}

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

.permission-name {
    font-weight: 700;
    color: var(--color-text-title);
    font-size: 13px;
    white-space: nowrap;
}

.permission-reason {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: right;
    line-height: 1.5;
}

/* ==========================================================================
   Troubleshooting Section
   ========================================================================== */
.troubleshooting-section {
    background: var(--color-bg-page);
    border-radius: 12px;
    margin-bottom: 64px;
}

.troubleshooting-section h2 {
    font-size: 20px;
    color: var(--color-text-title);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.troubleshooting-section .section-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.subsection-title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-title);
    margin: 32px 0 16px;
}

.subsection-title-with-icon i {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.error-card {
    background: var(--color-bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
    border-left: 4px solid #ef4444;
    transition: all 0.2s ease;
}

.error-card:hover {
    border-color: #cbd5e1;
    border-left-color: #ef4444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.error-card.warning {
    border-left-color: #f59e0b;
}

.error-card.warning:hover {
    border-left-color: #f59e0b;
}

.error-card.info {
    border-left-color: var(--color-primary);
}

.error-card.info:hover {
    border-left-color: var(--color-primary);
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.error-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-title);
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-icon-lucide {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.error-icon-lucide.text-red {
    color: #ef4444;
}

.error-icon-lucide.text-orange {
    color: #f59e0b;
}

.error-icon-lucide.text-blue {
    color: var(--color-primary);
}

.error-tags {
    display: flex;
    gap: 6px;
}

.error-tag {
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: #fee2e2;
    color: #dc2626;
    letter-spacing: 0.03em;
}

.error-card.warning .error-tag {
    background: #fef3c7;
    color: #d97706;
}

.error-card.info .error-tag {
    background: #dbeafe;
    color: var(--color-primary);
}

.error-cause {
    font-size: 12px;
    color: var(--color-text-body);
    margin-bottom: 16px;
    line-height: 1.6;
}

.error-solution {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.error-solution h5 {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-solution ul {
    margin: 8px 0 0 16px;
    padding: 0;
}

.error-solution li {
    font-size: 12px;
    color: #047857;
    line-height: 1.6;
    margin-bottom: 4px;
}

.error-solution li:last-child {
    margin-bottom: 0;
}

/* Brand-specific issues list */
.brand-issues {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.brand-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.25s ease;
}

.brand-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05);
}

.brand-card h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-title);
    margin-bottom: 6px;
}

.brand-card p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Inline Alert Boxes
   ========================================================================== */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    border-left: 3px solid;
}

.alert-box .alert-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    color: inherit;
}

.alert-box .alert-content {
    flex: 1;
}

.alert-box .alert-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.alert-box .alert-text {
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

/* Warning Alert */
.alert-box.warning {
    background: var(--alert-warning-bg);
    border-left-color: var(--alert-warning-title);
    border: 1px solid var(--alert-warning-border);
    border-left-width: 3px;
    color: var(--alert-warning-text);
}

.alert-box.warning .alert-title {
    color: var(--alert-warning-title);
}

/* Tip Alert */
.alert-box.tip {
    background: var(--alert-tip-bg);
    border-left-color: var(--alert-tip-title);
    border: 1px solid var(--alert-tip-border);
    border-left-width: 3px;
    color: var(--alert-tip-text);
}

.alert-box.tip .alert-title {
    color: var(--alert-tip-title);
}

/* Info Alert */
.alert-box.info {
    background: var(--alert-info-bg);
    border-left-color: var(--alert-info-title);
    border: 1px solid var(--alert-info-border);
    border-left-width: 3px;
    color: var(--alert-info-text);
}

.alert-box.info .alert-title {
    color: var(--alert-info-title);
}

/* Error Alert */
.alert-box.error {
    background: var(--alert-error-bg);
    border-left-color: var(--alert-error-title);
    border: 1px solid var(--alert-error-border);
    border-left-width: 3px;
    color: var(--alert-error-text);
}

.alert-box.error .alert-title {
    color: var(--alert-error-title);
}

/* ==========================================================================
   Footer Section Styling (Unified)
   ========================================================================== */
.footer {
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg-card);
    padding: 64px 24px 32px;
    margin-top: 96px;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto 48px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px 32px;
}

.footer-contact-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-column-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-title);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-contact-item:hover {
    color: var(--color-primary);
}

.footer-contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: color 0.15s ease;
}

.footer-contact-item:hover svg {
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-copyright a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
}

.footer-copyright a:hover {
    color: var(--color-primary);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
    color: var(--color-primary);
}

.footer-gradient-border {
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
    margin-top: 48px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .docs-content {
        padding: 32px 24px 64px;
    }
}

@media (max-width: 950px) {
    .sidebar {
        display: none;
        /* Auto hides sidebar on small screen widths */
    }
}

@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
    }

    .docs-content {
        padding: 32px 16px 64px;
    }

    .intro-section h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 18px;
    }

    .feature-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mode-legend {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .security-section {
        padding: 20px;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }

    .permission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .permission-reason {
        text-align: left;
    }

    .brand-issues {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}