/* ==================== HTTP请求方法列表样式 ==================== */

/* 容器 */
.method-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 概念说明区 */
.method-concept {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px;
}

.concept-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.concept-item {
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
}

.concept-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.concept-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* 分组 */
.method-group {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.method-group-title {
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

/* 方法列表 */
.method-items {
    display: flex;
    flex-direction: column;
}

/* 方法条目 */
.method-item {
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.15s;
}

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

.method-item:hover {
    background: var(--color-bg-secondary);
}

.method-item.copied {
    background: #e6f4ea;
}

/* 方法头部 */
.method-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.method-name {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
}

.method-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.badge-safe {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge-unsafe {
    background: #ffebee;
    color: #c62828;
}

.badge-idempotent {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-non-idempotent {
    background: #fff3e0;
    color: #e65100;
}

.badge-cacheable {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-maybe {
    background: #fff8e1;
    color: #f57c00;
}

/* 方法主体 */
.method-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.method-desc {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
}

/* 详细信息 */
.method-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-item {
    font-size: 13px;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    padding: 4px 10px;
    border-radius: 4px;
}

.detail-item strong {
    color: var(--color-text);
}

/* 示例代码 */
.method-example {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border-light);
}

.example-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.example-code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    padding: 10px 12px;
    border-radius: 6px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 对比表格 */
.method-table-wrapper {
    overflow-x: auto;
}

.method-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.method-table th,
.method-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.method-table th {
    background: var(--color-bg-secondary);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.method-table td {
    color: var(--color-text-secondary);
}

.method-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-primary) !important;
}

.method-table .yes {
    color: #1e7e34;
    font-weight: 500;
}

.method-table .no {
    color: #c62828;
}

.method-table .maybe {
    color: #f57c00;
}

/* Toast 提示 */
.method-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--color-text);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.method-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .concept-row {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
        gap: 6px;
    }

    .method-table {
        font-size: 12px;
    }

    .method-table th,
    .method-table td {
        padding: 8px;
    }
}
