/* BZZE Ads Documentation - Shared Styles */

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #10b981;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --border: #e5e7eb;
    --sidebar-width: 280px;
    --header-height: 64px;
    --sidebar-bg: #1f2937;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.header-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.header-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.header-btn:hover::before {
    opacity: 1;
}

.header-btn:active {
    color: #ffffff;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.header-btn span {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

/* Layout */
.docs-layout {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 100;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) rgba(0,0,0,0.2);
}

.search-container {
    padding: 1.5rem;
    position: sticky;
    top: 0;
    background: var(--sidebar-bg);
    z-index: 10;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 0.875rem;
    color: white;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    width: 16px;
    height: 16px;
}

.sidebar-nav {
    padding-bottom: 2rem;
}

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

.sidebar-section-title {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 3px solid #667eea;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.nav-text {
    font-weight: 500;
    flex: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem;
    max-width: calc(100% - var(--sidebar-width));
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text);
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text);
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #1e293b;
}

.code-header {
    background: linear-gradient(to right, #334155, #1e293b);
    color: #e2e8f0;
    padding: 0.875rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.code-header span {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #94a3b8;
    font-family: 'Monaco', 'Consolas', monospace;
}

.copy-code-btn {
    background: rgba(99, 102, 241, 0.9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.copy-code-btn:hover {
    background: rgba(99, 102, 241, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.copy-code-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

pre[class*="language-"] {
    margin: 0 !important;
    border-radius: 0 !important;
    background: #1e293b !important;
    padding: 1.25rem !important;
    font-size: 0.875rem !important;
    line-height: 1.7 !important;
}

code[class*="language-"] {
    background: transparent !important;
    color: #e2e8f0 !important;
    text-shadow: none !important;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace !important;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

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

.alert-success {
    background: #dcfce7;
    border-color: #10b981;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Lists */
ul, ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-light);
}

li {
    margin: 0.5rem 0;
    line-height: 1.75;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .header-nav {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Mobile & WebView Documentation Styles */
.platform-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.platform-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.platform-card.supported {
    border-color: #10b981;
}

.platform-card.not-supported {
    border-color: #ef4444;
    opacity: 0.7;
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.platform-icon i {
    width: 48px;
    height: 48px;
}

.info-box-icon i,
.success-box-icon i,
.warning-box-icon i {
    width: 24px;
    height: 24px;
}

.practice-icon i {
    width: 40px;
    height: 40px;
}

.platform-card h3 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.platform-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0.5rem 0 1rem 0;
}

.platform-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.not-supported-badge {
    background: #ef4444;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.pros, .cons {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.pros h4 {
    color: #10b981;
    margin-bottom: 1rem;
}

.cons h4 {
    color: #f59e0b;
    margin-bottom: 1rem;
}

.pros ul, .cons ul {
    list-style: none;
    padding: 0;
}

.pros li, .cons li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.cons li:before {
    content: "!";
    position: absolute;
    left: 0;
    color: #f59e0b;
    font-weight: bold;
}

.device-test-checklist {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.device-test-checklist h4 {
    margin-bottom: 1rem;
}

.device-test-checklist ul {
    list-style: none;
    padding: 0;
}

.device-test-checklist li {
    padding: 0.5rem 0;
}

.checklist-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.checklist-container h3 {
    margin-bottom: 1.5rem;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
    border-bottom: none;
}

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

.best-practice-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.best-practice-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.practice-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.best-practice-card h3 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.best-practice-card p {
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .platform-support-grid {
        grid-template-columns: 1fr;
    }
    
    .best-practices-grid {
        grid-template-columns: 1fr;
    }
}

/* Platform Support Cards (Mobile Pages) */
.platform-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.platform-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.platform-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.platform-card.supported {
    border-color: #10b981;
}

.platform-card.supported:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.platform-card.not-supported {
    border-color: #ef4444;
    opacity: 0.7;
}

.platform-icon {
    margin-bottom: 1rem;
}

.platform-icon i {
    width: 48px;
    height: 48px;
    color: #10b981;
}

.platform-card.not-supported .platform-icon i {
    color: #ef4444;
}

.platform-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #1f2937;
}

.platform-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.5rem 0 1rem;
}

.platform-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.not-supported-badge {
    background: #fee2e2;
    color: #991b1b;
}

/* Documentation Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.docs-table thead {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: #ffffff;
}

.docs-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.docs-table tbody tr:last-child {
    border-bottom: none;
}

.docs-table tbody tr:hover {
    background-color: #f9fafb;
}

.docs-table tbody td {
    padding: 1rem;
    font-size: 0.9375rem;
    vertical-align: top;
}

.docs-table tbody td code {
    background: #f3f4f6;
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

.docs-table tbody td:first-child {
    font-weight: 500;
    width: 25%;
}

.docs-table tbody td:nth-child(2) {
    width: 35%;
}

.docs-table tbody td:last-child {
    width: 40%;
}
