/* 8csn-style SMM API documentation layout */

.api-doc-page {
    padding: 1.5rem 0 3rem;
    background: #fff;
    color: #333;
    border-radius: 12px;
    margin: 0 0 1.5rem;
}

.api-doc-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.api-doc-heading {
    margin: 1.75rem 0 0.85rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #222;
    line-height: 1.35;
}

.api-doc-heading:first-child {
    margin-top: 0;
}

.api-doc-heading--sub {
    margin-top: 1.25rem;
    font-size: 1.0625rem;
}

.api-doc-section {
    margin-bottom: 0.5rem;
}

.api-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    background: #fff;
}

.api-doc-table th,
.api-doc-table td {
    border: 1px solid #ddd;
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
    color: #333;
}

.api-doc-table thead th {
    background: #f5f5f5;
    font-weight: 600;
}

.api-doc-table--meta th {
    width: 34%;
    background: #f5f5f5;
    font-weight: 600;
}

.api-doc-url {
    color: #337ab7;
    word-break: break-all;
    text-decoration: none;
}

.api-doc-url:hover {
    text-decoration: underline;
}

.api-doc-code {
    display: block;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
    border-radius: 2px;
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #333;
    white-space: pre;
}

.api-doc-code code {
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
}

.api-doc-tester {
    margin-top: 2rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0.75rem 1rem 1rem;
}

.api-doc-tester summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.api-docs-tooling {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.api-docs-panel__lead {
    margin: 0 0 1rem;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
}

.api-docs-test-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.api-docs-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.api-docs-field__label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.api-docs-field__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #555;
}

.api-docs-field__badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.api-docs-field__badge.required {
    color: #a94442;
    background: #f2dede;
}

.api-docs-field__badge.optional {
    color: #666;
    background: #eee;
}

.api-docs-field__input {
    width: 100%;
    max-width: 480px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 0.875rem;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.api-docs-test-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.api-docs-test-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.api-docs-test-btn {
    background: #337ab7;
    border: 1px solid #2e6da4;
    color: #fff;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    border-radius: 2px;
    cursor: pointer;
}

.api-docs-test-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.api-docs-test-status {
    font-size: 0.8125rem;
    font-weight: 600;
}

.api-docs-test-status.is-ok {
    color: #3c763d;
}

.api-docs-test-status.is-error {
    color: #a94442;
}

.api-docs-test-response {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
}

.api-docs-test-response__title {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.api-docs-test-response pre {
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
    padding: 0.85rem 1rem;
    font-size: 0.8125rem;
    overflow-x: auto;
    margin: 0;
}

@media (max-width: 768px) {
    .api-doc-table th,
    .api-doc-table td {
        padding: 0.45rem 0.5rem;
        font-size: 0.875rem;
    }

    .api-doc-table--meta th {
        width: 42%;
    }
}
