/* Washeej API v1 Documentation — dedicated design system */

:root {
    --v1-bg: #f8fafc;
    --v1-surface: #ffffff;
    --v1-border: #e2e8f0;
    --v1-border-strong: #cbd5e1;
    --v1-text: #0f172a;
    --v1-text-secondary: #475569;
    --v1-text-muted: #64748b;
    --v1-accent: #2563eb;
    --v1-accent-soft: #eff6ff;
    --v1-accent-hover: #1d4ed8;
    --v1-sidebar-width: 280px;
    --v1-header-height: 64px;
    --v1-content-max: 920px;
    --v1-font: "Inter", system-ui, -apple-system, sans-serif;
    --v1-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --v1-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --v1-radius: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.v1-docs {
    margin: 0;
    font-family: var(--v1-font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--v1-text);
    background: var(--v1-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--v1-accent);
    text-decoration: none;
}

a:hover {
    color: var(--v1-accent-hover);
    text-decoration: underline;
}

code,
kbd {
    font-family: var(--v1-mono);
    font-size: 0.86em;
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.12em 0.4em;
    border-radius: 4px;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 13px;
}

/* Header */
.v1-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--v1-header-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--v1-border);
}

.v1-header__inner {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.v1-header__menu {
    display: none;
    border: 0;
    background: transparent;
    padding: 6px;
    cursor: pointer;
    color: var(--v1-text);
}

.v1-header__logo img {
    height: 32px;
    width: auto;
    display: block;
}

.v1-edition-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    padding: 3px;
    background: #f1f5f9;
    border-radius: 999px;
}

.v1-edition-tabs a {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--v1-text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.v1-edition-tabs a:hover {
    color: var(--v1-text);
    text-decoration: none;
}

.v1-edition-tabs a.is-active {
    background: var(--v1-surface);
    color: var(--v1-accent);
    box-shadow: var(--v1-shadow);
}

.v1-header__search {
    margin-left: auto;
    position: relative;
    min-width: 220px;
    max-width: 320px;
    flex: 1;
}

.v1-header__search input {
    width: 100%;
    border: 1px solid var(--v1-border);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M12 12l3 3'/%3E%3C/svg%3E") 12px center no-repeat;
    outline: none;
}

.v1-header__search input:focus {
    border-color: var(--v1-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.v1-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--v1-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    max-height: 320px;
    overflow: auto;
    z-index: 120;
}

.v1-search-results.is-open {
    display: block;
}

.v1-search-results a {
    display: block;
    padding: 10px 14px;
    color: var(--v1-text);
    text-decoration: none;
    border-bottom: 1px solid var(--v1-border);
    font-size: 13px;
}

.v1-search-results a:last-child {
    border-bottom: 0;
}

.v1-search-results a:hover,
.v1-search-results a.is-active {
    background: var(--v1-accent-soft);
}

.v1-search-results .muted {
    display: block;
    color: var(--v1-text-muted);
    font-size: 11px;
    margin-top: 2px;
}

.v1-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v1-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    text-decoration: none !important;
    cursor: pointer;
}

.v1-btn--ghost {
    color: var(--v1-text-secondary);
    border-color: var(--v1-border);
    background: #fff;
}

.v1-btn--ghost:hover {
    color: var(--v1-text);
    border-color: var(--v1-border-strong);
}

.v1-btn--primary {
    background: var(--v1-accent);
    color: #fff !important;
}

.v1-btn--primary:hover {
    background: var(--v1-accent-hover);
}

/* Shell */
.v1-shell {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--v1-sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - var(--v1-header-height));
}

.v1-sidebar-overlay {
    display: none;
}

.v1-sidebar {
    position: sticky;
    top: var(--v1-header-height);
    height: calc(100vh - var(--v1-header-height));
    overflow-y: auto;
    border-right: 1px solid var(--v1-border);
    background: var(--v1-surface);
    padding: 24px 16px 40px;
}

.v1-sidebar__group {
    margin-bottom: 24px;
}

.v1-sidebar__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v1-text-muted);
    padding: 0 10px;
    margin-bottom: 8px;
}

.v1-sidebar__link {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--v1-text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none !important;
    margin-bottom: 2px;
}

.v1-sidebar__link:hover {
    background: #f1f5f9;
    color: var(--v1-text);
}

.v1-sidebar__link.is-active {
    background: var(--v1-accent-soft);
    color: var(--v1-accent);
    font-weight: 600;
}

.v1-sidebar__external {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--v1-border);
}

.v1-sidebar__external a {
    display: block;
    padding: 6px 10px;
    font-size: 12.5px;
    color: var(--v1-text-muted);
    text-decoration: none !important;
}

.v1-sidebar__external a:hover {
    color: var(--v1-accent);
}

/* Content */
.v1-main {
    padding: 40px 48px 80px;
}

.v1-content {
    max-width: var(--v1-content-max);
}

.v1-page-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--v1-accent);
    margin: 0 0 8px;
}

.v1-page-title {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--v1-text);
}

.v1-page-lead {
    font-size: 16px;
    color: var(--v1-text-secondary);
    margin: 0 0 28px;
}

.v1-section {
    margin: 40px 0;
}

.v1-section h2 {
    font-size: 20px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--v1-border);
}

.v1-section h3 {
    font-size: 16px;
    margin: 24px 0 10px;
}

.v1-section p,
.v1-section li {
    color: var(--v1-text-secondary);
}

.v1-section ol,
.v1-section ul {
    padding-left: 22px;
    margin: 0 0 16px;
}

.v1-section li {
    margin-bottom: 6px;
}

/* Endpoint header */
.v1-endpoint {
    border: 1px solid var(--v1-border);
    border-radius: var(--v1-radius);
    background: var(--v1-surface);
    margin: 28px 0;
    overflow: hidden;
    box-shadow: var(--v1-shadow);
    width: 100%;
}

.v1-endpoint__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--v1-border);
}

.v1-endpoint__path {
    font-family: var(--v1-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--v1-text);
    background: transparent;
    padding: 0;
    margin: 0;
    flex: 1 1 auto;
    min-width: min(100%, 12rem);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    word-break: normal;
    line-height: 1.4;
    max-width: 100%;
}

.v1-endpoint__header .v1-method,
.v1-endpoint__header .v1-scope,
.v1-endpoint__header .v1-badge,
.v1-endpoint__header .v1-btn-copy {
    flex: 0 0 auto;
}

.v1-btn-copy {
    border: 1px solid var(--v1-border);
    background: #fff;
    color: var(--v1-text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.v1-btn-copy:hover,
.v1-btn-copy.is-copied {
    border-color: var(--v1-accent);
    color: var(--v1-accent);
    background: var(--v1-accent-soft);
}

.v1-btn-copy.is-copy-failed,
.v1-code__copy.is-copy-failed {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
    background: #fef2f2 !important;
}

.v1-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.v1-endpoint__body {
    padding: 18px 16px 20px;
}

.v1-endpoint__summary {
    margin: 0 0 14px;
    color: var(--v1-text-secondary);
}

.v1-notes-list {
    margin: 0;
    padding-left: 18px;
}

.v1-endpoint__errors {
    margin: 12px 0 0;
    color: var(--v1-text-secondary);
    font-size: 14px;
}

/* Method badges */
.v1-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: var(--v1-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.v1-method--get {
    background: rgba(21, 128, 61, 0.12);
    color: #15803d;
}

.v1-method--post {
    background: rgba(29, 78, 216, 0.12);
    color: #1d4ed8;
}

.v1-method--patch {
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
}

.v1-method--delete {
    background: rgba(185, 28, 28, 0.12);
    color: #b91c1c;
}

.v1-scope {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--v1-text-secondary);
    font-family: var(--v1-mono);
    font-size: 11px;
    font-weight: 600;
}

.v1-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.v1-badge--reserved {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.v1-badge--public {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Tables */
.v1-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 12px 0 18px;
}

.v1-table th,
.v1-table td {
    border: 1px solid var(--v1-border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.v1-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--v1-text);
}

.v1-table td {
    color: var(--v1-text-secondary);
}

.v1-table td code {
    font-size: 12px;
}

.v1-req {
    font-size: 11px;
    font-weight: 700;
    color: #b91c1c;
}

.v1-opt {
    font-size: 11px;
    font-weight: 600;
    color: var(--v1-text-muted);
}

/* Code blocks */
.v1-code {
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0 18px;
    border: 1px solid #1e293b;
    background: #0f172a;
}

.v1-code__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1e293b;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.v1-code__copy {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.v1-code__copy:hover,
.v1-code__copy.is-copied {
    background: rgba(148, 163, 184, 0.15);
    color: #fff;
}

.v1-code__body {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
}

.v1-code__body pre {
    margin: 0;
    font-family: var(--v1-mono);
    font-size: 12.5px;
    line-height: 1.55;
    color: #e2e8f0;
    white-space: pre;
}

/* Callouts */
.v1-callout {
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.55;
}

.v1-callout__title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.v1-callout--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
}

.v1-callout--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
}

.v1-callout--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.v1-callout--note {
    background: #f8fafc;
    border: 1px solid var(--v1-border);
    color: var(--v1-text-secondary);
}

.v1-steps {
    display: grid;
    gap: 12px;
    margin: 16px 0 24px;
}

.v1-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: start;
}

.v1-step__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--v1-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v1-step__body strong {
    display: block;
    color: var(--v1-text);
    margin-bottom: 2px;
}

.v1-step__body span {
    color: var(--v1-text-secondary);
    font-size: 14px;
}

.v1-nav-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--v1-border);
}

.v1-nav-footer a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--v1-border);
    border-radius: 10px;
    background: #fff;
    text-decoration: none !important;
    color: var(--v1-text);
    flex: 1;
    max-width: 48%;
}

.v1-nav-footer a:hover {
    border-color: var(--v1-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.v1-nav-footer .label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v1-text-muted);
    margin-bottom: 4px;
}

.v1-nav-footer .title {
    font-weight: 600;
    color: var(--v1-accent);
}

.v1-nav-footer a.is-next {
    text-align: right;
    margin-left: auto;
}

.v1-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--v1-border);
    margin: 8px 0 0;
}

.v1-tabs a {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--v1-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    text-decoration: none !important;
}

.v1-tabs a.is-active {
    color: var(--v1-accent);
    border-bottom-color: var(--v1-accent);
}

.v1-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--v1-border);
    color: var(--v1-text-muted);
    font-size: 12.5px;
}

@media (max-width: 991px) {
    .v1-header__menu {
        display: inline-flex;
    }

    .v1-edition-tabs {
        display: none;
    }

    .v1-header__search {
        min-width: 140px;
    }

    .v1-shell {
        grid-template-columns: 1fr;
    }

    .v1-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 190;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    .v1-sidebar-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .v1-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(300px, 86vw);
        z-index: 200;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.15);
    }

    .v1-sidebar.is-open {
        transform: translateX(0);
    }

    .v1-main {
        padding: 28px 20px 64px;
    }

    .v1-page-title {
        font-size: 26px;
    }

    .v1-nav-footer {
        flex-direction: column;
    }

    .v1-nav-footer a,
    .v1-nav-footer a.is-next {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 575px) {
    .v1-header__actions .v1-btn--ghost span {
        display: none;
    }

    .v1-header__inner {
        padding: 0 12px;
        gap: 10px;
    }
}
