/**
 * CarsPoint Documentation - Technical Documentation Styles
 * Specific styles for technical documentation page
 */

header {
    background: linear-gradient(165deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    color: #ffffff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15, 76, 117, 0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}

header .container {
    position: relative;
    z-index: 1;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.15);
    border: 1px solid rgba(201, 162, 39, 0.3);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 24px;
}

header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

header .tagline {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.85;
    max-width: 650px;
    line-height: 1.7;
}

.header-meta {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
}

.header-meta-value {
    font-weight: 600;
    font-size: 0.95rem;
}

nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

nav .container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
}

nav .container::-webkit-scrollbar {
    display: none;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 20px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    position: relative;
}

nav a:hover {
    color: var(--accent);
}

nav a.active {
    color: var(--accent);
    border-bottom-color: var(--gold);
}

main {
    padding: 70px 0;
}

.toc {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    padding: 48px;
    border-radius: var(--radius-xl);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.toc::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.toc h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.toc-subtitle {
    opacity: 0.7;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    position: relative;
    z-index: 1;
}

.toc a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    font-size: 0.9rem;
}

.toc a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(6px);
    border-color: rgba(201, 162, 39, 0.3);
}

.toc-number {
    background: var(--gold);
    color: var(--primary);
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

section {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 56px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 56px;
    right: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--accent-light), var(--gold));
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: var(--transition);
}

section:hover::before {
    opacity: 1;
}

section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
}

section h2 .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
    line-height: 1.7;
}

h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 48px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

h3:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 32px 0 16px;
}

p {
    color: var(--text-body);
    margin-bottom: 18px;
}

code {
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.85em;
    background: var(--bg-dark);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

pre {
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    background: var(--primary);
    color: #e2e8f0;
    padding: 28px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.875rem;
    line-height: 1.7;
    box-shadow: var(--shadow-lg);
    position: relative;
}

pre::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

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

.table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: var(--bg-paper);
    font-weight: 600;
    color: var(--text-dark);
    padding: 16px 24px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-body);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-paper);
}

.diagram-container {
    background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-dark) 100%);
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 28px 0;
    border: 1px solid var(--border);
    text-align: center;
}

.diagram-container .mermaid {
    display: inline-block;
}

ul,
ol {
    margin: 18px 0 24px 0;
    padding-left: 0;
    list-style: none;
}

li {
    margin: 14px 0;
    color: var(--text-body);
    padding-left: 28px;
    position: relative;
}

li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

li strong {
    color: var(--text-dark);
}

.method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.method-get {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.method-post {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.method-patch {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.method-delete {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.alert {
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin: 28px 0;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.alert-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
}

.alert-info .alert-icon {
    background: #3b82f6;
    color: white;
}

.alert-info .alert-title {
    color: #1e40af;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
}

.alert-warning .alert-icon {
    background: #f59e0b;
    color: white;
}

.alert-warning .alert-title {
    color: #92400e;
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
}

.alert-success .alert-icon {
    background: #10b981;
    color: white;
}

.alert-success .alert-title {
    color: #065f46;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.feature-card {
    background: var(--bg-paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--accent-light));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--gold);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h4 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 28px 0;
}

.flow-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.flow-step:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-soft);
}

.flow-step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 76, 117, 0.3);
}

.flow-step-content {
    flex: 1;
}

.flow-step-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.flow-step-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.tech-item {
    background: var(--bg-paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.tech-item:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.tech-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
}

.tech-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0;
    margin-top: 40px;
}

footer .container {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.footer-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.footer-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 24px auto;
}

.footer-meta {
    font-size: 0.875rem;
    opacity: 0.6;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

@media (max-width: 768px) {
    header {
        padding: 60px 0 50px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    header .tagline {
        font-size: 1rem;
    }

    .header-meta {
        flex-wrap: wrap;
        gap: 20px;
    }

    section {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }

    section h2 {
        font-size: 1.5rem;
    }

    .toc {
        padding: 32px 24px;
    }

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

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

    nav a {
        padding: 16px 14px;
        font-size: 0.8rem;
    }

    .flow-step {
        flex-direction: column;
        gap: 16px;
    }
}

@media print {
    nav,
    footer {
        display: none;
    }

    section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    header {
        background: #1a1a2e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .toc {
        background: #1a1a2e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
